Final-year project
E-commerce Store with React, Node.js and SQL
A complete online store with a product catalogue, search and filters, cart and checkout, test-mode online payments, order tracking, and an admin panel for products, stock and orders.
ReactNode.jsExpressPostgreSQL or MySQLA payment gateway in test mode
The problem
Online stores are some of the most common real-world web applications, and they involve almost every part of web development: a fast front end, secure accounts, correct prices, stock that never goes below zero, and payments that must be verified. Pick a real kind of shop, such as handloom sarees or a local bakery, to make it specific.
Features to build
- Product listing with categories, search, price filters and sorting
- Product page with images, description, price, stock status and reviews
- Cart that survives a page reload, with quantity changes and a running total
- Sign up, log in and saved delivery addresses
- Checkout that recalculates prices and stock on the server, then takes payment through a payment gateway's test mode
- Order history and status: placed, packed, shipped, delivered or cancelled
- Admin panel to add products, update stock and move orders through their statuses
- Email or on-screen confirmation for each order
Suggested data model
Store the price in order_items at the time of the order, so later price changes do not alter old orders.
Build plan
- 1
Design the database
Create the tables with primary and foreign keys and constraints such as CHECK (stock >= 0) and CHECK (price > 0).
- 2
Build the API
Write REST endpoints for products, cart, orders and admin actions, with validation and role checks on admin routes.
- 3
Build the store front
Use React with routing for the listing, product, cart and checkout pages. Keep the cart in context and save it to localStorage.
- 4
Place orders safely
In one database transaction, re-read prices, reduce stock only where enough is left, and insert the order and its items. Roll back if anything fails.
- 5
Take payments
Create a payment order with the gateway's test keys, and mark the order paid only after verifying the gateway's signature or webhook on the server.
- 6
Admin and testing
Build the admin pages, test edge cases like two people buying the last item, and deploy.
Learn these first
Each part of the project is taught in one of these free lessons.
- React useState Hook: State Explained with Examples
- React Forms: Controlled Inputs, Validation and Submit
- React Context API: useContext Without Prop Drilling
- React Router Tutorial: Pages, Links and URL Parameters
- Fetching Data in React: Loading, Errors and Race Conditions
- React Project: Product Catalogue with Shopping Cart
- Build a REST API with Node.js and Express (CRUD Example)
- Node.js Authentication: Hashing Passwords and JWT Login
- Validating Request Data in Express (with Zod)
- SQL Constraints: PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, DEFAULT
- SQL Transactions: BEGIN, COMMIT, ROLLBACK and ACID
- SQL Indexes Explained: Make Queries Fast (and When Not To)
Make it stand out
- Coupons with rules, such as a minimum order value and an expiry date
- Wishlist and recently viewed products
- Sales dashboard for the admin: revenue by day and top products
- Product recommendations based on what is often bought together
Viva and interview questions
Try to answer each one aloud before you open it.
Why must the server recalculate the order total?
Anything sent from the browser can be changed by the user, including prices. The server must look up current prices and stock itself and trust only product IDs and quantities from the client.
How do you stop two customers buying the last item?
Reduce stock with one conditional statement inside a transaction, for example UPDATE products SET stock = stock - 1 WHERE id = ? AND stock >= 1, and check that one row changed. The database applies it to one buyer at a time.
Why put order creation in a transaction?
Placing an order changes several tables. A transaction makes it all-or-nothing, so a failure halfway never leaves stock reduced without an order, or an order without its items.
How do you know a payment really succeeded?
Do not trust the browser's success redirect alone. Verify the signature the gateway returns using your secret key on the server, or handle its server-to-server webhook, before marking the order paid.
Why copy the price into order_items?
Product prices change over time. Copying the price at the moment of purchase keeps old orders and invoices correct.
What to put in your project report
- Abstract: the problem, your solution and the result in one paragraph.
- Introduction and problem statement: who has the problem and why it matters.
- Requirements: the features (functional) and qualities such as speed and security (non-functional).
- Design: architecture diagram, database tables or data flow, and screen layouts.
- Implementation: the main modules and the most interesting code, explained.
- Testing: the test cases you ran, with inputs, expected and actual results.
- Results: screenshots or numbers that show the project working.
- Conclusion and future scope: what you achieved and what you would add next.
Your college may give its own format. Follow that first, and use this list to check nothing is missing.
More project ideas
- Student Result Management System in PythonMini project
- Expense Tracker App in ReactMini project
- Blood Bank Management SystemFinal-year project