A modern, full-stack e-commerce platform built with Next.js, Node.js, and MongoDB. Features a premium UI design, comprehensive admin dashboard, and seamless shopping experience.
- Modern UI Design - Premium, responsive design with Tailwind CSS
- Product Browsing - Browse by categories with advanced filtering
- Shopping Cart - Add, remove, and manage cart items
- Secure Checkout - Stripe payment integration
- User Accounts - Registration, login, and order history
- Wishlist - Save favorite products
- Real-time Updates - Dynamic cart and inventory updates
- Product Management - Add, edit, delete, and feature products
- Order Management - View and manage customer orders
- Analytics - Sales analytics and performance metrics
- User Management - View customer information
- Coupon System - Create and manage discount coupons
- Framework: Next.js 15 with TypeScript
- Styling: Tailwind CSS + Shadcn/UI components
- State Management: Zustand
- Animations: Framer Motion
- HTTP Client: Axios
- Authentication: JWT with HTTP-only cookies
- Framework: Express.js
- Database: MongoDB with Mongoose
- Authentication: JWT tokens
- File Upload: Multer + Cloudinary
- Payment: Stripe integration
- Caching: Redis (optional)
- Security: bcryptjs, CORS, cookie-parser
- Node.js 18+
- MongoDB (local or Atlas)
- Git
git clone https://github.com/Derric01/EliteCommerce.git
cd EliteCommercecd backend
npm install
# Create .env file
cp .env.example .env
# Edit .env with your configurationRequired Environment Variables (.env):
PORT=5000
MONGO_URI=your_mongodb_connection_string
ACCESS_TOKEN_SECRET=your_access_secret
REFRESH_TOKEN_SECRET=your_refresh_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_SECRET_KEY=your_cloudinary_secret
STRIPE_SECRET_KEY=your_stripe_secret
CLIENT_URL=http://localhost:3001Start Backend Server:
npm start
# or for development
npm run devcd frontend_nextjs
npm install
# Create .env.local file
cp .env.local.example .env.local
# Edit with your configurationRequired Environment Variables (.env.local):
NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_keyStart Frontend Server:
npm run dev# Create admin user
cd backend
node scripts/createAdmin.js
# Add sample products
node scripts/createSampleProducts.jsThe homepage showcases featured products with a modern, clean design and smooth animations.
Browse products by category with filtering options and different view modes (grid/list).
Comprehensive admin panel for managing products, orders, and analytics.
EliteCommerce/
βββ backend/ # Node.js backend
β βββ controllers/ # Route controllers
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ middleware/ # Custom middleware
β βββ lib/ # Utility libraries
β βββ scripts/ # Database scripts
β βββ server.js # Main server file
β
βββ frontend_nextjs/ # Next.js frontend
β βββ src/
β β βββ app/ # Next.js 15 app directory
β β βββ components/ # React components
β β βββ stores/ # Zustand stores
β β βββ lib/ # Utility functions
β βββ public/ # Static assets
β βββ package.json
β
βββ README.md
npm start- Start production servernpm run dev- Start development server with nodemonnode scripts/createAdmin.js- Create admin usernode scripts/createSampleProducts.js- Add sample productsnode scripts/listUsers.js- List all users
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- JWT-based authentication with refresh tokens
- Protected routes and admin-only access
- Secure HTTP-only cookies
- CRUD operations for products
- Image upload with Cloudinary
- Category-based organization
- Featured products system
- Persistent cart with local storage sync
- Real-time inventory updates
- Stripe payment integration
- Order tracking and history
- Sales analytics with charts
- Product management interface
- Order management system
- User activity monitoring
- Password hashing with bcryptjs
- JWT token validation
- CORS protection
- Input validation and sanitization
- Protected API routes
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutPOST /api/auth/refresh-token- Refresh access token
GET /api/products- Get all products (admin)GET /api/products/featured- Get featured productsGET /api/products/category/:category- Get products by categoryGET /api/products/:id- Get single productPOST /api/products- Create product (admin)PATCH /api/products/:id- Toggle featured status (admin)DELETE /api/products/:id- Delete product (admin)
GET /api/carts- Get user cartPOST /api/carts- Add to cartDELETE /api/carts- Clear cartPUT /api/carts/:id- Update cart item
POST /api/payments/create-checkout-session- Create Stripe sessionPOST /api/payments/checkout-success- Handle successful paymentGET /api/users/orders- Get user orders
The application includes optional Redis caching for improved performance. If Redis is not available, the app will run with a mock client without caching functionality.
Product images are stored using Cloudinary. Make sure to configure your Cloudinary credentials in the environment variables.
The application uses MongoDB. You can use either a local MongoDB instance or MongoDB Atlas cloud service.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Derric Samson
- GitHub: @Derric01
- Project: EliteCommerce
- Next.js team for the amazing framework
- Tailwind CSS for the utility-first CSS framework
- Shadcn/UI for the beautiful component library
- MongoDB for the flexible database solution
- Stripe for secure payment processing
β Star this repository if you found it helpful!

