Engal Sandhai is a web-based, billing and realtime stock management system built for a college campus vegetable store.
It connects faculty buyers (~300 daily active users) with admin faculty (10 users) who manage daily stock and prices.
The system generates bills, accepts static-QR-based payments (faculty upload payment screenshots), decrements stock atomically, and provides realtime stock updates across connected clients.
- Single-server, intranet-only web app for campus vegetable billing.
- Two roles:
- Admin (5 faculty) → manage stock, prices, and orders.
- Faculty (all others) → place orders, upload payment screenshot, receive bills.
- Payment flow:
- Static QR is displayed on the bill.
- Faculty uploads payment screenshot.
- Admin verifies payment manually.
- Stock updates:
- Stock decrements only when payment screenshot is uploaded.
- Updates are processed atomically to prevent overselling.
- Realtime updates via WebSockets.
- 🔑 Role-based authentication (employee_id + password) with forced password reset option.
- 🛠️ Admin panel:
- Add/update vegetables (photo, quantity, rate).
- View & filter orders.
- Verify/reject payments.
- Revert stock when needed.
- 🛒 Buying panel:
- Browse vegetables with stock, price, and photo.
- Add to cart & place multi-item orders.
- Bill page with static admin QR.
- Upload payment screenshot.
- 🔐 Per-order session rule → automatic logout after successful payment upload.
- ⚡ Realtime updates:
- Stock updates across all connected faculty.
- New order notifications for admins.
- 🧮 Atomic multi-item order processing → no overselling.
- 🖼️ Local file storage for:
- Vegetable photos.
- Payment screenshots.
- 🪶 Lightweight, self-hosted stack → no paid cloud required.
- ⚛️ React (Vite) + TypeScript
- 🎨 Tailwind CSS
- 🔄 React Router, Axios
- 🔔 WebSocket client
- 🔐 Firebase Authentication
- 📂 Firestore Database
- 📡 WebSockets for realtime updates
- Admin updates daily stock (vegetable name, qty, rate, photo).
- Faculty places order → system generates bill with static QR.
- Faculty uploads payment screenshot.
- Stock decrements atomically after upload.
- Admin verifies payment → order marked as completed.
- Realtime notifications keep all clients updated.