A full-stack e-commerce platform built with React, Node.js,express, and MongoDB, featuring user authentication, product management, shopping cart functionality, and integrated payment gateways.
- User Authentication: Secure login/signup with JWT tokens
- Product Browsing: Browse products with search and filtering
- Shopping Cart: Add/remove items with size selection
- Order Management: Place orders and track order history
- Payment Integration:
- Cash on Delivery (COD)
- eSewa payment gateway (Nepal)
- Responsive Design: Mobile-friendly interface with Tailwind CSS
- Product Management: Add, edit, and delete products
- Order Management: View and update order status
- User Management: Monitor user activities
- Image Upload: Cloudinary integration for product images
- React 19 - UI framework
- Vite - Build tool and dev server
- Tailwind CSS - Styling
- React Router DOM - Client-side routing
- Axios - HTTP client
- React Hot Toast - Notifications
- Framer Motion - Animations
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- bcrypt - Password hashing
- Multer - File upload handling
- Cloudinary - Image storage
- eSewa - Digital payment gateway (Nepal)
- HMAC-SHA256 - Payment signature verification
SoftStitch-Ecommerce Website/
βββ frontend/ # Customer-facing React app
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ context/ # React context for state management
β β βββ assets/ # Images and static files
β βββ package.json
βββ admin/ # Admin panel React app
β βββ src/
β β βββ components/ # Admin-specific components
β β βββ pages/ # Admin pages
β βββ package.json
βββ backend/ # Node.js/Express API server
β βββ config/ # Database and service configurations
β βββ controllers/ # Request handlers
β βββ middleware/ # Authentication and validation
β βββ models/ # MongoDB schemas
β βββ routes/ # API routes
β βββ server.js # Main server file
βββ README.md
- Node.js (v18 or higher)
- MongoDB (local or Atlas)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/AnishGane/SoftStitch---Ecommerce.git cd SoftStitch-Ecommerce-Website -
Backend Setup
cd backend npm install -
Frontend Setup
cd ../frontend npm install -
Admin Panel Setup
cd ../admin npm install
Create .env files in the backend directory:
# Backend .env
PORT=4000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
ESEWA_SECRET_KEY=your_esewa_secret_key-
Start Backend Server
cd backend npm run server # Development with nodemon # or npm start # Production
-
Start Frontend (Customer App)
cd frontend npm run dev -
Start Admin Panel
cd admin npm run dev
The applications will be available at:
- Backend API:
http://localhost:4000 - Frontend:
http://localhost:5173 - Admin Panel:
http://localhost:5174
POST /api/user/register- User registrationPOST /api/user/login- User loginPOST /api/user/admin/login- Admin login
GET /api/product/list- Get all productsPOST /api/product/add- Add new product (Admin)PUT /api/product/update/:id- Update product (Admin)DELETE /api/product/delete/:id- Delete product (Admin)
POST /api/cart/add- Add item to cartPOST /api/cart/remove- Remove item from cartGET /api/cart/list- Get user's cart
POST /api/order/place- Place new orderPOST /api/order/esewa- Place order with eSewa paymentGET /api/order/user- Get user's ordersGET /api/order/list- Get all orders (Admin)
POST /api/esewa/signature- Generate eSewa payment signature
The application integrates with eSewa payment gateway for digital payments in Nepal:
-
Payment Flow:
- User selects eSewa payment method
- System generates payment signature
- User is redirected to eSewa payment page
- After payment, user is redirected back with success/failure status
-
Environment Setup:
- Set
ESEWA_SECRET_KEYin backend environment variables - Configure eSewa merchant credentials
- Update product codes for production/development
- Set
- Connect your GitHub repository to Vercel
- Set build command:
npm install - Set start command:
npm start - Add environment variables in Vercel dashboard
- Deploy
- Connect your GitHub repository to Vercel
- Set build command:
npm install && npm run build - Set publish directory:
dist - Add environment variables if needed
- Deploy
# Frontend
VITE_BACKEND_URL=https://your-backend.vercel.app
# Backend
MONGODB_URI=your_mongodb_atlas_uri
JWT_SECRET=your_secure_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
ESEWA_SECRET_KEY=your_esewa_secret_key- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt for password security
- CORS Protection: Configured for specific origins
- Input Validation: Request validation middleware
- File Upload Security: Multer with file type restrictions
The application is fully responsive and optimized for:
- Desktop computers
- Tablets
- Mobile phones
Built with Tailwind CSS for consistent styling across all devices.
- 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 ISC License.
- Frontend (Customer App): https://soft-stitch-ecommerce.vercel.app/
- Admin Panel: https://soft-stitch-ecommerce-admin.vercel.app/
Modern landing page with hero banner and featured products
Browse all products with search and filtering
Individual product view with size selection and add to cart
Cart management with quantity controls and total calculation
Order placement with address form and payment options
Secure admin authentication portal
Add new products with image upload and form validation
View and manage all products in a comprehensive list interface
Anish - Full Stack Developer
- eSewa for payment gateway integration
- Cloudinary for image storage
- MongoDB Atlas for database hosting
- Vercel for deployment platform
For support and questions:
- Create an issue in the GitHub repository
- Contact: anishgane10@gmail.com
Note: This is a production-ready e-commerce platform with all essential features for running an online store. Make sure to configure all environment variables and payment credentials before deployment.

