Skip to content

Repository files navigation

🧾 BizzAI - Smart Billing & Inventory Management System

A modern, full-stack Point of Sale (POS) and inventory management system designed for retail businesses, grocery stores, and small to medium enterprises. Built with the MERN stack (MongoDB, Express.js, React, Node.js) and featuring a beautiful, responsive UI with TailwindCSS.

✨ Features

🔐 Authentication & Authorization

  • Secure user registration and login with JWT authentication
  • Role-based access control (Owner, Admin)
  • Protected routes and API endpoints
  • Password encryption with bcrypt

📦 Inventory Management

  • Add, edit, and delete inventory items
  • Track stock quantities in real-time
  • Low stock alerts and notifications
  • SKU and category management
  • Cost price and selling price tracking
  • Multiple unit types (kg, litre, pcs, etc.)
  • Profit margin calculations

👥 Customer Management

  • Comprehensive customer database
  • Customer profile with contact details
  • Transaction history tracking
  • Due/credit management
  • Customer-specific analytics
  • Search and filter capabilities

💰 Point of Sale (POS)

  • Intuitive, fast checkout interface
  • Barcode/SKU scanning support
  • Multiple payment methods (Cash, UPI, Card, Credit)
  • Discount application
  • Real-time inventory updates
  • Invoice generation with PDF export
  • Print-ready invoice format

📊 Reports & Analytics

  • Sales reports with date range filtering
  • Revenue and profit tracking
  • Top-selling products analysis
  • Customer purchase patterns
  • Interactive charts and visualizations (Recharts)
  • Export capabilities

📄 Invoice Management

  • Automatic invoice number generation
  • Detailed invoice view
  • Payment status tracking (Paid, Unpaid, Partial)
  • Invoice history
  • PDF generation for printing/sharing
  • Email invoice capability

🛠️ Tech Stack

Frontend

  • React 19 - UI library
  • Vite - Build tool and dev server
  • Redux Toolkit - State management
  • React Router v7 - Client-side routing
  • TailwindCSS v4 - Utility-first CSS framework
  • Recharts - Data visualization
  • Axios - HTTP client

Backend

  • Node.js - Runtime environment
  • Express.js v5 - Web framework
  • MongoDB - NoSQL database
  • Mongoose - ODM for MongoDB
  • JWT - Authentication tokens
  • bcryptjs - Password hashing
  • PDFKit - PDF generation
  • Nodemailer - Email functionality
  • Morgan - HTTP request logger
  • CORS - Cross-origin resource sharing

📁 Project Structure

BizzAI/
├── backend/
│ ├── config/
│ │ └── db.js # Database connection
│ ├── controllers/
│ │ ├── authController.js # Authentication logic
│ │ ├── customerController.js # Customer operations
│ │ ├── inventoryController.js# Inventory operations
│ │ ├── posController.js # POS/Invoice operations
│ │ └── reportController.js # Analytics & reports
│ ├── middlewares/
│ │ └── authMiddleware.js # JWT verification
│ ├── models/
│ │ ├── User.js # User schema
│ │ ├── Item.js # Inventory item schema
│ │ ├── Customer.js # Customer schema
│ │ ├── Invoice.js # Invoice schema
│ │ ├── Transaction.js # Transaction schema
│ │ └── Notification.js # Notification schema
│ ├── routes/
│ │ ├── authRoutes.js # Auth endpoints
│ │ ├── customerRoutes.js # Customer endpoints
│ │ ├── inventoryRoutes.js # Inventory endpoints
│ │ ├── posRoutes.js # POS endpoints
│ │ └── reportRoutes.js # Report endpoints
│ ├── utils/ # Helper functions
│ ├── invoices/ # Generated PDF invoices
│ ├── .env # Environment variables
│ ├── server.js # Entry point
│ └── package.json
│
└── frontend/
├── src/
│ ├── components/
│ │ ├── Layout.jsx # Main layout wrapper
│ │ └── Sidebar.jsx # Navigation sidebar
│ ├── pages/
│ │ ├── Login.jsx # Login page
│ │ ├── Register.jsx # Registration page
│ │ ├── Dashboard.jsx # Analytics dashboard
│ │ ├── POS.jsx # Point of Sale interface
│ │ ├── Inventory.jsx # Inventory list
│ │ ├── AddItem.jsx # Add new item
│ │ ├── EditItem.jsx # Edit item
│ │ ├── Customers.jsx # Customer list
│ │ ├── AddCustomer.jsx # Add new customer
│ │ ├── EditCustomer.jsx # Edit customer
│ │ ├── CustomerDetail.jsx# Customer details
│ │ ├── Invoice.jsx # Invoice list
│ │ ├── InvoiceDetail.jsx # Invoice details
│ │ └── Reports.jsx # Reports & analytics
│ ├── redux/
│ │ ├── store.js # Redux store
│ │ └── slices/
│ │ ├── authSlice.js # Auth state
│ │ ├── inventorySlice.js
│ │ ├── customerSlice.js
│ │ ├── posSlice.js
│ │ └── reportsSlice.js
│ ├── services/
│ │ └── api.js # API configuration
│ ├── App.jsx # Main app component
│ ├── main.jsx # Entry point
│ └── index.css # Global styles
├── index.html
├── vite.config.js
└── package.json

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB (v6 or higher) - Local or Atlas
  • npm or yarn

