SnacksMart is a MERN-stack food ordering web application focused on delivering a smooth experience for users to browse and order delicious snacks and short eats.
- 🔐 User authentication with JWT
- 🛕️ Product listing and categorization
- 🛒 Add-to-cart functionality
- 📦 Order placement and history tracking
- 🧑💼 Admin dashboard for managing products, users & orders
- 📄 Form validation using Joi
| Layer | Technology |
|---|---|
| Frontend | React.js |
| Backend | Node.js, Express |
| Database | MongoDB |
| Auth | JWT |
| Validation | Joi |
SnacksMart/
├── client/ # Frontend (React)
├── server/ # Backend (Node.js + Express)
├── README.md
└── LICENSE
- Node.js and npm
- MongoDB (local or cloud)
- Clone the repository
git clone https://github.com/PasiduRanasinghe/SnacksMart.git
cd SnacksMart- Install dependencies
# Frontend
cd client
npm install
# Backend
cd ../server
npm install- Environment Variables
Create a .env file inside the server/ directory:
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key- Run the app
# Backend
cd server
npm start
# Frontend (in a new terminal)
cd client
npm startVisit http://localhost:3000 to start using the app.
This project is licensed under the MIT License.