A full-stack chocolate e-commerce platform built with React.js frontend and Node.js backend, featuring user authentication, product management, shopping cart, order processing, and PayPal payment(sandbox) integration.
- Website: https://chocolatey.raspberryip.com/
β¨ Visual Tour | Screenshots
Customer: Product catalog, user authentication, shopping cart, order management, PayPal payments, order tracking, user profiles.
Admin: Product management, user management, order management, admin dashboard.
π₯οΈ Frontend: React.js, Redux, React Router, Bootstrap, Axios, SCSS, CRACO.
βοΈ Backend: Node.js, Express.js, MongoDB, Mongoose, JWT, bcryptjs, Multer, PayPal SDK.
π³ DevOps: Docker,MongoDB Atlas, Multi-platform builds(Linux AMD64/ARM64 support).
- Node.js (v14 or higher)
- MongoDB Atlas account or local MongoDB
- PayPal Developer account (for payments via sandbox)
-
Clone the repository
git clone https://github.com/yourusername/Chocolatey-Ecommerce-Website.git cd Chocolatey-Ecommerce-Website -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd frontend npm install -
Environment Setup
Create a
.envfile in the backend directory:PORT=5050 NODE_ENV=development MONGODB_URI=your_mongodb_connection_string JWT_TOKEN=your_jwt_secret PAYPAL_CLIENT_ID=your_paypal_client_id PAYPAL_SECRET_ID=your_paypal_secret_id
Create a
.envfile in the frontend directory:REACT_APP_API_URL=http://localhost:5050
-
Database Setup
cd backend npm run data:import # Import sample data
Note: Make sure to set isAdmin: true in MongoDB for admin users.
# Run both frontend and backend concurrently
cd backend
npm run dev# Backend only
cd backend
npm start
# Frontend only
cd frontend
npm startThe application will be available at:
- Backend: http://localhost:5050
- Frontend: http://localhost:3000
-
Build the application
./script.sh
-
Deploy with Docker Compose
cd deployment docker compose up -d
# Build image
docker build -t chocolatey-backend:v0.0.1 .
# Run container
docker run -p 5050:5050 --name chocolatey-backend --env-file .env chocolatey-backend:v0.0.1npm start- Start production servernpm run server- Start development server with nodemonnpm run dev- Start both frontend and backendnpm run data:import- Import sample data to databasenpm run data:destroy- Clear database
npm start- Start development servernpm run build- Build for productionnpm test- Run tests
Niharika Dutta
β If you found this project helpful, please give it a star!















