A full-stack e-commerce application for grocery and household items shopping, deployed on Vercel with clean, accessible URLs.
- π Frontend: https://satsangi-store.vercel.app
- π§ Backend API: https://satsangi-store-api.vercel.app
- Email:
test@satsangi.com - Password:
password123
- Product Catalog: Browse products across multiple categories including Fruits & Vegetables, Dairy & Breakfast, Snacks, Beverages, Home Care, Personal Care, Staples, and Packaged Foods
- High-quality SVG Icons: Modern, scalable SVG icons for all product categories
- Responsive UI: Works on desktop and mobile devices
- Shopping Cart: Add products to cart, update quantities, and checkout
- User Authentication: Register and login to manage your account and orders
- Order Management: View order history and order details
- Frontend: React.js, Tailwind CSS, Axios
- Backend: Node.js, Express.js
- Database: MongoDB Atlas (Cloud)
- Authentication: JWT (JSON Web Tokens)
- Deployment: Vercel (Frontend & Backend)
- API Configuration: Centralized Axios instance
- Frontend: React SPA deployed on Vercel
- Backend: Express.js API deployed on Vercel serverless functions
- Database: MongoDB Atlas cloud database
- URLs: Clean, accessible URLs without localhost dependencies
Visit the live application directly:
- Frontend: https://satsangi-store.vercel.app
- Backend API: https://satsangi-store-api.vercel.app/api/products
- Node.js (v14 or higher)
- MongoDB (local or cloud)
- Clone the repository:
git clone https://github.com/Antriksh999/online-Ecom.git
cd online-Ecom- Install dependencies for backend and frontend:
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install-
Configure environment variables:
- Create a
.envfile in the backend folder with the following variables:MONGODB_URI=mongodb://localhost:27017/satsangi-store PORT=5001 JWT_SECRET=your_secret_key
- Create a
-
Seed the database with sample data:
cd backend
node seed.js
node createTestUser.js- Build the frontend:
cd ../frontend
npm run build- Start the application:
# From root directory
./start-app.ps1This application is deployed on Vercel with the following configuration:
- Platform: Vercel
- Build Command:
npm run build - Output Directory:
build/ - Environment: Production
- Platform: Vercel Serverless Functions
- Runtime: Node.js
- Database: MongoDB Atlas
- Environment Variables:
MONGODB_URIJWT_SECRET
- β Clean URLs without localhost dependencies
- β Centralized API configuration
- β Cross-device compatibility
- β Serverless backend architecture
- β Cloud database integration
cd backend
node seed.js- Build the frontend:
cd frontend
npm run build- Start the application using the provided script:
./start-app.ps1For a quick start with seeded data and pre-built frontend, simply run:
./start-app.ps1This will:
- Start the backend server on port 5001
- Start the frontend static server on port 3005
- Open the application in your browser at http://localhost:3005
- π₯¬ Fruits & Vegetables
- π₯ Dairy & Breakfast
- πΏ Snacks
- π₯€ Beverages
- π§½ Home Care
- π§΄ Personal Care
- πΎ Staples
- π¦ Packaged Foods
- π Shopping Cart: Real-time cart updates with persistent storage
- π Authentication: Secure login/register with JWT tokens
- π± Responsive Design: Optimized for all screen sizes
- π Product Search: Browse by categories and search products
- π³ Checkout Process: Streamlined order placement
- π Order History: Track your previous orders
- π User Experience: Modern UI with intuitive navigation
- React Components: Modular, reusable components
- Context API: Global state management for auth and cart
- Tailwind CSS: Utility-first styling approach
- Axios Integration: Centralized API communication
- Express.js: RESTful API endpoints
- MongoDB: Document-based data storage
- JWT Authentication: Secure user sessions
- Middleware: Error handling and request validation
GET /api/products- Fetch all productsPOST /api/auth/login- User authenticationPOST /api/auth/register- User registrationGET /api/cart- Get user cartPOST /api/orders- Place new order
This project is licensed under the MIT License - see the LICENSE file for details.