Skip to content

Latest commit

Β 

History

22 Commits

Folders and files

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

Repository files navigation

RetailMaster POS System

A comprehensive Point of Sale (POS) system with multi-branch support, inventory management, online ordering, and role-based access control.

πŸ“Έ Screenshots

Landing Page

Landing Page

Sign In

Sign In

Sign Up

Sign Up

Company Creation

Company Creation

Company Details

Company Details

Dashboard

Dashboard

Products

Products

POS Sale

POS Sale

Transactions

Transactions

Invoice Print

Invoice Print

Online Order

Online Order

Online Order Branch

Online Order Branch

Order Details

Order Details

Order Details 2

Order Details 2

Order Approve

Order Approve

Branches

Branches

Reports

Reports

Profile

Profile

Settings

Settings


πŸš€ Features

Core POS Features

  • Multi-branch Management: Create and manage multiple branches under one company
  • Role-based Access: Admin and Cashier roles with different permissions
  • Product Management: Central product catalog with branch-specific inventory
  • Sales Processing: Fast and intuitive POS interface for cashiers
  • Invoice Generation: Professional PDF invoices with print support
  • Sales Reports: Comprehensive reports with filters and analytics
  • Dashboard: Real-time KPIs, low stock alerts, and sales trends

Online Ordering System

  • Public Storefront: Customers can browse products by branch
  • Real-time Inventory: Live stock availability checking
  • Order Management: Complete order lifecycle (Pending β†’ Accepted β†’ Ready β†’ Out for Delivery β†’ Delivered)
  • Order Tracking: Customers can track their orders
  • Branch Selection: Customers choose which branch to order from
  • New Order Notifications: Real-time alerts for cashiers

Authentication & Security

  • JWT Authentication: Secure token-based authentication
  • Google OAuth: Sign in with Google integration
  • Password Reset: Forgot password functionality with email
  • Multi-tenancy: Complete data isolation between companies

Inventory Management

  • Branch-specific Stock: Track inventory per branch
  • Low Stock Alerts: Automatic notifications when stock runs low
  • Stock Adjustments: Easy quantity and threshold management
  • Product Catalog: Central product database with pricing

πŸ—οΈ Project Structure

Backend (RetailMaster.API)

RetailMaster.API/
β”œβ”€β”€ Controllers/
β”œβ”€β”€ DTOs/
β”œβ”€β”€ Models/
β”œβ”€β”€ Services/
β”œβ”€β”€ Data/
β”œβ”€β”€ Migrations/
└── Program.cs

Frontend (RetailMaster.Client)

RetailMaster.Client/
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ context/
β”‚   β”œβ”€β”€ layouts/
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── Online/
β”‚   β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ App.jsx
β”‚   β”œβ”€β”€ main.jsx
β”‚   └── index.css
β”œβ”€β”€ .env
β”œβ”€β”€ index.html
β”œβ”€β”€ package.json
β”œβ”€β”€ tailwind.config.js
└── vite.config.js

πŸ› οΈ Technology Stack

Backend

  • .NET 9.0 - Web API framework
  • Entity Framework Core - ORM and database access
  • PostgreSQL - Primary database
  • JWT - Authentication
  • BCrypt - Password hashing
  • Google.Apis.Auth - Google OAuth verification
  • Swagger/OpenAPI - API documentation

Frontend

  • React 18 - UI library
  • Vite - Build tool and dev server
  • React Router DOM - Routing
  • Axios - HTTP client
  • Framer Motion - Animations
  • Tailwind CSS - Styling
  • DaisyUI - UI components
  • Bootstrap Icons - Icon set

πŸ“¦ Installation

Prerequisites

Backend Setup

  1. Clone the repository
git clone https://github.com/yourusername/retailmaster.git
cd retailmaster/RetailMaster.API
  1. Configure database connection

    Update appsettings.json or create appsettings.Development.json:

