Skip to content

Repository files navigation

🛒 Multi-Environment POS System

A state-of-the-art, modern Point of Sale (POS) system offering dual workspace modes for Restaurant (Restro) and Grocery environments. Built with a responsive dark-themed dashboard, real-time analytics graphs, Excel exporting, and a robust license activation utility.


🚀 Live Demo & Deployment

This application is configured for serverless hosting on Vercel with a serverless database connection hosted on Neon PostgreSQL.

  • GitHub Repository: GauriTh06/POSSystem
  • Deployment Platform: Vercel
  • Database Engine: PostgreSQL (Neon Serverless) / SQLite (Local)

✨ Features

🍽️ Restaurant POS Workspace

  • Dynamic Table Management: Grid view of dining tables with active/completed status indicators.
  • Detailed Billing: Calculate subtotal, custom tax margins, and final bill amounts instantly.
  • Dual Payment Channels: Supports Cash and Card transaction records.
  • Interactive Ordering: Add, modify, or remove cart items with quantity increments.

🍎 Grocery POS Workspace

  • Bulk Product Inventory: Categorized views for grocery item selections.
  • Weighted & Fractional Quantities: Custom support for decimal inputs (e.g., purchasing 1.5kg of tomatoes).
  • Flexible Order Editing: View order histories, adjust cart selections, or refund orders directly.

📊 Business Analytics Dashboard

  • Visual Sales Timelines: Interactive charts (powered by Recharts) showing transaction volume and total revenue trends.
  • Reporting Period Toggles: Group statistics by 7 Days, 2 Weeks, 4 Weeks, 3 Months, or 1 Year.
  • Excel Spreadsheet Export: Export comprehensive billing sheets via a single click using XLSX.

🔑 Encryption & Licensing Utility

  • Plan Limits: Licenses enforce strict caps on total categories and products (Trial, Basic, Restaurant, and Premium levels).
  • AES-256-CBC Encryption: Keys are encrypted locally using Node's crypto module.
  • Click-to-Fill Demo Mode: Embedded demo license key (POS-PRM-C20-P200-12M-ZDEWM39V) on the login screen for quick activation.

🛠️ Technology Stack

Layer Technologies
Frontend React 19, Vite, Tailwind CSS / Vanilla CSS, Lucide React, Recharts
Backend Node.js, Express, Cors, JsonWebToken
Database PostgreSQL (Neon Client Connection Pool), SQLite3 (Local development backup)
Hosting Vercel Serverless Functions

📁 Repository Structure

POSSystem/
├── api/                  # Vercel Serverless Function entry point
│   └── index.js
├── backend/              # Node.js + Express API backend
│   ├── db.js             # Database setup, PostgreSQL configuration & seeding
│   ├── server.js         # API routes (orders, grocery, analytics, licensing)
│   ├── keys.txt          # Decrypted license keys file (seeds on initial run)
│   └── package.json
├── src/                  # React Frontend (Vite)
│   ├── components/       # POS Workspaces (Restro, Grocery, Landing)
│   ├── App.jsx           # Main routing and UI control
│   └── main.jsx
├── vercel.json           # Vercel rewrite configuration
├── package.json          # Merged project dependencies
└── run_pos.bat           # Self-healing launcher script (Windows)

💻 Local Quick Start

Prerequisites

  • Node.js (v18 or higher)
  • Git

Steps

  1. Clone the repository:

    git clone https://github.com/GauriTh06/POSSystem.git
    cd POSSystem
  2. Configure environment variables: Create a .env file in the root directory:

    DATABASE_URL=your_postgresql_connection_string
  3. Install Dependencies & Launch: On Windows, simply double-click run_pos.bat to boot up the stack. It will:

    • Self-heal by installing root NPM dependencies.
    • Start the local backend server (Port 5000).
    • Start the Vite development frontend (Port 5173).
    • Automatically open the browser at http://localhost:5173.

    Alternatively, run manually:

    npm install
    # Run frontend
    npm run dev
    # Run backend (in a separate terminal)
    cd backend && node server.js

☁️ Vercel Deployment Instructions

Follow these steps to host your application in the cloud:

  1. Create your Neon DB:

    • Register a free PostgreSQL database at Neon.tech.
    • Copy your database connection URI.
  2. Deploy on Vercel:

    • Log into Vercel and click Add New > Project.
    • Select the POSSystem GitHub repository.
    • Keep the Framework Preset as Vite and leave the Root Directory blank.
    • Under Environment Variables, add:
      • Key: DATABASE_URL
      • Value: [Your Neon PostgreSQL connection string]
    • Click Deploy.
  3. Database Seeding: The Vercel backend checks the tables on start. On first request, the database will be created, and the 1,300 license keys from backend/keys.txt will automatically seed into your PostgreSQL database.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages