How solohater/food-delivery-platform works
This is a food-ordering and delivery product: customers browse restaurants and menus, add items to a cart, submit an order and payment, then follow orders; drivers can view and update deliveries. The web client calls a NestJS API through shared HTTP routes, with separate services for auth, restaurants, menus, orders, payments, delivery, users, and notifications. Checkout's order-then-payment sequence is visible in the client. Server-side cross-service orchestration and event producers are not shown, so those relationships are omitted; unexcerpted capability modules are represented from the tree and index.
Main entry points: api.ts API client · order.controller.ts Order API · user.service.ts Profile service · App.tsx Web routes
Components 34
Web client
- Web routes
web/src/App.tsx - Auth state
web/src/context/AuthContext.tsx - API client
web/src/services/api.ts - Restaurant browsing
web/src/pages/RestaurantsPage.tsx - Restaurant detail
web/src/pages/RestaurantDetailPage.tsx - Cart
web/src/pages/CartPage.tsx - Checkout
web/src/pages/CheckoutPage.tsx - Order history
web/src/pages/OrdersPage.tsx - Delivery view
web/src/pages/DeliveriesPage.tsx - Profile view
web/src/pages/ProfilePage.tsx
Restaurant catalog
- Restaurant API
api/apps/restaurant/src/restaurant.controller.ts - Restaurant service
api/apps/restaurant/src/restaurant.service.ts - Restaurant records
api/apps/restaurant/src/restaurant.entity.ts - Menu API
api/apps/menu/src/menu.controller.ts - Menu service
api/apps/menu/src/menu.service.ts - Menu items
api/apps/menu/src/menu-item.schema.ts
Order and payment
- Order API
api/apps/order/src/order.controller.ts - Order service
api/apps/order/src/order.service.ts - Orders
api/apps/order/src/order.entity.ts - Order items
api/apps/order/src/order-item.entity.ts - Payment API
api/apps/payment/src/payment.controller.ts - Payment service
api/apps/payment/src/payment.service.ts - Payments
api/apps/payment/src/payment.entity.ts
Identity and profile
- Authentication
api/apps/auth/src/auth.controller.ts - Auth service
api/apps/auth/src/auth.service.ts - Auth users
api/apps/auth/src/user.entity.ts - User profiles
api/apps/user/src/user.controller.ts - Profile service
api/apps/user/src/user.service.ts - Profile records
api/apps/user/src/user-profile.entity.ts - Addresses
api/apps/user/src/address.entity.ts
Delivery and messaging
- Delivery API
api/apps/delivery/src/delivery.controller.ts - Delivery service
api/apps/delivery/src/delivery.service.ts
Other components
- Customer
- Driver
Connections 29
- Customer → Web routes: uses
web/src/App.tsx - Driver → Web routes: uses
web/src/App.tsx - Web routes → Auth state: reads auth
web/src/App.tsx - Auth state → API client: requests profile
web/src/context/AuthContext.tsx - Restaurant browsing → API client: loads restaurants
web/src/services/api.ts - Restaurant detail → API client: loads menu
web/src/services/api.ts - Checkout → API client: creates order
web/src/pages/CheckoutPage.tsx - Checkout → API client: processes payment
web/src/pages/CheckoutPage.tsx - Order history → API client: loads orders
web/src/services/api.ts - Delivery view → API client: loads deliveries
web/src/services/api.ts - Profile view → API client: loads profile
web/src/services/api.ts - API client → Authentication: HTTP auth
web/src/services/api.ts - API client → Restaurant API: HTTP catalog
web/src/services/api.ts - API client → Menu API: HTTP menu
web/src/services/api.ts - API client → Order API: HTTP orders
web/src/services/api.ts - API client → Payment API: HTTP payment
web/src/services/api.ts - API client → Delivery API: HTTP delivery
web/src/services/api.ts - API client → User profiles: HTTP profiles
web/src/services/api.ts - Authentication → Auth service: delegates
api/apps/auth/src/auth.controller.ts - Auth service → Auth users: reads/writes
api/apps/auth/src/auth.service.ts - Restaurant API → Restaurant service: delegates
api/apps/restaurant/src/restaurant.controller.ts - Menu API → Menu service: delegates
api/apps/menu/src/menu.controller.ts - Order API → Order service: delegates
api/apps/order/src/order.controller.ts - Order API → Orders: uses status
api/apps/order/src/order.controller.ts - Payment API → Payment service: delegates
api/apps/payment/src/payment.controller.ts - Delivery API → Delivery service: delegates
api/apps/delivery/src/delivery.controller.ts - User profiles → Profile service: delegates
api/apps/user/src/user.controller.ts - Profile service → Profile records: reads/writes
api/apps/user/src/user.service.ts - Profile service → Addresses: reads/writes
api/apps/user/src/user.service.ts