How abhijeetmukund07/food-delivery-app works
Main Components
• Frontend: Built with React.js. Its structure is organized into pages (e.g., Home, Orders, PlaceOrder, Cart), reusable components (Navbar, Header, Footer, FoodItemCard, etc.), asset directories for images and style sheets, and state management via Redux.
• Backend: Developed with Node.js and Express.js. Notice the subdirectories for APIs (with route handlers like addFood.js, userApi.js, etc.) and Middlewares (for token verification using JWT).
• Database: MongoDB is the data store used for managing user data, restaurant information, orders, etc.
• External/Supporting Services: While not explicitly shown, JWT-based authentication and environment variables (for DB connections and secret keys) are integral parts of the system.
Relationships & Interactions
• The Backend processes requests, applies necessary middlewares (for example, VerifyToken for authentication), and communicates with the MongoDB database.
• Data flow should illustrate that after processing, the backend sends responses back to the frontend, which then updates its UI accordingly.
Architectural Features
• RESTful API: Show that the backend organizes endpoints (as seen in backend/APIs/Routes) for specific functionalities (adding food, user operations, etc.).
• Authentication Flow: Highlight how JWT is integrated via the middleware (backend/Middlewares/VerifyToken.js) to secure API endpoints.
• Modular Structure: Both the frontend and backend are broken into smaller, dedicated directories (pages, components for frontend and routes, middlewares for backend) that support scalability.