Skip to content

TOTEM-ABU/AbuShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FullStack Products Store

A full-featured e-commerce application built with the MERN stack (MongoDB, Express.js, React, Node.js) that allows users to browse, purchase, and manage products.

Table of Contents

Features

User Features

  • User authentication (Sign up, Login, Logout)
  • Browse products by categories
  • View featured products
  • Add products to shopping cart
  • Adjust product quantities in cart
  • Apply discount coupons
  • Secure payment processing with Stripe
  • View order history

Admin Features

  • Dashboard with analytics
  • Create, read, update, delete products
  • Toggle featured product status
  • Manage product categories
  • View sales data and metrics
  • User management

Tech Stack

Frontend

  • React 18 - JavaScript library for building user interfaces
  • Vite - Fast build tool and development server
  • TailwindCSS - Utility-first CSS framework
  • Zustand - Small, fast state management for React
  • React Router - Declarative routing for React
  • Axios - Promise based HTTP client
  • Stripe.js - Payment processing

Backend

  • Node.js - JavaScript runtime environment
  • Express.js - Web application framework
  • MongoDB - NoSQL database
  • Mongoose - MongoDB object modeling
  • JWT - JSON Web Tokens for authentication
  • Cloudinary - Image hosting service
  • Redis - In-memory data structure store (caching)
  • Stripe - Payment processing API

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB database (local or cloud instance)
  • Cloudinary account
  • Stripe account
  • Redis server (optional but recommended)

Project Structure

.
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ controllers/     # Request handlers
β”‚   β”œβ”€β”€ lib/            # Database and service configurations
β”‚   β”œβ”€β”€ middleware/     # Custom middleware functions
β”‚   β”œβ”€β”€ models/         # Mongoose models
β”‚   β”œβ”€β”€ routes/         # API routes
β”‚   └── server.js       # Entry point
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/ # React components
β”‚   β”‚   β”œβ”€β”€ lib/        # Utility functions
β”‚   β”‚   β”œβ”€β”€ pages/      # Page components
β”‚   β”‚   β”œβ”€β”€ stores/     # Zustand stores
β”‚   β”‚   β”œβ”€β”€ App.jsx     # Main App component
β”‚   β”‚   └── main.jsx    # Entry point
β”‚   └── vite.config.js  # Vite configuration
β”œβ”€β”€ .env                # Environment variables
β”œβ”€β”€ .gitignore          # Git ignore file
└── package.json        # Project dependencies

API Endpoints

Authentication

  • POST /api/auth/signup - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout
  • GET /api/auth/profile - Get user profile

Products

  • GET /api/products - Get all products (admin only)
  • POST /api/products - Create a new product (admin only)
  • PATCH /api/products/:id - Toggle featured status (admin only)
  • DELETE /api/products/:id - Delete a product (admin only)
  • GET /api/products/featured - Get featured products
  • GET /api/products/category/:category - Get products by category
  • GET /api/products/recommendations - Get recommended products

Cart

  • GET /api/cart - Get user's cart
  • POST /api/cart - Add item to cart
  • PATCH /api/cart/:productId - Update item quantity
  • DELETE /api/cart/:productId - Remove item from cart
  • DELETE /api/cart - Clear cart

Coupons

  • GET /api/coupons - Get all coupons (admin only)
  • POST /api/coupons - Create a new coupon (admin only)
  • DELETE /api/coupons/:id - Delete a coupon (admin only)
  • POST /api/coupons/validate - Validate a coupon

Payments

  • POST /api/payments/create-checkout-session - Create Stripe checkout session
  • POST /api/payments/checkout-success - Handle successful payment

Analytics

  • GET /api/analytics/sales - Get sales data (admin only)
  • GET /api/analytics/users - Get user data (admin only)
  • GET /api/analytics/products - Get product data (admin only)

Screenshots

(Add screenshots of your application here)

About

πŸͺAbuShop– A modern full-stack eCommerce app built with React, Express, and MongoDB, featuring secure auth, product management, analytics dashboard, shopping cart, and Stripe payments β€” designed with clean architecture and scalable, responsive UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages