Skip to content

About

Snazzy Shop - full-stack e-commerce web application (React storefront + admin panel + Express/MongoDB backend)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ Snazzy Shop

A Modern Full-Stack E-Commerce Platform

React Storefront Β· React Admin Panel Β· Express + MongoDB Backend

React Node.js MongoDB Tailwind CSS Vite JWT

🌐 Live Demo


πŸ“Œ Table of Contents


πŸ‘€ Overview

Snazzy Shop is a complete e-commerce experience β€” a polished customer storefront, a dedicated admin panel for managing the catalog and orders, and a secure REST API on top of MongoDB.

Users can browse a collection, filter and search products, manage a cart, authenticate, and place cash-on-delivery orders. Admins log into a separate panel to add products with image uploads to Cloudinary, manage the catalog, and track order statuses end-to-end.


✨ Features

πŸ›’ Storefront

  • 🏠 Elegant landing page with hero section, latest collection & bestsellers
  • πŸ”Ž Live text search + category (Men / Women / Kids) and type (Topwear / Bottomwear / Winterwear) filters
  • ↕️ Sort by price (low β†’ high, high β†’ low)
  • πŸ“„ Product detail pages with image gallery, size selection & related products
  • 🧺 Cart with quantity controls and live totals (β‚Ή, INR)
  • πŸ” Register / login with JWT authentication
  • πŸ’³ Checkout with delivery details + Cash on Delivery (Stripe & Razorpay flows scaffolded)
  • πŸ“¦ "My Orders" page with real-time order status & a full tracking timeline
  • ⭐ Product reviews & ratings with star ratings, average score & "write a review" form
  • ❀️ Wishlist β€” save products for later with a heart toggle on every product card & dedicated wishlist page

πŸ› οΈ Admin Panel

  • πŸ”‘ Secure admin login (separate from customer accounts)
  • βž• Add products with multi-image upload to Cloudinary
  • πŸ“‹ View & remove products from the catalog
  • 🚚 View all orders, update status (Order Placed β†’ Packed β†’ Shipped β†’ Out For Delivery β†’ Delivered), every change recorded in a timestamped tracking history
  • ⭐ Moderate product reviews (view all, delete spam/offensive)

βš™οΈ Backend

  • REST API built with Express 5
  • JWT-based auth middleware for users and admins
  • Product image upload pipeline (Multer β†’ Cloudinary)
  • MongoDB (Mongoose) models for users, products, orders & reviews

πŸ“Έ Screenshots

🏠 Storefront

Home Collection with Filters
Home Collection
Product Detail User Login
Product Login
Shopping Cart Checkout
Cart Checkout
My Orders πŸ“± Fully Responsive
Orders

πŸ› οΈ Admin Panel

Admin Login Add Product
Admin Login Add Product
Products List Order Management
Products Orders

🧰 Tech Stack

Layer Technology
Frontend React 19, React Router 7, Tailwind CSS 4, Vite 6
Admin Panel React 19, React Router 7, Tailwind CSS 4, Vite 6
Backend Node.js, Express 5
Database MongoDB + Mongoose
Auth JWT (JSON Web Tokens)
File Storage Multer + Cloudinary
Payments Cash on Delivery (Stripe / Razorpay scaffolded)
Notifications React Toastify

πŸ—οΈ Architecture

flowchart LR
    subgraph Clients
        F[πŸ›’ Storefront<br/>React SPA]
        A[πŸ› οΈ Admin Panel<br/>React SPA]
    end
    subgraph Server[Express API :4000]
        R[REST API<br/>/api/user Β· /api/product<br/>/api/cart Β· /api/order]
        M[Auth Middleware<br/>JWT]
        U[Uploads<br/>Multer]
    end
    D[(MongoDB)]
    C[(Cloudinary)]

    F -- REST / JWT --> R
    A -- REST / JWT --> R
    R --> M --> D
    R --> U --> C
Loading

In production the Express server can host all three apps from a single URL β€” storefront at /, admin panel at /admin, and the API at /api.


πŸ”Œ API Reference

Base URL: {backendUrl}/api

