Supermarket POS & Inventory Management System — web-based, single-branch MVP.
SmartPOS is a full-stack point-of-sale system with four user roles:
| Role | Access |
|---|---|
| Admin | Full system control — users, branches, tax rates, all modules |
| Manager | Reports, inventory, purchases, products, suppliers, customers |
| Cashier | POS sales screen only — barcode scanning, cart, split payments, receipt printing |
| Stock Officer | Inventory management, stock adjustments, purchase receiving |
Core flow: Products are cataloged with barcodes, categories, suppliers, and tax classes. Cashiers process sales at the POS screen with support for split payments (cash, mobile money, card, bank). Every stock-affecting action (sale, purchase, adjustment, return, damage) writes to an audit trail. Purchases follow a draft → approve → receive workflow. Reports cover sales, inventory, financials, and cashier performance.
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, Tailwind CSS 4, Recharts |
| Backend | Node.js, Express |
| ORM | Prisma |
| Database | SQLite (dev) / MySQL (prod) |
| Auth | JWT with role-based access control |
- Node.js v18+ (download)
- npm (comes with Node.js)
git clone https://github.com/Eliahhango/SmartPOS.git
cd SmartPOScd backend
npm install
npx prisma generate
npx prisma db push
node prisma/seed.js
node src/index.jsBackend runs on http://localhost:5000.
Open a second terminal:
cd SmartPOS/frontend
npm install
npm run devFrontend runs on http://localhost:3000.
| Role | Password | |
|---|---|---|
| Admin | admin@smartpos.com |
admin123 |
| Manager | manager@smartpos.com |
manager123 |
| Cashier | cashier@smartpos.com |
cashier123 |
| Stock Officer | stock@smartpos.com |
stock123 |
SmartPOS/
├── backend/
│ ├── prisma/
│ │ ├── schema.prisma # Database schema (16 tables)
│ │ └── seed.js # Sample data
│ └── src/
│ ├── index.js # Express server entry
│ ├── middleware/auth.js # JWT + RBAC middleware
│ └── routes/ # 14 API route files
└── frontend/
└── src/
├── app/ # 14 pages (Next.js App Router)
├── components/ # Layout, sidebar
└── lib/ # API client, auth context, utils