Offline billing, stock and udhaar (customer credit) for any small shop.
Sell in a few taps, hand the customer a proper invoice, and know today's cash and profit at a glance.
Features · Screenshots · How a sale works · Getting started · Using the app · Documentation
Dukaan (دکان, "shop") is a working name. The first client is a mobile-phone shop in Lahore, and the app is built to work just as well for a grocery, clothing, pharmacy or hardware shop.
| 🛒 Fast selling | Tap Sell, pick a category, tap items to fill the cart. Search by name or scan a barcode to add an item instantly. Discounts, optional tax, Cash / Bank / JazzCash-Easypaisa. |
| 🧾 Real invoices | A4 invoice templates (Modern, Classic, Minimal) and thermal slips (Classic, Compact, Bold) with your logo, colour, tax number and terms. Share the PDF on WhatsApp, print A4, or print on a 58/80 mm Bluetooth printer. |
| 📦 Stock that counts itself | Every sale, purchase, return and correction updates stock. Items live in categories, with low-stock alerts and an optional per-unit serial / IMEI for phones and electronics. |
| 💰 Two prices, true profit | Each item has a purchase price and a sale price with live profit per unit. Reports use what each batch really cost (FIFO), so profit stays correct when buying prices change. |
| 🤝 Udhaar and suppliers | Customer and supplier balances, record payments, full history per person, and a one-tap WhatsApp reminder. |
| 📊 Home and reports | Today's money in hand, sales, profit and margin; a 7-day chart; reports by day or month with items sold, expenses and CSV export. |
| 🔐 Safe by design | Works fully offline. PIN / fingerprint lock, a "hide cost" switch for the counter, backup file export and import, and sales that are never deleted (voids and returns keep the history). |
| 👥 Accounts and sync (optional) | Owner and staff accounts, live sync between the shop's phones, and a cloud copy, all on Firebase's free plan. Without Firebase the app runs local-only. |
| 🌐 English and Urdu | Full Urdu translation with a right-to-left layout, Nastaliq type, and lakh-style amounts (1,77,700). |
More screens (sign-in, stock, parties, settings, Urdu)
Getting in
![]() Landing |
![]() Log in |
![]() Create account |
Selling
![]() Choose a category |
![]() Cart with IMEI line |
![]() Payment and customer |
![]() Thermal slip |
Stock
![]() Item: prices, profit, history |
![]() Add stock: pick items |
![]() Supplier, quantity, cost |
Money and settings
![]() Customers and suppliers |
![]() Customer history |
![]() All bills |
![]() More: reports, settings |
![]() Invoice design |
![]() Home in Urdu (right to left) |
- Tap Sell. A sheet opens with your categories.
- Open a category and tap items; each tap adds one to the cart (the orange badge shows how many). Scanning a barcode adds the item straight away.
- Tap Done, check quantities, add a discount if needed, then Charge.
- Enter what the customer paid (anything less becomes udhaar on their account) and Save sale.
- Share the invoice on WhatsApp, print A4, or switch to Slip for the thermal printer.
Dukaan is not on the Play Store yet. To try it, build the debug APK (below) and install it with
./gradlew installDebug, or copy app/build/outputs/apk/debug/app-debug.apk to an Android 8.0+
phone and open it.
On first launch, tap Get started, create an account and enter your shop's name and type (a build without Firebase skips the account and goes straight to the shop details). Then add your first item and make a sale.
You need: Android Studio (or the Android SDK with compileSdk 37) and JDK 17 or newer.
git clone <this repo> dukaan && cd dukaan
./gradlew assembleDebug # build the debug APK
./gradlew installDebug # install on a connected phone or emulator
./gradlew testDebugUnitTest # run the JVM tests (no emulator needed)
./gradlew lintDebug # lint; hard-coded text and left/right layout are errorsAdd --offline when the Gradle cache is already warm. A change is ready when
testDebugUnitTest lintDebug assembleDebug are all green.
Accounts, staff, live sync and Crashlytics switch on only when a Firebase config is present:
- Create a Firebase project (the free Spark plan is enough) and add an Android app with the
package
app.dukaan.android. - Enable Authentication (Email/Password and Google) and Cloud Firestore.
- Download
google-services.jsonintoapp/(it is gitignored). - Paste
firestore.rulesinto Firestore → Rules and publish.
Without the file the app builds and runs fully offline as a single-phone shop. Details are in docs/ACCOUNTS.md and docs/SYNC.md.
| I want to… | Where |
|---|---|
| Make a sale | Sell button (centre of the bottom bar) |
| Add a new product | Items → Add item: name, category, purchase and sale price, barcode, opening stock |
| Record stock I bought | Home → Add stock: pick items, supplier, quantity and cost |
| Track phones by IMEI | Add item → More options → Track each unit by serial / IMEI |
| Take money from a customer who owes | Parties → the customer → Receive |
| Void a bill or take a return | More → Sales → open the bill |
| Record rent, salary, bills | Home → Expense |
| See profit for a day or month | Home → Reports; Export CSV for a spreadsheet |
| Change the invoice look | More → Invoice design |
| Connect a thermal printer | More → Receipt printer (pair it in Android Bluetooth settings first) |
| Hide costs from customers at the counter | The 👁 eye button on Home or Items |
| Switch to Urdu | More → Language |
| Keep a backup | More → Backup and restore → export a file (save it to Drive or WhatsApp) |
| Language and UI | Kotlin 2.4, Jetpack Compose (Material 3), Navigation-Compose |
| Data | Room 3 on bundled SQLite; money as Long paisa, quantities as Long milli-units |
| Ledger | Every stock change goes through one LedgerService transaction; stock, FIFO batch costs and IMEI status are rebuilt from facts, so phones that sync always agree |
| Hardware | CameraX + ML Kit barcode scanning (on-device, offline), ESC/POS raster printing over Bluetooth, Android print for A4 |
| Accounts | Firebase Auth + Firestore (optional), app lock with BiometricPrompt |
| Build | AGP 9.4, Gradle 9.6, KSP; compileSdk 37, targetSdk 36, minSdk 26; CI in .github/workflows/ci.yml |
app/src/main/java/app/dukaan/android/
├── core/ db · ledger · money · receipt · printer · scan · backup · lock · account · sync · ui
└── feature/ auth · onboarding · home · sell · items · purchase · parties · expenses · reports · more
| Doc | What's in it |
|---|---|
| CLAUDE.md | Rules and commands for anyone (human or agent) changing the code |
| docs/PRD.md | What we're building and for whom; user stories |
| docs/ARCHITECTURE.md | Data model, transactions, FIFO, invariants |
| docs/DESIGN.md | Design system, screens, flows, receipt layout |
| docs/PLAN.md | Milestones with checklists |
| docs/PROGRESS.md | Current status |
| CHANGELOG.md | What changed, per version |
| docs/DECISIONS.md | Every product and tech decision, and why |
| docs/TESTING.md | Test strategy and required cases |
| docs/RELEASE.md | Signing, Play Store, Crashlytics, Data safety, listing, migrations |
| docs/PRIVACY.md | Privacy policy draft |
| docs/ACCOUNTS.md | Accounts, staff, cloud copy: design, limits, Firestore layout |
| docs/SYNC.md | Live sync between a shop's phones: merging, clashes, cost |
| docs/FUTURE_FEATURES.md | Backlog of deferred features |
Screenshots are from the debug build on an Android 16 emulator with sample data from a demo mobile shop. Fonts: IBM Plex Sans and Noto Nastaliq Urdu (SIL Open Font License).























