How chahatkesh/food-delivery-app works
Project type and purpose
• This is a full‑stack food‑delivery web application (“food‑delivery‑app”) built with React (client & admin UIs), Node/Express (API server), MongoDB (database), and Stripe (payment).
File structure
• Top‑level modules:
• admin/ – React‑based admin panel for managing food items, orders, etc.
• client/ – React‑based customer‑facing frontend for browsing menu, placing orders.
• server/ – Express app exposing REST endpoints, handling business logic, connecting to MongoDB and Stripe, with MVC‑style folders:
◦ config/db.js (DB connection)
◦ models/ (Mongoose schemas)
◦ controllers/ (request handlers)
◦ routes/ (Express routers)
◦ middleware/auth.js (JWT or session auth)
◦ uploads/ (file storage, e.g. food images)
• Build config in each frontend (vite.config.js) and server config via .env.
Key insights from README
• Tech stack: React, Node.js, Express, MongoDB, Stripe.
• Deployment: Frontends and server hosted (e.g., Render).
• Two distinct frontends share the same backend API.
Detailed elements
• Labels: e.g., “/api/food”, “/api/order”, “auth middleware”
• Server sub‑components: config, routes, controllers, models, middleware
• Storage of uploaded files (server/uploads) or note external blob storage if used
• Security boundary around server’s auth‑protected routes