Skip to content
Laviyx Learn

Try

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.

Intermediate 10–12 weeks 3–4 studentsUpdated

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

TableKey columns
usersid, name, email (unique), password_hash, role
productsid, name, category_id, price, stock, is_active
ordersid, user_id, status, total, payment_status, created_at
order_itemsorder_id, product_id, quantity, unit_price
addressesid, user_id, line1, city, pincode, phone

Store the price in order_items at the time of the order, so later price changes do not alter old orders.

Build plan

  1. 1

    Design the database

    Create the tables with primary and foreign keys and constraints such as CHECK (stock >= 0) and CHECK (price > 0).

  2. 2

    Build the API

    Write REST endpoints for products, cart, orders and admin actions, with validation and role checks on admin routes.

  3. 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. 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. 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. 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.

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

  1. Abstract: the problem, your solution and the result in one paragraph.
  2. Introduction and problem statement: who has the problem and why it matters.
  3. Requirements: the features (functional) and qualities such as speed and security (non-functional).
  4. Design: architecture diagram, database tables or data flow, and screen layouts.
  5. Implementation: the main modules and the most interesting code, explained.
  6. Testing: the test cases you ran, with inputs, expected and actual results.
  7. Results: screenshots or numbers that show the project working.
  8. 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.

All project ideas →