Installation

1. Clone the repository

git clone https://github.com/orion-ai-community/BizzAI.git
cd BizzAI

2. Backend Setup

cd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env

3. Frontend Setup

cd ../frontend
# Install dependencies
npm install
# Create .env file
cp .env.example .env

Running the Application

Development Mode

Terminal 1 - Backend:

cd backend
npm run dev

Backend will run on http://localhost:5000

Terminal 2 - Frontend:

cd frontend
npm run dev

Frontend will run on http://localhost:5173

Production Build

Backend:

cd backend
npm start

Frontend:

cd frontend
npm run build
npm run preview

📡 API Endpoints

Authentication

MethodEndpointDescriptionAuth Required
POST/api/auth/registerRegister new userNo
POST/api/auth/loginLogin userNo
GET/api/auth/profileGet user profileYes

Inventory

MethodEndpointDescriptionAuth Required
POST/api/inventoryAdd new itemYes
GET/api/inventoryGet all itemsYes
GET/api/inventory/low-stockGet low stock itemsYes
GET/api/inventory/:idGet single itemYes
PUT/api/inventory/:idUpdate itemYes
DELETE/api/inventory/:idDelete itemYes

Customers

MethodEndpointDescriptionAuth Required
POST/api/customersAdd new customerYes
GET/api/customersGet all customersYes
GET/api/customers/:idGet customer detailsYes
PUT/api/customers/:idUpdate customerYes
DELETE/api/customers/:idDelete customerYes
GET/api/customers/:id/transactionsGet customer transactionsYes

POS / Invoices

MethodEndpointDescriptionAuth Required
POST/api/pos/invoiceCreate new invoiceYes
GET/api/pos/invoicesGet all invoicesYes
GET/api/pos/invoice/:idGet invoice detailsYes
DELETE/api/pos/invoice/:idDelete invoiceYes

Reports

MethodEndpointDescriptionAuth Required
GET/api/reports/salesGet sales reportsYes
GET/api/reports/revenueGet revenue analyticsYes

🎨 Key Features Explained

Dashboard

  • Real-time business metrics
  • Sales overview with charts
  • Low stock alerts
  • Recent transactions
  • Quick action buttons

POS System

  • Fast product search and selection
  • Cart management with quantity adjustments
  • Multiple payment method support
  • Automatic inventory deduction
  • Instant invoice generation
  • Customer selection for credit tracking

Inventory Management

  • Bulk import/export capabilities
  • Category-wise organization
  • Stock level monitoring
  • Profit margin tracking
  • Search and filter options

Customer Management

  • Complete customer profiles
  • Purchase history
  • Outstanding dues tracking
  • Contact management
  • Customer analytics

🔒 Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Protected API routes
  • CORS configuration
  • Input validation and sanitization
  • MongoDB injection prevention
  • XSS protection

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👥 Authors

  • Orion-AI-Community - Initial work

🙏 Acknowledgments

  • React team for the amazing library
  • MongoDB for the flexible database
  • TailwindCSS for the utility-first CSS framework
  • All contributors who help improve this project

📞 Support

For support, email shingadekartik1@gmail.com or open an issue in the repository.

🗺️ Roadmap

  • Multi-store support
  • Barcode scanner integration
  • Mobile app (React Native)
  • Advanced analytics with ML predictions
  • Supplier management
  • Purchase order management
  • Employee management with attendance
  • WhatsApp integration for invoices
  • Multi-currency support
  • Tax calculation (GST/VAT)

Made with ❤️ for small businesses

About

A comprehensive, open-source POS and inventory management system built with the MERN stack. Designed to streamline operations for small businesses with features like fast billing, custom PDF invoicing, and real-time stock tracking.

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages