E-Comm is a full-stack e-commerce application built with TypeScript. It provides users with a seamless shopping experience, including authentication, product listings, cart management, payments, and analytics.
- 🔐 User Authentication (Sign up, login, logout)
- 🛍 Product Management (Browse, search, filter products)
- 🛒 Shopping Cart (Add, remove, update items)
- 💳 Secure Payments (Stripe integration)
- 🎟 Discounts & Coupons (Apply discounts on checkout)
- 📊 Order Analytics (Sales and user insights)
- 🌐 Responsive Design (Optimized for all devices)
- ⚛️ React.js (with TypeScript)
- 🎨 Tailwind CSS
- 🚀 React Query (for API state management)
- 🔄 Zustand (for global state management)
- 🔗 React Router
- 🏗 Framer Motion
- 🏗 Node.js + Express.js (TypeScript)
- 🛢 MongoDB + Mongoose
- 🔑 JWT Authentication
- ☁️ Cloudinary (for image storage)
- 🏦 Stripe (for payments)
- 🔍 Redis (for caching)
POST /api/auth/signup
- Register a new userPOST /api/auth/login
- Login a userGET /api/auth/logout
- Logout a user
GET /api/product
- Get all productsGET /api/product/:id
- Get a single productPOST /api/product
- Create a product (Admin)PUT /api/product/:id
- Update a product (Admin)DELETE /api/product/:id
- Delete a product (Admin)
POST /api/cart/add
- Add item to cartDELETE /api/cart/remove/:id
- Remove item from cartGET /api/cart
- Get user’s cart
POST /api/payments/checkout
- Process paymentGET /api/payments/success
- Payment success callback
POST /api/coupons/apply
- Apply a discount coupon
GET /api/analytics/sales
- Get sales data
git clone https://github.com/your-username/e-comm.git
cd e-comm
npm install
cd backend && npm install
cd ../frontend && npm install
Create a .env
file in the root directory with the following:
PORT=3000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
STRIPE_SECRET_KEY=your_stripe_secret_key
REDIS_URL=your_redis_connection_url
cd backend
npm run dev
cd frontend
npm run dev
Visit http://localhost:5173 to access the app.
Feel free to submit issues or open pull requests to improve the project.
The backend is deployed on Railway, and the frontend is hosted on Vercel.
This project is licensed under the MIT License.