Skip to content

A full-featured backend for a food delivery application similar to Glovo, built with ASP.NET Core using Entity Framework Core and JWT authentication.

License

Notifications You must be signed in to change notification settings

m1lean/Food-Delivery-App-Backend

Repository files navigation

๐Ÿš€ Food Delivery Backend

A modern, scalable food delivery API that powers the next generation of food ordering experiences

GitHub last commit

.NET License SQLite Swagger

Built with ASP.NET Core 9 โ€ข Inspired by Glovo, Uber Eats, and DoorDash


๐ŸŽฏ What Makes This Special?

This isn't just another CRUD API. It's a production-ready food delivery platform that handles everything from user authentication to real-time courier tracking. Whether you're building the next food delivery unicorn or learning modern .NET development, this project has you covered.

๐Ÿ’ก Why Choose This Backend?

  • ๐Ÿ—๏ธ Enterprise-Ready Architecture - Clean code, SOLID principles, and scalable design
  • โšก High Performance - Optimized queries, efficient data structures, and minimal overhead
  • ๐Ÿ” Security First - JWT authentication, role-based authorization, and secure endpoints
  • ๐Ÿ“ฑ Mobile-Friendly - RESTful APIs designed for modern mobile and web applications
  • ๐ŸŒ Global Ready - Multi-language and multi-currency support (roadmap)

โœจ Features That Wow

๐Ÿ”ฅ Core Functionality

  • Smart Authentication System

    • JWT-based security
    • Role-based access (Admin/Courier/Customer)
    • Secure password hashing
  • Intelligent Order Management

    • Real-time status tracking
    • Automatic courier assignment
    • Dynamic delivery fee calculation
    • Order history with analytics
  • Advanced Restaurant System

    • Multi-category product management
    • Real-time menu availability
    • Dynamic pricing with discounts
    • Rich media support (images)

๐Ÿš€ Advanced Features

  • Smart Courier Dispatch

    • GPS-based location tracking
    • Nearest-available algorithm
    • Performance monitoring
  • Social Commerce

    • Restaurant & courier reviews
    • Star rating system
    • Customer feedback analytics
  • Developer Experience

    • Comprehensive Swagger docs
    • Auto-seeded test data
    • Clean API design
    • Extensive error handling

๐Ÿ›  Built With Cutting-Edge Tech

Technology Purpose Why We Chose It
ASP.NET Core 9 Web Framework Latest features, high performance, cross-platform
Entity Framework Core 9 ORM Code-first approach, excellent tooling
SQLite Database Zero-config development, easy deployment
JWT Authentication Stateless, scalable, industry standard
Swagger/OpenAPI Documentation Interactive API exploration

๐Ÿšฆ Quick Start (3 Minutes!)

Prerequisites

โœ… .NET 9 SDK
โœ… Your favorite IDE (VS Code, Visual Studio, Rider)
โœ… 5 minutes of your time

๐ŸŽฌ Installation

# 1๏ธโƒฃ Clone the repository
git clone https://github.com/yourusername/food-delivery-backend.git
cd food-delivery-backend

# 2๏ธโƒฃ Restore packages (grab a coffee โ˜•)
dotnet restore

# 3๏ธโƒฃ Create and seed the database
dotnet ef database update

# 4๏ธโƒฃ Launch the API ๐Ÿš€
dotnet run

๐ŸŽ‰ You're Live!

Navigate to https://localhost:5001/swagger and explore the interactive API documentation.

Test it instantly:

  • Register a new user via /api/auth/register
  • Browse restaurants at /api/restaurants
  • Place your first order at /api/orders

๐Ÿ“Š Database Architecture

๐Ÿ—๏ธ Click to explore our data model

Core Entities

๐Ÿ‘ค User
โ”œโ”€โ”€ Authentication & roles
โ”œโ”€โ”€ Order history
โ””โ”€โ”€ Reviews written

