Overview
This lecture covers building a full stack food ordering web app using ReactJS for the frontend, Node.js/Express for the backend, MongoDB for data storage, and an admin panel for managing products and orders.
Project Overview
- The web app displays food items, filters by category, and allows user registration, login, adding to cart, and placing orders.
- The cart page summarizes selected items, quantities, pricing, and delivery charges.
- A Stripe payment gateway is integrated for checkout.
- Users can view their order history and order status.
- The admin panel supports adding, listing, and deleting food items, as well as updating order statuses.
Frontend Details
- Uses ReactJS with React Router for page navigation and context API for global state management.
- Main components: Navbar, Header, Explore Menu, Food Display, Cart, Place Order, App Download, Footer, Login Popup, My Orders.
- CSS/media queries applied for full responsiveness across devices.
- Item addition/removal in cart uses context state, with synchronization to the backend for logged-in users.
- Smooth-scrolling and UI feedback (notification toasts) are implemented for user interactions.
Backend Details
- Built with Node.js and Express; main dependencies include mongoose (MongoDB ORM), JWT (auth), bcrypt (password hashing), multer (image upload), Stripe (payments), cors, dotenv.
- Folder structure: config (database), models (schemas), controllers (logic), middleware (auth), routes (API endpoints), uploads (images).
- Food model: name, description, price, image (URL), category.
- User model: name, email (unique), password (hashed), cart (object).
- Order model: userID, items, amount, address, status, date, payment status.
- API endpoints manage CRUD for food items, user registration/login, cart management, order placement, payment verification, and admin functions.
- JWT & middleware ensure protected routes for authenticated actions.
Admin Panel
- Built with ReactJS; separate from user-facing frontend.
- Admin can add food items (name, description, price, image, category), view all items, and delete products.
- Displays all orders with user details and allows changing order status (processing, out for delivery, delivered).
Key Terms & Definitions
- ReactJS — JavaScript library for building user interfaces.
- Context API — React feature for global state management.
- Express.js — Node.js web framework for creating backend APIs.
- MongoDB/Mongoose — NoSQL database (MongoDB) and its Node.js ORM.
- JWT (JSON Web Token) — Token-based authentication mechanism.
- bcrypt — Library to securely hash passwords.
- multer — Middleware for handling file/image uploads.
- Stripe — Payment processing platform integration.
- Admin Panel — Restricted interface for managing products and orders.
Action Items / Next Steps
- Implement the described folder structure and start coding components as outlined.
- Set up MongoDB Atlas and create necessary database users and collections.
- Install all required Node.js and React dependencies.
- Complete the backend logic for authentication, food item management, cart, and order handling.
- Integrate Stripe for payments; test with test cards.
- Build and test the admin panel interfaces for product/order management.
- Review the source code (from provided link if available) and add this project to your resume.