Skip to content

Latest commit

Β 

History

History
94 lines (65 loc) Β· 1.64 KB

File metadata and controls

94 lines (65 loc) Β· 1.64 KB

πŸ₯ͺ SnacksMart

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.

✨ Features

  • πŸ” 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

🧰 Tech Stack

Layer Technology
Frontend React.js
Backend Node.js, Express
Database MongoDB
Auth JWT
Validation Joi

πŸ“ Project Structure

SnacksMart/
β”œβ”€β”€ client/         # Frontend (React)
β”œβ”€β”€ server/         # Backend (Node.js + Express)
β”œβ”€β”€ README.md
└── LICENSE

πŸš€ Getting Started

Prerequisites

  • Node.js and npm
  • MongoDB (local or cloud)

Installation

  1. Clone the repository
git clone https://github.com/PasiduRanasinghe/SnacksMart.git
cd SnacksMart
  1. Install dependencies
# Frontend
cd client
npm install

# Backend
cd ../server
npm install
  1. Environment Variables

Create a .env file inside the server/ directory:

PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key
  1. Run the app
# Backend
cd server
npm start

# Frontend (in a new terminal)
cd client
npm start

Visit http://localhost:3000 to start using the app.

πŸ“Έ Screenshots

πŸ“œ License

This project is licensed under the MIT License.