๐Ÿช Restaurant
โ”œโ”€โ”€ Menu items (Products)
โ”œโ”€โ”€ Location data
โ”œโ”€โ”€ Reviews received
โ””โ”€โ”€ Order fulfillment

๐Ÿšš Courier  
โ”œโ”€โ”€ GPS coordinates
โ”œโ”€โ”€ Availability status
โ”œโ”€โ”€ Active deliveries
โ””โ”€โ”€ Performance reviews

๐Ÿ“ฆ Order
โ”œโ”€โ”€ Cart items
โ”œโ”€โ”€ Status tracking
โ”œโ”€โ”€ Delivery details
โ””โ”€โ”€ Payment info

๐Ÿ“š API Documentation

Our API is fully documented and interactive!

๐ŸŽฏ Key Endpoints

Endpoint Purpose Highlights
POST /api/auth/register User Registration Role assignment, validation
GET /api/restaurants Browse Restaurants Filtering, pagination, ratings
POST /api/orders Place Order Cart validation, courier assignment
GET /api/orders/history Order History Personal order tracking
POST /api/reviews Leave Review Restaurant & courier feedback

๐Ÿ” Advanced Features

  • Pagination: All list endpoints support page and pageSize
  • Filtering: Search restaurants by cuisine, rating, location
  • Sorting: Order results by relevance, rating, distance
  • Error Handling: Consistent error responses with helpful messages

๐ŸŒŸ What's Coming Next

๐Ÿšง Roadmap 2024

timeline
    title Development Roadmap
    
    Q1 2024 : Refresh Tokens
           : Real-time Notifications
           : Admin Dashboard
    
    Q2 2024 : Multi-language Support
           : Payment Integration
           : Mobile Push Notifications
    
    Q3 2024 : Analytics Dashboard
           : Map Integration
           : Performance Optimizations
    
    Q4 2024 : AI-powered Recommendations
           : Advanced Reporting
           : Microservices Architecture
Loading

๐ŸŽฎ Demo Data

The project comes with rich seed data:

  • ๐Ÿ• 15+ Restaurants across different cuisines
  • ๐Ÿ” 50+ Menu items with realistic pricing
  • ๐Ÿšš Active couriers ready for dispatch
  • ๐Ÿ‘ฅ Test users for all roles

Perfect for immediate testing and demo purposes!


๐Ÿ’ป Development Experience

๐Ÿ”ฅ What Developers Love

  • Hot Reload - See changes instantly during development
  • Rich IntelliSense - Full type safety and autocomplete
  • Comprehensive Logging - Debug with detailed request/response logs
  • Clean Architecture - Easy to understand, extend, and maintain
  • Unit Test Ready - Structured for easy testing implementation

๐Ÿ›ก๏ธ Production Ready

  • Environment Configuration - Easy deployment across environments
  • Health Checks - Monitor API health and dependencies
  • CORS Support - Ready for frontend integration
  • Security Headers - Protection against common vulnerabilities

๐Ÿค Contributing

We โค๏ธ contributions! Here's how you can help:

๐Ÿ›
Bug Reports
Found an issue?
Report it!
๐Ÿ’ก
Feature Ideas
Have a suggestion?
Share it!
๐Ÿ”ง
Code Contributions
Want to code?
Submit a PR!
๐Ÿ“–
Documentation
Improve our docs
Help us!

๐ŸŽฏ Quick Contribution Guide

  1. ๐Ÿด Fork the project
  2. ๐ŸŒฟ Create your feature branch (git checkout -b feature/AmazingFeature)
  3. โœจ Commit your changes (git commit -m 'Add some AmazingFeature')
  4. ๐Ÿ“ค Push to the branch (git push origin feature/AmazingFeature)
  5. ๐ŸŽ‰ Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License

โญ Star this repo if it helped you build something amazing! โญ

About

A full-featured backend for a food delivery application similar to Glovo, built with ASP.NET Core using Entity Framework Core and JWT authentication.

Resources

License

Stars

Watchers

Forks

Packages

No packages published