Skip to content

AnthropicBots/E-commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,561 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ E-Commerce Website β€” Full-Stack Open Source Project

A modern, responsive, and feature-rich full-stack e-commerce platform built using Node.js, Express.js, MySQL, JWT, HTML, CSS, and Vanilla JavaScript.

This project includes:

  • User authentication system
  • Product browsing & filtering
  • Shopping cart & checkout flow
  • Wishlist system
  • Admin dashboard
  • Order management
  • Responsive modern UI
  • Open source contribution support

🌐 Live Demo

πŸš€ Live Website:
https://e-commerce-git-main-bhuvanshs-projects.vercel.app


πŸ“Œ Features

πŸ‘€ Authentication

  • User Signup & Login
  • JWT Authentication
  • Refresh Token System
  • Protected Routes
  • Admin Role Support

πŸ›οΈ Shopping Features

  • Product Listing
  • Product Detail Page
  • Search & Filtering
  • Category Filtering
  • Sorting System
  • Recently Viewed Products
  • Wishlist System
  • Cart Drawer
  • Full Cart Management

πŸ’³ Checkout & Orders

  • Checkout Validation
  • Order Placement
  • Order History
  • Address Management
  • Shipping Calculation
  • Tax Calculation

βš™οΈ Admin Features

  • Add Products
  • Edit Products
  • Deletee Products
  • Dashboard Overview
  • User Management
  • Order Monitoring

🎨 UI/UX

  • Fully Responsive Design
  • Modern Product Cards
  • Toast Notifications
  • Ripple Effects
  • Smooth Animations
  • Mobile Navigation
  • Lazy Loaded Images

πŸ”’ Security Improvements

  • Helmet Security Middleware
  • Request Rate Limiting
  • Input Validation
  • JWT Authentication
  • Secure Cart & Checkout Flow
  • Backend Total Verification

πŸ› οΈ Tech Stack

Technology Usage
Node.js Backend Runtime
Express.js API Framework
MySQL Database
JWT Authentication
HTML5 Frontend Structure
CSS3 Styling
JavaScript Frontend Logic
Vercel Frontend Deployment

πŸ“‚ Updated Project Structure

