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.
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)
- 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.
- 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.
- 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.
- 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
cryptomodule. - Click-to-Fill Demo Mode: Embedded demo license key (
POS-PRM-C20-P200-12M-ZDEWM39V) on the login screen for quick activation.
| 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 |
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)
- Node.js (v18 or higher)
- Git
-
Clone the repository:
git clone https://github.com/GauriTh06/POSSystem.git cd POSSystem -
Configure environment variables: Create a
.envfile in the root directory:DATABASE_URL=your_postgresql_connection_string
-
Install Dependencies & Launch: On Windows, simply double-click
run_pos.batto 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
Follow these steps to host your application in the cloud:
-
Create your Neon DB:
- Register a free PostgreSQL database at Neon.tech.
- Copy your database connection URI.
-
Deploy on Vercel:
- Log into Vercel and click Add New > Project.
- Select the
POSSystemGitHub 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]
- Key:
- Click Deploy.
-
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.txtwill automatically seed into your PostgreSQL database.