E-Commerce Platform is a modern full-stack web application built for online shopping.
It allows customers to browse products, add to cart, and place secure orders, while admins can manage inventory, users, and transactions.
This project was built with React, Node.js, Express, MongoDB, and TailwindCSS for scalability, speed, and flexibility.
- π€ User Authentication β Secure login and signup.
- π Product Management β Browse, search, and filter products.
- π Cart & Checkout β Add to cart, update, and place orders.
- π³ Payments β Integrated with secure payment gateways.
- π¦ Order Tracking β Track your purchases in real-time.
- π Admin Dashboard β Manage users, products, and orders.
- β‘ Fast & Responsive β Optimized with React + TailwindCSS.
The project is organized as follows:
Directory structure:
βββ e-commerce/
βββ LICENSE
βββ client/
β βββ package.json
β βββ tailwind.config.js
β βββ public/
β β βββ index.html
β β βββ manifest.json
β β βββ robots.txt
β βββ src/
β βββ App.js
β βββ App.test.js
β βββ index.css
β βββ index.js
β βββ reportWebVitals.js
β βββ setupTests.js
β βββ app/
β β βββ constants.js
β β βββ store.js
β βββ features/
β β βββ admin/
β β β βββ components/
β β β βββ AdminOrderDetail.js
β β β βββ AdminOrders.js
β β β βββ AdminProductDetail.js
β β β βββ AdminProductList.js
β β β βββ ProductForm.js
β β βββ auth/
β β β βββ authAPI.js
β β β βββ authSlice.js
β β β βββ components/
β β β βββ ForgotPassword.js
β β β βββ Login.js
β β β βββ Logout.js
β β β βββ Protected.js
β β β βββ ProtectedAdmin.js
β β β βββ ResetPassword.js
β β β βββ Signup.js
β β βββ brands/
β β β βββ brandsAPI.js
β β β βββ brandSlice.js
β β βββ cart/
β β β βββ Cart.js
β β β βββ cartAPI.js
β β β βββ cartSlice.js
β β βββ category/
β β β βββ categoryAPI.js
β β β βββ categorySlice.js
β β βββ common/
β β β βββ components/
β β β βββ Footer.js
β β β βββ Modal.js
β β β βββ Pagination.js
β β βββ navbar/
β β β βββ Navbar.js
β β βββ order/
β β β βββ orderAPI.js
β β β βββ orderSlice.js
β β βββ payment/
β β β βββ paymentAPI.js
β β β βββ paymentSlice.js
β β βββ product/
β β β βββ productAPI.js
β β β βββ productSlice.js
β β β βββ components/
β β β βββ ProductDetail.js
β β β βββ ProductList.js
β β βββ user/
β β βββ userAPI.js
β β βββ userSlice.js
β β βββ components/
β β βββ UserOrders.js
β β βββ UserProfile.js
β βββ pages/
β βββ 404.js
β βββ AdminHome.js
β βββ AdminOrderDetailPage.js
β βββ AdminOrdersPage.js
β βββ AdminProductDetailPage.js
β βββ AdminProductFormPage.js
β βββ CartPage.js
β βββ Checkout.js
β βββ ForgotPasswordPage.js
β βββ Home.js
β βββ LoginPage.js
β βββ OrderSuccessPage.js
β βββ ProductDetailPage.js
β βββ ResetPasswordPage.js
β βββ SignupPage.js
β βββ UserOrdersPage.js
β βββ UserProfilePage.js
βββ server/
βββ index.js
βββ package.json
βββ pnpm-lock.yaml
βββ .env.sample
βββ controllers/
β βββ Auth.Controller.js
β βββ Brand.Controller.js
β βββ Cart.Controller.js
β βββ Category.Controller.js
β βββ Mail.Controller.js
β βββ Order.Controller.js
β βββ Payment.Controller.js
β βββ Product.Controller.js
β βββ User.Controller.js
βββ models/
β βββ Brand.Model.js
β βββ Cart.Model.js
β βββ Category.Model.js
β βββ Order.Model.js
β βββ Payment.Model.js
β βββ Product.Model.js
β βββ User.Model.js
βββ routes/
β βββ Auth.Routes.js
β βββ Brand.Routes.js
β βββ Cart.Routes.js
β βββ Category.Routes.js
β βββ Mail.Routes.js
β βββ Order.Routes.js
β βββ Payment.Routes.js
β βββ Product.Routes.js
β βββ User.Routes.js
βββ services/
β βββ Common.js
β βββ Mails/
β βββ ConfirmationMail.js
β βββ ResetMail.js
β βββ SendEMail.js
β βββ WelcomMail.js
βββ utils/
βββ connectDB.js
- /client: React frontend for UI/UX.
- /client/components: Reusable UI components (Navbar, Footer, ProductCard, etc.).
- /client/pages: Main pages like Home, Cart, Checkout, and Product details.
- /client/services: API service layer for client-server communication.
- /server: Express backend handling routes, controllers, and database logic.
- /server/models: MongoDB models for Users, Products, and Orders.
- /server/controllers: Business logic for authentication, orders, and product management.
- /server/routes: REST API endpoints for client interactions.
The system architecture is built to ensure performance, scalability, and modularity. It follows a client-server model with separate frontend and backend responsibilities:
- Frontend (React + TailwindCSS): Handles product browsing, cart management, and checkout flow.
- Backend (Node.js + Express): Provides REST APIs for users, products, and orders.
- Database (MongoDB + Mongoose): Stores user accounts, products, orders, and transactions.
- Authentication (JWT): Secure login and protected routes for users and admins.
- Payments (Payment Gateway): Secure payment processing for orders.
graph TD
%% CLIENT
subgraph Client
U[ποΈ User] --> F[π» React Frontend]
end
%% BACKEND
subgraph Backend
F --> API[βοΈ Express API]
API --> DB[(ποΈ MongoDB via Mongoose)]
API --> Pay[π³ Payment Gateway]
end
%% FLOWS
U -->|π Login / Signup| API
U -->|π Browse & Add to Cart| F
U -->|π° Checkout & Pay| Pay
Pay -->|π Payment Status| API
API -->|πΎ Store / Retrieve Data| DB
%% STYLING
classDef client fill:#6ac6b7,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef backend fill:#f1a4cb,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef user fill:#ffcc00,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
classDef db fill:#f1e1a4,stroke:#000,stroke-width:2px,color:#000,font-weight:bold;
%% Apply Classes
class U user;
class F client;
class API backend;
class DB db;
class Pay backend;
- Frontend: React, TailwindCSS
- Backend: Node.js, Express
- Database: MongoDB, Mongoose
- Auth: JWT
- Payments: Payment Gateway (e.g., Stripe/PayPal)
- Node.js 18+
- MongoDB instance
- Payment Gateway API Keys (Stripe/PayPal)
git clone https://github.com/username/be-a-guptaji-e-commerce.git
cd be-a-guptaji-e-commercecd client
npm installcd ../server
npm installCreate .env in the server/ directory and add:
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
PAYMENT_GATEWAY_KEY=your_payment_keyStart backend:
cd server
npm run devStart frontend:
cd client
npm startVisit π http://localhost:3000
- User Authentication (JWT)
- Product Management
- Cart & Checkout
- Order Tracking
- Email Notifications
- Admin Analytics Dashboard
- Multi-language Support
MIT License Β© 2025 Aryan Baadlas
π¨βπ» Aryan Baadlas
π§ aryanbaadlas@gmail.com
If you like this project, give it a star β on GitHub!