How mmchouuu/cn_foodfast works
CN_FoodFast is a food-ordering and delivery platform: customers browse restaurants and dishes, build a cart, check out, and follow orders; restaurant staff manage menus and orders, while administrators oversee accounts and operations. The React client reaches Express services through an API gateway, with separate user, product, order, and payment services. README documents PostgreSQL, RabbitMQ, email, and realtime capabilities; the sampled source confirms selected client routing and service calls. Several backend connections are documented at architecture level rather than verified in sampled callers.
Main entry points: App.jsx Client routes · AppContext.jsx App state · routes API routes · index.js PostgreSQL stores
Components 20
Customer experience
- Client routes
client/src/App.jsx - App state
client/src/context/AppContext.jsx - Restaurant browsing
client/src/pages/Restaurants.jsx - Dish details
client/src/pages/DishDetail.jsx - Cart and checkout
client/src/pages/Checkout.jsx - Order tracking
client/src/pages/CurrentOrder.jsx
Restaurant and admin
- Restaurant console
client/src/pages/owner/MenuManagement.jsx - Admin console
client/src/pages/admin/AdminDashboard.jsx
API access
- API gateway
server/apps/api-gateway/src/index.js - API routes
server/apps/api-gateway/src/routes
Domain services
- Accounts and addresses
server/apps/user-service/src/services/user.service.js - Catalog and menus
server/apps/product-service/src/services/catalog.service.js - Order management
server/apps/order-service/src/services/order.service.js - Payments and settlements
server/apps/payment-service/src/services/payments.service.js - PostgreSQL stores
server/apps/order-service/src/db/index.js
Events and integrations
- RabbitMQ events
server/libs/events/rabbit.js - Email delivery
server/apps/email-service/src/mailer.js - Realtime gateway
server/apps/socket-gateway/src/index.js - Stripe payments
server/apps/payment-service/src/clients/stripe.js
Other components
- Customer
Connections 26
- Customer → Client routes: uses
README.md - Client routes → Restaurant browsing: routes to
client/src/App.jsx - Client routes → Dish details: routes to
client/src/App.jsx - Client routes → Cart and checkout: routes to
client/src/App.jsx - Client routes → Order tracking: routes to
client/src/App.jsx - Client routes → Restaurant console: routes to
client/src/App.jsx - Client routes → Admin console: routes to
client/src/App.jsx - Restaurant browsing → App state: uses state
- Dish details → App state: uses state
- Cart and checkout → App state: uses state
client/src/pages/Checkout.jsx - Order tracking → App state: uses state
- Restaurant console → App state: uses state
client/src/pages/owner/MenuManagement.jsx - App state → API gateway: sends API requests
- API gateway → API routes: dispatches
- API routes → Accounts and addresses: forwards account requests
- API routes → Catalog and menus: forwards catalog requests
- API routes → Order management: forwards order requests
- API routes → Payments and settlements: forwards payment requests
- Order management → PostgreSQL stores: persists orders
- Accounts and addresses → PostgreSQL stores: persists accounts
- Catalog and menus → PostgreSQL stores: persists catalog
- Payments and settlements → PostgreSQL stores: persists payments
- Payments and settlements → Stripe payments: integrates payments
- Order management → RabbitMQ events: publishes events
- RabbitMQ events → Email delivery: notifies
- RabbitMQ events → Realtime gateway: relays realtime events