Method Endpoint Auth Description
POST /user/register β€” Create account, returns JWT
POST /user/login β€” Login, returns JWT
POST /user/admin β€” Admin login
GET /product/list β€” List all products
POST /product/single β€” Get one product by id
POST /product/add Admin Add product (+ multipart images)
POST /product/remove Admin Remove product
POST /cart/add User Add item to cart
POST /cart/update User Update item quantity
POST /cart/get User Fetch user cart
POST /order/place User Place COD order
POST /order/userorders User Get user's orders incl. tracking history
POST /order/list Admin List all orders
POST /order/status Admin Update order status (appended to tracking history)
POST /review/add User Add or update a product review
POST /review/product β€” Get all reviews for a product
POST /review/delete User Delete own review
POST /review/list Admin List all reviews
POST /review/admin-delete Admin Delete any review
POST /wishlist/get User Fetch user wishlist (product ids)
POST /wishlist/toggle User Add or remove a product from wishlist

πŸš€ Getting Started

Prerequisites

  • Node.js v18+ and npm
  • A MongoDB instance (local or Atlas)
  • A Cloudinary account (for product image uploads)

Installation

# 1. Clone the repository
git clone https://github.com/sandeep780049/shop-website.git
cd shop-website

# 2. Backend
cd backend && npm install

# 3. Storefront
cd ../frontend && npm install

# 4. Admin panel
cd ../admin && npm install

Environment Variables

backend/.env

MONGODB_URI=<your-mongodb-connection-string>
JWT_SECRET=<any-strong-secret>
ADMIN_EMAIL=<admin-login-email>
ADMIN_PASSWORD=<admin-login-password>
CLOUDINARY_NAME=<cloudinary-cloud-name>
CLOUDINARY_API_KEY=<cloudinary-api-key>
CLOUDINARY_SECRET_KEY=<cloudinary-api-secret>
PORT=4000

frontend/.env and admin/.env

VITE_BACKEND_URL=http://localhost:4000

Run in Development

# Terminal 1 β€” API server on http://localhost:4000
cd backend && npm run server

# Terminal 2 β€” storefront on http://localhost:5173
cd frontend && npm run dev

# Terminal 3 β€” admin panel on http://localhost:5174
cd admin && npm run dev

Run as a Single Production Server

# Build both SPAs, then let Express serve everything
cd frontend && npm run build
cd ../admin && npm run build
cd ../backend && npm start

Open http://localhost:4000 β†’ storefront Β· /admin β†’ admin panel Β· /api β†’ REST API


πŸ“‚ Project Structure

shop-website/
β”‚
β”œβ”€β”€ frontend/                 # πŸ›’ Customer storefront (React + Vite)
β”‚   └── src/
β”‚       β”œβ”€β”€ components/       # Navbar, Hero, ProductItem, CartTotal, …
β”‚       β”œβ”€β”€ pages/            # Home, Collection, Product, Cart, Orders, …
β”‚       β”œβ”€β”€ context/          # ShopContext (global cart, auth, search state)
β”‚       └── assets/           # Product images & icons
β”‚
β”œβ”€β”€ admin/                    # πŸ› οΈ Admin panel (React + Vite, base /admin/)
β”‚   └── src/
β”‚       β”œβ”€β”€ components/       # Login, Navbar, Sidebar
β”‚       └── pages/            # Add, List, Orders
β”‚
β”œβ”€β”€ backend/                  # βš™οΈ Express REST API
β”‚   β”œβ”€β”€ config/               # MongoDB & Cloudinary connections
β”‚   β”œβ”€β”€ controllers/          # Business logic (user, product, cart, order)
β”‚   β”œβ”€β”€ models/               # Mongoose schemas
β”‚   β”œβ”€β”€ routes/               # API route definitions
β”‚   β”œβ”€β”€ middleware/           # JWT auth (user + admin), Multer uploads
β”‚   └── server.js             # App entry β€” serves API + both built SPAs
β”‚
└── screenshots/              # πŸ“Έ App screenshots used in this README

πŸ—ΊοΈ Roadmap

  • πŸ’³ Complete Stripe & Razorpay payment flows
  • ⭐ Product reviews & ratings
  • 🚚 Order tracking with status timeline
  • πŸ‘€ User profile & address book
  • πŸ“§ Email notifications (order confirmation, shipping updates)
  • πŸ“Š Sales analytics dashboard for admins
  • 🌍 Internationalization & multi-currency

πŸ‘€ Author & Acknowledgments

Sandeep Kumar β€” @sandeep780049

  • UI inspired by the open-source community and modern e-commerce design patterns
  • Built to demonstrate end-to-end full-stack skills: frontend, backend, database design, auth, and deployment

⭐ Found this useful? Give the repo a star!


About

Snazzy Shop - full-stack e-commerce web application (React storefront + admin panel + Express/MongoDB backend)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages