Skip to content

niharika2k00/chocolatey-ecommerce-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍫 Chocolatey E-Commerce Website

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.

🌐 Live Demo

πŸ“Έ Screenshots

✨ Visual Tour | Screenshots

🏠 Homepage

a a a

πŸ›οΈ Product Catalog

a a a

βš™οΈ Admin Dashboard

a a a

πŸ›’ Shopping Cart and Checkout

a a a a a a

⭐ Customer Reviews and Ratings

a

a

🌟 Features

Customer: Product catalog, user authentication, shopping cart, order management, PayPal payments, order tracking, user profiles.

Admin: Product management, user management, order management, admin dashboard.

πŸ› οΈ Tech Stack

πŸ–₯️ 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).

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB Atlas account or local MongoDB
  • PayPal Developer account (for payments via sandbox)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/Chocolatey-Ecommerce-Website.git
    cd Chocolatey-Ecommerce-Website
  2. Install backend dependencies

    cd backend
    npm install
  3. Install frontend dependencies

    cd frontend
    npm install
  4. Environment Setup

    Create a .env file 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 .env file in the frontend directory:

    REACT_APP_API_URL=http://localhost:5050
  5. Database Setup

    cd backend
    npm run data:import  # Import sample data

Note: Make sure to set isAdmin: true in MongoDB for admin users.

Running the Application

Development Mode

# Run both frontend and backend concurrently
cd backend
npm run dev

Individual Services

# Backend only
cd backend
npm start

# Frontend only
cd frontend
npm start

The application will be available at:

🐳 Docker Deployment

Build and Deploy with Docker

  1. Build the application

    ./script.sh
  2. Deploy with Docker Compose

    cd deployment
    docker compose up -d

Manual Docker Commands

# 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.1

πŸ”§ Available Scripts

Backend Scripts

  • npm start - Start production server
  • npm run server - Start development server with nodemon
  • npm run dev - Start both frontend and backend
  • npm run data:import - Import sample data to database
  • npm run data:destroy - Clear database

Frontend Scripts

  • npm start - Start development server
  • npm run build - Build for production
  • npm test - Run tests

πŸ‘¨β€πŸ’» Author

Niharika Dutta

⭐ If you found this project helpful, please give it a star!

About

🍫 MERN stack e-commerce platform with React.js, Node.js, MongoDB, JWT authentication, PayPal integration, and Docker containerization for chocolate store management.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors