BSMM: Bhupu Sainik Mini Mart
Overview
An offline-first inventory, billing and khata app for small shops, with Supabase sync between staff phones, and its website and admin dashboard.
BSMM runs a shop from one phone: the counter, the stock, the credit book (khata) and the reports. It was built for Bhupu Sainik Mini Mart, a family shop in Pokhara, and is free for any shop.
The app
- Flutter with BLoC, feature modules and a local SQLite database (drift): every record lives on the phone, so the shop keeps selling without the internet.
- Money in paisa, quantities in milli-units, and stock that only changes through a ledger: sales, purchases and payments are voided or reversed, never edited.
- Accounts and shops on Supabase, with staff invitations, ownership hand-over, account deletion and deactivation, and row-level security that a stranger with the public key can't get past.
- Sync between every phone in a shop through database functions that check membership on each call, and push notifications for invitations through an edge function.
The website and dashboard
- Next.js 16 site at bhupusainikminimart.com.np: a home page that walks through the shop aisle by aisle beside the app's real screens, the features, the privacy policy, terms and account deletion the stores ask for, and a blog.
- An admin dashboard for the app itself: accounts, shops, staff, invitations and sync limits, through admin-only database functions that return counts, never a shop's records.
- The app link /share sends each phone to its store and is counted without cookies; the browser never talks to Supabase.