{
  "ConnectionStrings": {
    "DefaultConnection": "Host=localhost;Database=retailmaster;Username=postgres;Password=yourpassword"
  },
  "Jwt": {
    "Key": "your-super-secret-jwt-key-with-at-least-32-characters",
    "Issuer": "RetailMaster",
    "Audience": "RetailMasterUsers",
    "ExpireMinutes": 60
  },
  "Google": {
    "ClientId": "your-google-client-id.apps.googleusercontent.com"
  },
  "Frontend": {
    "Url": "http://localhost:5173"
  },
  "Email": {
    "SmtpHost": "smtp.gmail.com",
    "SmtpPort": "587",
    "SmtpUser": "your-email@gmail.com",
    "SmtpPass": "your-app-password",
    "FromEmail": "your-email@gmail.com",
    "FromName": "RetailMaster"
  }
}
  1. Run migrations
dotnet ef database update
  1. Run the API
dotnet run

The API will be available at https://localhost:7000 and Swagger UI at https://localhost:7000/swagger

Frontend Setup

  1. Navigate to client directory
cd ../RetailMaster.Client
  1. Install dependencies
npm install
  1. Create .env file
VITE_API_BASE_URL=https://localhost:7000/api
VITE_GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
  1. Run the development server
npm run dev

The app will be available at http://localhost:5173

🚦 Usage Guide

For Business Owners

  1. Create Company: Sign up at /create-company
  2. Add Branches: Navigate to Branches page and add branches
  3. Add Products: Add products to catalog and assign stock to branches
  4. Manage Staff: View and manage users in Settings
  5. View Reports: Analyze sales data in Reports section

For Cashiers

  1. Register: Use branch invite code at /register
  2. Process Sales: Use POS interface to ring up customers
  3. Manage Orders: Handle online orders in the Orders dashboard
  4. Check Inventory: View products and stock levels

For Customers

  1. Browse: Visit the public site at /online
  2. Select Branch: Choose a branch to order from
  3. Add to Cart: Select products and quantities
  4. Checkout: Enter delivery details and place order
  5. Track: Receive order number for tracking

πŸ”‘ Key Workflows

Online Ordering Flow

Customer β†’ Select Branch β†’ Browse Products β†’ Add to Cart β†’ 
Checkout β†’ Order Placed β†’ Cashier Accepts β†’ Ready for Pickup β†’ 
Out for Delivery β†’ Delivered

POS Sale Flow

Cashier β†’ Select Branch β†’ Scan/Search Products β†’ 
Add to Cart β†’ Apply Discount β†’ Complete Sale β†’ 
Print Invoice β†’ Update Inventory

Inventory Management

Admin β†’ Add Product β†’ Assign to Branches β†’ 
Set Stock Levels β†’ Monitor Low Stock β†’ 
Adjust as Needed

πŸ“Š Database Schema

Core Tables

  • Companies - Tenant information
  • Branches - Branch details with invite codes
  • Users - Staff accounts with roles
  • Products - Central product catalog
  • BranchProducts - Branch-specific inventory
  • Sales - POS transactions
  • SaleItems - Individual sale items
  • OnlineOrders - Customer orders
  • OnlineOrderItems - Order line items
  • PasswordResets - Password reset tokens

πŸ”’ Security Features

  • JWT Authentication with role-based claims
  • Password Hashing using BCrypt
  • Multi-tenancy - Complete data isolation
  • Soft Delete - Data is never permanently deleted
  • CORS - Configured for specific origins
  • Input Validation - All DTOs validated
  • SQL Injection Protection - Entity Framework
  • XSS Protection - React's built-in escaping

πŸ“± Responsive Design

The frontend is fully responsive and works on:

  • Desktop - Full sidebar layout
  • Tablet - Collapsible sidebar
  • Mobile - Bottom navigation bar

🀝 Contributing

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

Releases

Packages

Contributors

Languages