How akhil9368/food-online-delivery works
Project Type and Purpose
• This is a full‑stack, online food delivery application (“QuickEats”) with a Spring Boot back end providing REST APIs for user authentication, restaurant management, order placement, real‑time tracking, and payment integration. There will also be one or more front‑end clients (web, mobile).
(Minimal) File Structure
• Although only README.md is shown, a typical Spring Boot project will have:
• src/main/java/com/quickeats/controllers
• src/main/java/com/quickeats/services
• src/main/java/com/quickeats/repositories
• src/main/java/com/quickeats/models (domain objects)
• src/main/resources (application.yml/properties, static, templates)
• Possibly modules or packages for payment, tracking, auth, restaurant, order
README for Additional Insights
• Core features:
• User Authentication (signup/login, JWT or sessions)
• Restaurant Management (CRUD restaurants/menus)
• Order Placement (shopping cart, checkout)
• Real‑time Tracking (websocket or polling)
• Secure Payment Integration (third‑party gateway like Stripe/PayPal)
• No explicit mention of microservices or messaging, so we assume a monolithic Spring Boot service that could be refactored into microservices if needed.
a. Main Components
1. Clients:
– Web application (React/Angular/Vue)
– Mobile app (iOS/Android)
3. Spring Boot Back End:
– Authentication Module
– Restaurant Module
– Order Module
– Tracking Module
– Payment Module
4. Database: Relational (e.g., PostgreSQL/MySQL)
5. Real‑Time Service: WebSocket server or message broker (e.g., Redis Pub/Sub or RabbitMQ)
6. External Services:
– Payment Gateway (Stripe, PayPal)
– Geolocation/Map API (Google Maps)
7. Optional: Notification Service (Firebase Cloud Messaging, SMTP for emails)
b. Relationships and Data Flow
– Clients send HTTP/HTTPS requests to the API Gateway (or directly to Back End).
– API Gateway routes requests to appropriate back‑end modules.
– Back‑end modules perform business logic, interact with the database via JPA/Hibernate.
– Order Module publishes order status updates to a message broker.
– Tracking Module subscribes to updates and pushes them via WebSocket to clients.
– Payment Module calls external payment API and handles callbacks/webhooks.
– Back‑end writes transaction records to the database.
c. Architectural Patterns and Design Principles
– Layered Architecture (Controller → Service → Repository)
– Hexagonal/Ports & Adapters (to decouple external APIs like payment, messaging)
– Event‑Driven for real‑time updates (publish/subscribe)
– Secure by Design (use HTTPS, JWT, OAuth2, input validation)
– Scalability: modules can be extracted as independent microservices behind the gateway.
d. Key Technologies/Frameworks
– Java + Spring Boot (Web, Security, Data JPA, WebSocket)
– Relational DB (PostgreSQL/MySQL)
– Message Broker (Redis/RabbitMQ/Kafka)
– Front‑end (React/Angular/Vue, Mobile SDKs)
– External APIs (Stripe/PayPal, Google Maps)