A lightweight, offline-first inventory web app for small shops in Biratnagar, Nepal (kirana, hardware, clothing, wholesalers).
- Frontend: HTML + Tailwind CSS (CDN) — no build step
- Backend: Node.js + Express
- Database: SQLite file (
database.sqlite) — works without internet after setup
Download from https://nodejs.org (LTS version).
On Windows, run the installer and restart your computer if asked.
cd d:\BCA\Project\EMS\backendnpm installnpm run seednpm startGo to: http://localhost:3000
- Enter your Shop Name (shows in the top bar) and PIN:
1234 - Or click Continue without PIN for quick local use (you can still set the shop name).
EMS/
├── frontend/ # HTML pages + JS (served by Express)
│ ├── index.html # Dashboard
│ ├── products.html
│ ├── stock.html
│ ├── sales.html
│ ├── reports.html
│ └── js/
├── backend/
│ ├── server.js # Main server
│ ├── db.js # SQLite setup
│ ├── seed.js # Sample data
│ └── routes/ # REST API
├── database.sqlite # Created automatically (your data)
└── README.md
| Page | What it does |
|---|---|
| Dashboard | Total products, stock value, today's sales, low stock alerts |
| Products | Add, edit, delete, search, filter by category |
| Stock | Add stock (purchase) or reduce stock manually |
| Sales | Record sales, auto price & stock update |
| Reports | Daily sales, profit estimate, low stock, CSV export/import |
Currency: Nepalese Rupees (Rs.)
Categories: Kirana, Hardware, Clothes, Other
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/dashboard |
Dashboard stats |
| GET/POST/PUT/DELETE | /api/products |
Product CRUD |
| POST | /api/stock/purchase |
Add stock |
| POST | /api/stock/reduce |
Reduce stock |
| POST | /api/sales |
Record sale |
| GET | /api/sales?date=YYYY-MM-DD |
Sales for a day |
| GET | /api/reports/daily?date=... |
Daily report |
| GET | /api/reports/low-stock |
Low stock list |
| GET | /api/reports/export/csv |
Download backup |
| POST | /api/reports/import/csv |
Restore from CSV |
| POST | /api/auth/login |
Admin PIN login |
- Install once with internet (for
npm installand CDN on first load). - After that, run
npm starton the shop laptop — no internet needed for daily work. - All data stays in
database.sqliteon your computer.
Tip: Copy database.sqlite to a USB drive weekly as backup.
Default PIN is 1234, stored in the database settings table.
To change via API (after server is running):
curl -X POST http://localhost:3000/api/auth/change-pin -H "Content-Type: application/json" -d "{\"oldPin\":\"1234\",\"newPin\":\"5678\"}"| Problem | Solution |
|---|---|
npm not found |
Install Node.js and reopen terminal |
| Port 3000 in use | Set another port: set PORT=3001 then npm start (Windows) |
| Empty dashboard | Run npm run seed in backend folder |
| Page looks plain | First visit needs internet for Tailwind/Lucide CDN |
- Sunflower Oil 1L — Kirana
- Cement 50kg — Hardware
- Men Cotton Shirt — Clothes
- Surf Excel 1kg — Kirana
- PVC Pipe 2 inch — Hardware (low stock)
- School Notebook — Other
Built for small businesses in Biratnagar, Nepal — simple, fast, and easy for non-technical shop owners.