QEats

🍽️ QEats - Food Delivery Backend System

QEats is a scalable backend system built with Spring Boot and MongoDB to serve restaurant data efficiently based on user geolocation and request context. Designed for high performance and modularity, the system integrates REST APIs, layered architecture, and test-driven development practices to support dynamic food discovery in real time.


πŸ“Œ 1. Problem Statement

The aim is to build the backend for an online food discovery platform (like Zomato/Swiggy) that:


🧰 2. Technology Stack & Rationale

Technology Purpose
Java 11 Backend programming language
Spring Boot Framework for building RESTful web services
MongoDB NoSQL database for storing flexible restaurant/item data
Gradle Build automation and dependency management
JUnit & Mockito Unit testing and mock testing
Log4j2 Logging and error tracking
Shell Scripts (setup_mongo.sh) Setup mock data for local dev/testing

Why MongoDB?
MongoDB offers schema flexibility and fast geolocation queries, making it ideal for rapidly changing restaurant/menu data.


🧭 3. High-Level Design (HLD)

Client (Frontend)
      ⬇
[REST API Layer] β€” RestaurantController.java
      ⬇
[Service Layer] β€” RestaurantService.java
      ⬇
[Repository Services] β€” RestaurantRepositoryServiceImpl.java
      ⬇
[MongoDB] β€” RestaurantRepository, ItemRepository

🌟 4. Features


πŸ“‘ 5. API Usage

GET /qeats/v1/restaurants

Fetch restaurants near a location within a 5km radius.

βœ… Sample Request:

GET /qeats/v1/restaurants?latitude=12.9281&longitude=77.6219&timestamp=2025-07-27T14:00:00.000Z

βœ… Sample Response:

{
  "restaurants": [
    {
      "restaurantId": "1",
      "name": "Meghana Foods",
      "latitude": 12.9281,
      "longitude": 77.6219
    }
  ]
}

πŸ’» 6. Local Setup

πŸ“¦ Prerequisites

πŸ”§ Steps

# Clone the repo
git clone https://github.com/sushantrishav90/ME_QEATS_V2.git
cd ME_QEATS_V2

# Setup MongoDB data
bash setup_mongo.sh

# Build the project
./gradlew clean build

# Run the application
./gradlew :qeatsbackend:bootRun

🌐 Access

API base URL: http://localhost:8080/qeats/v1/restaurants


πŸ“Œ 7. Important Notes


πŸš€ 8. Scope for Future Development


Maintained by Shushant Rishav
For queries or contributions, feel free to open an issue or submit a PR.