E-commerce/
β”‚
β”œβ”€β”€ .agents/skills/
β”‚   β”œβ”€β”€ accessibility-compliance/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ modern-javascript-patterns/
β”‚   β”œβ”€β”€ responsive-design/
β”‚   β”œβ”€β”€ semantic-html/
β”‚   └── wcag-audit-patterns/
β”‚
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/
β”‚   └── hiero-bot.yml
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── db.js
β”‚   β”‚
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ admin.controller.js
β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   β”œβ”€β”€ cartController.js
β”‚   β”‚   β”œβ”€β”€ chat.controller.js
β”‚   β”‚   β”œβ”€β”€ orderController.js
β”‚   β”‚   β”œβ”€β”€ pincodeController.js
β”‚   β”‚   β”œβ”€β”€ productController.js
β”‚   β”‚   β”œβ”€β”€ promo.controller.js
β”‚   β”‚   β”œβ”€β”€ recommendationController.js
β”‚   β”‚   └── wishlistController.js
β”‚   β”‚
β”‚   β”œβ”€β”€ middleware/
|   |   β”œβ”€β”€ validators/
β”‚   β”‚   β”œβ”€β”€ adminMiddleware.js
β”‚   β”‚   β”œβ”€β”€ authMiddleware.js
β”‚   β”‚   β”œβ”€β”€ rateLimiter.js
β”‚   β”‚   └── rbacMiddleware.js
β”‚   β”‚
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ Order.js
β”‚   β”‚   β”œβ”€β”€ Pincode.js
β”‚   β”‚   β”œβ”€β”€ Product.js
β”‚   β”‚   └── User.js
β”‚   β”‚
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ adminRoutes.js
β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   β”œβ”€β”€ cartRoutes.js
β”‚   β”‚   β”œβ”€β”€ chatRoutes.js
β”‚   β”‚   β”œβ”€β”€ index.js
β”‚   β”‚   β”œβ”€β”€ orderRoutes.js
β”‚   β”‚   β”œβ”€β”€ pincodeRoutes.js
β”‚   β”‚   β”œβ”€β”€ productRoutes.js
β”‚   β”‚   β”œβ”€β”€ promoRoutes.js
β”‚   β”‚   β”œβ”€β”€ recommendationRoutes.js
β”‚   β”‚   └── wishlistRoutes.js
β”‚   β”‚
β”‚   β”œβ”€β”€ scripts/
β”‚   β”‚   └── seedProducts.js
β”‚   β”‚
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ admin.service.js
β”‚   β”‚   β”œβ”€β”€ chat.service.js
β”‚   β”‚   β”œβ”€β”€ interactionService.js
β”‚   β”‚   β”œβ”€β”€ order.service.js
β”‚   β”‚   β”œβ”€β”€ promo.service.js
β”‚   β”‚   └── recommendationService.js
β”‚   β”‚
β”‚   β”œβ”€β”€ sql/
β”‚   β”‚   β”œβ”€β”€ admin_dashboard_schema.sql
β”‚   β”‚   β”œβ”€β”€ chat.schema.sql
β”‚   β”‚   └── promo_schema.sql
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ helpers.js
β”‚   β”‚   └── socketManager.js
β”‚   β”‚
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ schema.sql
β”‚   └── server.js
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”œβ”€β”€ images/
β”‚   β”‚   └── videos/
β”‚   β”‚
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ cart-drawer.html
β”‚   β”‚   β”œβ”€β”€ footer.html
β”‚   β”‚   └── navbar.html
β”‚   β”‚
β”‚   β”œβ”€β”€ scripts/
β”‚   β”‚   β”œβ”€β”€ Buy1Get1.js
β”‚   β”‚   β”œβ”€β”€ about.js
β”‚   β”‚   β”œβ”€β”€ admin.js
β”‚   β”‚   β”œβ”€β”€ animations.js
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ back-to-top.js
β”‚   β”‚   β”œβ”€β”€ blog.js
β”‚   β”‚   β”œβ”€β”€ cart-drawer.js
β”‚   β”‚   β”œβ”€β”€ cart.js
β”‚   β”‚   β”œβ”€β”€ chat-widget.js
β”‚   β”‚   β”œβ”€β”€ checkout.js
β”‚   β”‚   β”œβ”€β”€ compare.js
β”‚   β”‚   β”œβ”€β”€ components.js
β”‚   β”‚   β”œβ”€β”€ config.js
β”‚   β”‚   β”œβ”€β”€ contact.js
β”‚   β”‚   β”œβ”€β”€ dashboard-orders.js
β”‚   β”‚   β”œβ”€β”€ dashboard-overview.js
β”‚   β”‚   β”œβ”€β”€ dashboard-settings.js
β”‚   β”‚   β”œβ”€β”€ dashboard-wishlist.js
β”‚   β”‚   β”œβ”€β”€ dashboard.js
β”‚   β”‚   β”œβ”€β”€ delivery.js
β”‚   β”‚   β”œβ”€β”€ early_summer.js
β”‚   β”‚   β”œβ”€β”€ help.js
β”‚   β”‚   β”œβ”€β”€ hero.js
β”‚   β”‚   β”œβ”€β”€ home-init.js
β”‚   β”‚   β”œβ”€β”€ mens.js
β”‚   β”‚   β”œβ”€β”€ order.js
β”‚   β”‚   β”œβ”€β”€ ordersHistory.js
β”‚   β”‚   β”œβ”€β”€ pincode.js
β”‚   β”‚   β”œβ”€β”€ privacy.js
β”‚   β”‚   β”œβ”€β”€ product-actions-home.js
β”‚   β”‚   β”œβ”€β”€ product-actions.js
β”‚   β”‚   β”œβ”€β”€ product-cards-home.js
β”‚   β”‚   β”œβ”€β”€ product-render.js
β”‚   β”‚   β”œβ”€β”€ product-reviews.js
β”‚   β”‚   β”œβ”€β”€ product-variants.js
β”‚   β”‚   β”œβ”€β”€ product.js
β”‚   β”‚   β”œβ”€β”€ profile.js
β”‚   β”‚   β”œβ”€β”€ recentlyViewed.js
β”‚   β”‚   β”œβ”€β”€ recommendations.js
β”‚   β”‚   β”œβ”€β”€ related-products.js
β”‚   β”‚   β”œβ”€β”€ script.js
β”‚   β”‚   β”œβ”€β”€ seasonal.js
β”‚   β”‚   β”œβ”€β”€ shop-controls.js
β”‚   β”‚   β”œβ”€β”€ shop.js
β”‚   β”‚   β”œβ”€β”€ success.js
β”‚   β”‚   β”œβ”€β”€ terms.js
β”‚   β”‚   β”œβ”€β”€ toast.js
β”‚   β”‚   β”œβ”€β”€ tshirt.js
β”‚   β”‚   β”œβ”€β”€ ui.js
β”‚   β”‚   β”œβ”€β”€ utils.js
β”‚   β”‚   β”œβ”€β”€ wishlist.js
β”‚   β”‚   └── womens.js
β”‚   β”‚
β”‚   β”œβ”€β”€ styles/
β”‚   β”‚   β”œβ”€β”€ about.css
β”‚   β”‚   β”œβ”€β”€ admin.css
β”‚   β”‚   β”œβ”€β”€ animations.css
β”‚   β”‚   β”œβ”€β”€ auth.css
β”‚   β”‚   β”œβ”€β”€ back-to-top.css
β”‚   β”‚   β”œβ”€β”€ base.css
β”‚   β”‚   β”œβ”€β”€ blog.css
β”‚   β”‚   β”œβ”€β”€ cart.css
β”‚   β”‚   β”œβ”€β”€ chat-widget.css
β”‚   β”‚   β”œβ”€β”€ checkout.css
β”‚   β”‚   β”œβ”€β”€ components.css
β”‚   β”‚   β”œβ”€β”€ contact.css
β”‚   β”‚   β”œβ”€β”€ dashboard.css
β”‚   β”‚   β”œβ”€β”€ delivery.css
β”‚   β”‚   β”œβ”€β”€ early_summer.css
β”‚   β”‚   β”œβ”€β”€ help.css
β”‚   β”‚   β”œβ”€β”€ hero.css
β”‚   β”‚   β”œβ”€β”€ layout.css
β”‚   β”‚   β”œβ”€β”€ order.css
β”‚   β”‚   β”œβ”€β”€ privacy.css
β”‚   β”‚   β”œβ”€β”€ product-card.css
β”‚   β”‚   β”œβ”€β”€ product.css
β”‚   β”‚   β”œβ”€β”€ profile.css
β”‚   β”‚   β”œβ”€β”€ seasonal.css
β”‚   β”‚   β”œβ”€β”€ shop.css
β”‚   β”‚   β”œβ”€β”€ style.css
β”‚   β”‚   β”œβ”€β”€ success.css
β”‚   β”‚   β”œβ”€β”€ terms.css
β”‚   β”‚   β”œβ”€β”€ tshirt.css
β”‚   β”‚   └── wishlist.css
β”‚   β”‚
β”‚   β”œβ”€β”€ Buy1Get1.html
β”‚   β”œβ”€β”€ about.html
β”‚   β”œβ”€β”€ admin.html
β”‚   β”œβ”€β”€ blog.html
β”‚   β”œβ”€β”€ cart.html
β”‚   β”œβ”€β”€ checkout.html
β”‚   β”œβ”€β”€ compare.html
β”‚   β”œβ”€β”€ contact.html
β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”œβ”€β”€ delivery.html
β”‚   β”œβ”€β”€ early_summer.html
β”‚   β”œβ”€β”€ help.html
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ mens.html
β”‚   β”œβ”€β”€ order.html
β”‚   β”œβ”€β”€ privacy.html
β”‚   β”œβ”€β”€ product.html
β”‚   β”œβ”€β”€ profile.html
β”‚   β”œβ”€β”€ robots.html
β”‚   β”œβ”€β”€ seasonal.html
β”‚   β”œβ”€β”€ shop.html
β”‚   β”œβ”€β”€ signin.html
β”‚   β”œβ”€β”€ signup.html
β”‚   β”œβ”€β”€ sitemap.xml
β”‚   β”œβ”€β”€ success.html
β”‚   β”œβ”€β”€ terms.html
β”‚   β”œβ”€β”€ tshirt.html
β”‚   β”œβ”€β”€ vercel.html
β”‚   β”œβ”€β”€ wishlist.html
β”‚   └── womens.html
β”‚
β”œβ”€β”€ .env.example  
β”œβ”€β”€ .gitattributes        
β”œβ”€β”€ .gitignore
β”œβ”€β”€ AGENTS.md             
β”œβ”€β”€ CHANGELOG.md          
β”œβ”€β”€ CODE_OF_CONDUCT.md    
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE        
β”œβ”€β”€ README.md
β”œβ”€β”€ SECURITY.md
β”œβ”€β”€ TODO.md
β”œβ”€β”€ ecommerce.sql 
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json   
β”œβ”€β”€ skills-lock.json               
└── test.js                

