Skip to content

johnmwangimegwe/Retail-Store-Sales-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Retail Store Sales Management System using MongoDB

πŸ›’ Data-Driven Retail Intelligence Platform

A full-stack web application designed to manage retail operations efficiently - leveraging MongoDB, REST APIs, and interactive dashboards to transform raw sales data into actionable business insights.

🌐 Live Application

πŸ“Έ Application Preview

Retail Store Sales Management Dashboard


πŸ” Project Summary

The Retail Store Sales Management System is a comprehensive full-stack application that enables efficient management of retail operations including:

  • πŸ“š Product (Book) management
  • πŸ‘₯ Customer tracking
  • 🧾 Order processing
  • πŸ“Š Sales analytics dashboard

This project demonstrates how raw data can be transformed into meaningful insights through:

  • MongoDB data modeling
  • Data cleaning and transformation
  • Backend API development
  • Frontend visualization and interaction

🎯 Key Objectives

  1. Efficient Data Management Store and manage retail data using MongoDB collections.

  2. Full CRUD Functionality Enable creation, retrieval, updating, and deletion of records.

  3. Real-Time Analytics Provide insights into store performance through dashboards.

  4. System Integration Connect frontend UI with backend API and MongoDB database.

  5. User-Friendly Interface Build a clean and intuitive UI for seamless interaction.


❓ Core System Capabilities

1. Product (Books) Management

  • View all products in a clean card layout
  • Search by title, author, category, or publisher
  • Add new products
  • Edit existing products
  • Delete products

2. Customer Management

  • Store customer details
  • Add and view customers
  • Track customer interactions

3. Order Management

  • Create and manage orders
  • Track purchases and transaction history
  • Link orders to customers and products

4. Dashboard Analytics

  • Total products, customers, and orders
  • Buyable vs non-buyable products
  • Average price and page count
  • Category and language distribution
  • Sales insights through charts

πŸ—οΈ System Architecture

Frontend (React + Vite + UI Components)
          ↓
     REST API (Express.js)
          ↓
     MongoDB Atlas Database

🧰 Technologies Used

πŸ”Ή Backend

  • Node.js
  • Express.js
  • MongoDB Atlas
  • Mongoose
  • dotenv
  • CORS

πŸ”Ή Frontend

  • React (Vite)
  • TypeScript
  • Tailwind CSS / ShadCN UI
  • Chart.js

πŸ”Ή Database

  • MongoDB (NoSQL Document Database)

πŸ—‚οΈ Project Structure

bookstorems-main/
β”‚
β”œβ”€β”€ server/                     # Backend
β”‚   β”œβ”€β”€ index.js
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ .env
β”‚
β”œβ”€β”€ bookstorems-main/           # Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”œβ”€β”€ types.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.ts
β”‚
└── README.md

πŸ—„οΈ Database Design

πŸ“š books_clean (Products)

{
  "title": "Book Title",
  "authors": ["Author 1"],
  "publisher": "Publisher",
  "categories": "Category",
  "list_price": 12.99,
  "buyable": true
}

πŸ‘€ customers

{
  "customer_id": "C001",
  "name": "John Doe",
  "email": "john@email.com",
  "city": "Nairobi"
}

🧾 orders

{
  "order_id": "O001",
  "customer_id": "C001",
  "items": [
    { "book_id": "123", "quantity": 2, "price": 10 }
  ],
  "total_amount": 20
}

πŸ“Š Dashboard Insights

The dashboard provides real-time business intelligence:

  • πŸ“ˆ Total products, customers, and orders
  • πŸ’° Average product pricing
  • πŸ“¦ Product availability status
  • 🏷️ Category distribution
  • 🌍 Language distribution
  • πŸ“‰ Sales patterns and trends

⚑ Setup Instructions

1. Clone Repository

git clone https://github.com/your-username/retail-store-sales-management-system.git
cd retail-store-sales-management-system

2. Backend Setup

cd server
npm install

Create .env file:

PORT=5000
MONGO_URI=your_mongodb_connection_string

Run backend:

npm start

3. Frontend Setup

cd bookstorems-main
npm install
npm run dev

Frontend runs on:

http://localhost:5173

πŸ”— API Endpoints

πŸ“š Books

GET     /api/books
POST    /api/books
PUT     /api/books/:id
DELETE  /api/books/:id

πŸ‘€ Customers

GET     /api/customers
POST    /api/customers

🧾 Orders

GET     /api/orders
POST    /api/orders

🧹 Data Processing

Data preparation included:

  • Converting authors from string β†’ array
  • Handling missing/null values
  • Standardizing numeric fields
  • Structuring documents for MongoDB
  • Creating clean working dataset (books_clean)

πŸ” Key Learning Outcomes

  • NoSQL database design using MongoDB
  • Backend API development with Express
  • Frontend-backend integration
  • Data cleaning and transformation
  • Dashboard development and analytics
  • Managing multiple collections

πŸš€ Future Improvements

  • πŸ” User authentication (Admin roles)
  • πŸ’³ Payment integration
  • πŸ“¦ Inventory tracking
  • πŸ“Š Advanced analytics (sales forecasting)
  • ☁️ Deployment (Render / Vercel)
  • πŸ“„ Export reports (CSV / PDF)

πŸ“„ License

This project is for academic and educational purposes.


About

Retail Store Sales Management System built with MongoDB, Node.js, and a modern web interface for managing products, customers, orders, and sales analytics with an interactive dashboard.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors