🛒 Next.js E-Commerce Platform
A full-featured e-commerce platform built with Next.js, allowing users to sign up as buyers, sellers, or both.
Sellers can list products, manage inventory, and view sales, while buyers can browse, purchase, review items, and track orders.
Email/password registration & login
OAuth (Google, Facebook) integration
Role system (buyer/seller/both)
Create, edit, and manage product listings
Upload multiple product images
Track inventory and sales
View order history
Browse and search products
Add to cart and checkout
Leave reviews and ratings
Wishlist functionality
Responsive design (mobile-friendly)
Secure payment processing (Stripe / PayPal)
Order tracking
Admin dashboard
Field
Type
Constraints
_id
ObjectId
Primary Key
username
String
NOT NULL
email
String
UNIQUE, NOT NULL
password
String
NULLABLE
phone_number
String
NULLABLE
avatar_url
String
NULLABLE
bio
String
NULLABLE
created_at
DateTime
DEFAULT current timestamp
updated_at
DateTime
AUTO UPDATE on modification
social_link_id
ObjectId
Foreign Key → SocialLink._id
Field
Type
Constraints
_id
ObjectId
Primary Key
created_at
DateTime
DEFAULT current timestamp
updated_at
DateTime
AUTO UPDATE
facebook
String
NULLABLE
instagram
String
NULLABLE
twitter
String
NULLABLE
telegram
String
NULLABLE
Field
Type
Constraints
_id
ObjectId
Primary Key
created_at
DateTime
DEFAULT current timestamp
updated_at
DateTime
AUTO UPDATE
creator_id
ObjectId
Foreign Key → Users._id
description
String
NOT NULL
price
Number
NOT NULL
images
[String]
Array of image URLs
stock
Number
Default: 0
category
String
NOT NULL
rating
Number(0-5)
Default: 0
reviewsCount
Number
Default: 0
Field
Type
Constraints
_id
ObjectId
Primary Key
created_at
DateTime
DEFAULT current timestamp
updated_at
DateTime
AUTO UPDATE
reviewer_id
ObjectId
Foreign Key → Users._id
content
String
NOT NULL
like
Number
Default: 0
Clone the repo
git clone https://github.com/luchzin/e-commerce.git
cd nextjs-ecommerce