Multi-tenant POS system built with React, Express, and PostgreSQL — designed for small to medium retail businesses that need fast billing, inventory tracking, and a central admin dashboard.
OpenVyapar is a full-stack, multi-tenant Point of Sale platform. Each tenant gets an isolated storefront with its own products, customers, and orders — all managed from a shared admin panel.
Key capabilities:
- Fast billing — barcode scanning, cart management, and receipt generation at the POS terminal
- Inventory management — track stock levels, set reorder thresholds, and manage product categories
- Customer management — maintain customer profiles, purchase history, and loyalty data
- Multi-store support — a single admin console manages multiple store locations and tenants
- Reporting — sales summaries, top products, and revenue trends out of the box
- Monitoring — optional Prometheus + Grafana stack for operational visibility
packages/
backend/ Express API server (port 4000) + Admin API (port 5001)
frontend/ React POS frontend (port 5173)
admin-frontend/ React admin dashboard (port 3001)
e2e/ Playwright end-to-end tests
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS |
| Backend | Node.js, Express, TypeScript |
| Database | PostgreSQL 16 |
| ORM / Migrations | Knex.js |
| Testing | Vitest (unit), Playwright (E2E) |
| Dev infra | Docker Compose, pnpm workspaces |
| Monitoring | Prometheus, Grafana |
- Node.js >= 20
- pnpm 10.x
- Docker (for PostgreSQL)
pnpm installdocker compose up -dThis starts a PostgreSQL 16 instance on port 5432 with default credentials (user/password/pos_db).
cp packages/backend/.env.example packages/backend/.envThe defaults work out of the box with the Docker Compose setup.
pnpm migrate
pnpm seedpnpm devThis starts the backend API, POS frontend, and admin frontend in parallel:
| Service | URL |
|---|---|
| POS Frontend | http://localhost:5173 |
| Admin Frontend | http://localhost:3001 |
| Backend API | http://localhost:4000 |
| Admin API | http://localhost:5001 |
| Command | Description |
|---|---|
pnpm dev |
Start all services in dev mode |
pnpm build |
Build all packages |
pnpm test |
Run unit tests |
pnpm test:e2e |
Run Playwright E2E tests |
pnpm lint |
Lint all packages |
pnpm migrate |
Run database migrations |
pnpm migrate:rollback |
Rollback all migrations |
pnpm seed |
Seed the database |
docker compose --profile monitoring up -dThis adds Prometheus (http://localhost:9090) and Grafana (http://localhost:3000, admin/admin).