πŸš€ Local Setup Guide

πŸ“‹ Prerequisites

Before starting, make sure you have the following installed:

  • Node.js (v18 or higher recommended)
  • npm
  • MySQL Server
  • Git
  • VS Code (recommended)

Verify installation:

node -v
npm -v
mysql --version
git --version

1️⃣ Clone Repository

git clone https://github.com/AnthropicBots/E-commerce.git
cd E-commerce

βš™οΈ Backend Setup

2️⃣ Navigate to Backend Folder

cd backend

3️⃣ Install Dependencies

npm install

Wait for all packages to install successfully.


4️⃣ Create MySQL Database

Login to MySQL:

mysql -u root -p

Enter your MySQL password when prompted.

Create the database:

CREATE DATABASE ecommerce;

Verify database creation:

SHOW DATABASES;

You should see:

ecommerce

5️⃣ Import Database Schema

Inside the backend folder run:

mysql -u root -p ecommerce < schema.sql

This command creates all required tables.


6️⃣ Create Environment File

Create a .env file inside the backend/ folder.

Copy values from .env.example.

Example:

DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=ecommerce

JWT_SECRET=your_secret_key

PORT=5000
FRONTEND_URL=http://127.0.0.1:5500

⚠️ Important

If your MySQL root account has a password:

DB_PASSWORD=your_mysql_password

If your MySQL root account has no password:

DB_PASSWORD=

7️⃣ Start Backend Server

Run:

npm run dev

If the above command is unavailable:

npm start

Backend will run at:

http://localhost:5000

8️⃣ Verify Backend Setup

A successful startup should show messages similar to:

Database connected successfully
Server running on port 5000

If you see these messages, your backend setup is complete.


🌐 Frontend Setup

9️⃣ Open Frontend Folder

Open the project in VS Code.

Navigate to:

frontend/

πŸ”Ÿ Run Frontend

Using VS Code Live Server:

  1. Open index.html
  2. Right Click
  3. Select Open with Live Server

Frontend will run at:

http://127.0.0.1:5500

πŸ”§ Common Setup Issues

MySQL Access Denied

Error:

Access denied for user 'root'@'localhost'

Solution:

  • Verify MySQL is running
  • Check DB_USER
  • Check DB_PASSWORD
  • Test login manually:
mysql -u root -p

Unknown Database 'ecommerce'

Error:

Unknown database 'ecommerce'

Solution:

CREATE DATABASE ecommerce;

Then import:

mysql -u root -p ecommerce < schema.sql

Cannot Find Module

Error:

Cannot find module ...

Solution:

npm install

inside the backend folder.


Port Already In Use

Error:

EADDRINUSE

Solution:

Change:

PORT=5001

inside .env.


Still Facing Issues?

Please create a GitHub issue and include:

  • Operating System
  • Node.js version
  • npm version
  • Screenshot of terminal
  • Full error message
  • Steps already tried

Maintainers will help you resolve the issue.


🎯 Learning Goals

This project demonstrates:

  • Full-stack web development fundamentals
  • REST API development using Node.js & Express
  • MySQL database integration and query handling
  • JWT-based authentication & authorization
  • Frontend UI/UX design and responsive layouts
  • DOM manipulation and dynamic rendering
  • Cart, checkout, and order management systems
  • Admin dashboard development
  • Real-world e-commerce application architecture
  • API integration between frontend and backend
  • Open-source project structuring and collaboration
  • Debugging, validation, and error handling

πŸ‘¨β€πŸ’» Maintainers & Organization

This project is developed under the Anthropic Bots organization.

πŸ‘‘ Organization Owner

Mohit Yadav

  • Founder & Owner of Anthropic Bots
  • Passionate about Full-Stack Development & Software Engineering
  • Focused on building scalable real-world applications

πŸ› οΈ Project Maintainer

Bhuvansh Kataria

  • Active maintainer of this E-Commerce project
  • Responsible for feature development, backend integration, bug fixes, and open-source improvements
  • Contributing towards improving project structure, security, and overall user experience

πŸ’‘ This project is actively maintained and improved through open-source collaboration.

Contributions, suggestions, and improvements are always welcome.


πŸ“œ License

This project is licensed under the MIT License and is free to use for learning and educational purposes.


⭐ If you like this project, consider giving it a star on GitHub and supporting the repository!

About

A modern, responsive e-commerce platform built with clean UI, product browsing, and cart functionality, deployed using GitHub Pages.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages