E-commerce website project
a real shop with cart, orders and an admin

A storefront with categories and search, a cart, checkout, orders with status, customer accounts and an admin that manages products and stock. Generate a working version, then make it yours.

What the project does

Generated from the prompt below, so yours can differ: read it before you present it.

Storefront

Categories, search and product pages with price, images and whether it is in stock, open to visitors without an account.

Cart

Add, change quantity, remove. A signed-in customer's cart is saved, so it is still there tomorrow.

Checkout and orders

Delivery address and cash on delivery; the order gets a number, stock goes down, and the status moves from placed to delivered.

Customer accounts

Sign up, sign in, addresses and order history, and a review on products they bought.

Admin

Products, categories, stock, and an order screen to pack, ship or cancel, with stock returned on a cancel.

Sales report

Orders and revenue per day and month, and the best-selling products.

Who uses it

Visitor
Browses and searches the catalogue.
Customer
Keeps a cart, checks out, follows orders, writes reviews: sees only their own orders.
Admin
Manages products, stock and orders, and reads the sales report.

ER diagram

Eight entities. Order lines copy the price at the time of purchase, so a later price change does not rewrite old orders. Examiners like that detail.

category

iduuidPK
nametext
slugtextUK

product

iduuidPK
category_iduuidFK
skutextUK
nametext
pricenumeric
stockint
image_urltext

customer

iduuidPK
nametext
emailtextUK
phonetext

address

iduuidPK
customer_iduuidFK
line1text
citytext
pincodetext

cart_item

iduuidPK
customer_iduuidFK
product_iduuidFK
quantityint

orders

iduuidPK
customer_iduuidFK
address_iduuidFK
order_notextUK
statustext
totalnumeric
placed_attimestamp

order_item

iduuidPK
order_iduuidFK
product_iduuidFK
quantityint
unit_pricenumeric

review

iduuidPK
product_iduuidFK
customer_iduuidFK
ratingint
bodytext

Relationships

  • category groups product (one to many)
  • customer saves address (one to many)
  • customer keeps cart_item (one to many)
  • product is in cart_item (one to many)
  • customer places orders (one to many)
  • address receives orders (one to many)
  • orders contains order_item (one to many)
  • product is sold in order_item (one to many)
  • product gets review (one to many)

Mermaid source

Paste it into mermaid.live, draw.io (Arrange, Insert, Advanced, Mermaid) or any Markdown editor that draws Mermaid to get the diagram for your report.

erDiagram
  CATEGORY ||--o{ PRODUCT : "groups"
  CUSTOMER ||--o{ ADDRESS : "saves"
  CUSTOMER ||--o{ CART_ITEM : "keeps"
  PRODUCT ||--o{ CART_ITEM : "is in"
  CUSTOMER ||--o{ ORDERS : "places"
  ADDRESS ||--o{ ORDERS : "receives"
  ORDERS ||--o{ ORDER_ITEM : "contains"
  PRODUCT ||--o{ ORDER_ITEM : "is sold in"
  PRODUCT ||--o{ REVIEW : "gets"
  CATEGORY {
    uuid id PK
    text name
    text slug UK
  }
  PRODUCT {
    uuid id PK
    uuid category_id FK
    text sku UK
    text name
    numeric price
    int stock
    text image_url
  }
  CUSTOMER {
    uuid id PK
    text name
    text email UK
    text phone
  }
  ADDRESS {
    uuid id PK
    uuid customer_id FK
    text line1
    text city
    text pincode
  }
  CART_ITEM {
    uuid id PK
    uuid customer_id FK
    uuid product_id FK
    int quantity
  }
  ORDERS {
    uuid id PK
    uuid customer_id FK
    uuid address_id FK
    text order_no UK
    text status
    numeric total
    timestamp placed_at
  }
  ORDER_ITEM {
    uuid id PK
    uuid order_id FK
    uuid product_id FK
    int quantity
    numeric unit_price
  }
  REVIEW {
    uuid id PK
    uuid product_id FK
    uuid customer_id FK
    int rating
    text body
  }

Generate yours and get the code

This builds on Refinar's inventory starting point, which already has products with SKU, price and stock, and a stock ledger: the admin half of a shop. The storefront, cart, checkout and orders come from the prompt.

The button opens Refinar with the project described in the first message, ready to edit. About a minute later there is a running app with sign-in, the pages above and a PostgreSQL database, in a live preview you can click through and change by asking.

It is real code: Next.js and React in TypeScript, PostgreSQL with the Drizzle ORM, and Better Auth for sign-in. When you press Go live, the GitHub repository moves to your own GitHub account and the database to your own Neon account, so you can read it, run it and present it. Building uses credits and going live needs a Refinar plan; the details are on the pricing page.

If your syllabus asks for PHP and MySQL, Java or Python, ask your guide before you start: the generated code will not be in those languages. The ER diagram and the checklist on this page work for any stack.

The prompt it starts with

An e-commerce website for a final-year project, in English: a public storefront with categories, search, product pages with images, price and stock; a cart that keeps items for signed-in customers; checkout with a delivery address and cash on delivery; orders with status placed, packed, shipped, delivered or cancelled, and stock reduced when an order is placed; customer accounts with order history; product reviews from customers who bought the product; an admin to manage products, categories, stock and orders, with a sales report. Prices in INR.

Report and viva checklist

Report checklist

  • Abstract: the problem, who uses the system and what it does, in one paragraph.
  • Existing system and its problems, then the proposed system.
  • Objectives and scope, including what is out of scope.
  • Requirements: functional and non-functional, per role.
  • Technology used and why: Next.js, TypeScript, PostgreSQL, Drizzle ORM.
  • ER diagram and table design, normalised to third normal form.
  • DFD level 0 and level 1, and a use case diagram.
  • Module description with a screenshot of each screen.
  • Testing: test cases with input, expected result and actual result.
  • Conclusion, limitations and future scope.
  • References, and a statement of the tools you used, AI included.

Make the report about this project

  • Explain why order_item stores unit_price instead of reading the product's current price.
  • Show placing an order as one transaction: create the order, its lines, reduce stock, empty the cart.
  • Draw the order status flow, including what a cancel does to stock.
  • Test cases: ordering more than in stock, a customer opening another customer's order, a review without a purchase.

Viva questions to prepare

  • What stops two customers from buying the last item at the same time?
  • Why is the cart in the database and not only in the browser?
  • How would you add online payment, and what changes in the order status flow?
  • Is a separate customer table needed when there is already a user table for sign-in?
  • What is a primary key and a foreign key? Point to one of each in your tables.
  • Which normal form are your tables in, and what would break if they were not?
  • How does sign-in work, and how are passwords stored?
  • How does the app stop one user from seeing another user's data?
  • Why PostgreSQL, and not MySQL or MongoDB?
  • What did you change or add yourself, and why?

Build it, understand it, then submit it

Many universities allow tools, AI included, as long as you say so and can explain every part of what you submit. Read your university's rules and ask your guide before you start, and name Refinar in the tools section of your report.

Treat the generated app as a starting point, not a submission. Read every table and every page, change something yourself, add one feature that is your own, and write the test cases by hand. If you cannot say why a table has a foreign key, an examiner will find out in a minute.

Submitting work you did not do and do not understand as your own is academic misconduct, whoever or whatever wrote it. These pages are here to help you build a project you can defend.

Take it further

  • Online payment through a provider's test mode, with a paid status and a webhook.
  • Coupons and discounts with an expiry date.
  • Product variants such as size and colour, each with its own stock.
  • Recommendations: customers who bought this also bought.

Questions

Is this a MERN stack project?

No. It is Next.js and React with PostgreSQL. React is the same on the front end, but the server and the database differ: say so in your report if your guide asked for MERN.

Does it take real payments?

No. Checkout is cash on delivery. A payment provider's test mode can be added if you connect your own test keys, which is a good extension to show in a viva.

What makes an e-commerce project stand out?

Correctness under pressure: stock that never goes negative, prices fixed at the time of order, and customers who cannot see each other's orders. Explain those three and the project is stronger than a prettier shop.

Is it free?

Building uses credits from a Refinar plan, and getting the code into your own GitHub account goes through Go live, which needs a plan. The details are on the pricing page.