Track shop debts fast, even with no internet.
Daftar is a mobile-first debt ledger for small shops and grocery stores that need a simple replacement for paper notebooks. It helps Arabic-speaking shop owners in Iraq record customer debts and payments quickly, see balances instantly, and keep working offline with reliable data backup and synchronization.
Shop Owner Hassan, 41 - Owns a small neighborhood grocery store in Iraq and currently uses a paper notebook to track customer debts. He wants something simple, fast, and reliable on an Android phone.
Store Clerk Noor, 27 - Helps at the counter and uses the same shop account on a shared phone or a second device. She needs a simple interface with minimal typing and clear confirmation of actions.
Owner Samir, 52 - Runs a shop with one main Android phone and sometimes a backup phone. He cares most about data safety and being able to restore records if the device is lost.
Hassan runs a small grocery store and used to keep customer debts in a worn notebook. When the notebook was misplaced or the phone was offline, he had no reliable way to know who owed what.
With Daftar, Hassan adds a customer in seconds, records a debt instantly, and sees the balance update right away. Later, when the network returns, the app syncs safely in the background without changing the financial history.
Now Hassan can answer customer questions with confidence, recover his records if the phone is replaced, and spend less time calculating balances by hand. The store becomes faster at the counter and safer for long-term record keeping.
Team & resourcing - Solo indie developer, with optional part-time design or QA support during pilot.
Paste this into Cursor, Bolt, Lovable, or v0 to start building.
Build an Android-first Flutter app called Daftar for Arabic-speaking small shop owners in Iraq. Core product: a simple offline-first debt ledger that replaces a paper notebook. Users can create customers, record debts and payments, view running balances, see a customer statement, and sync data across multiple devices for the same shop account. Tech stack: Flutter, Riverpod, Drift with SQLite for local storage, Supabase Auth for shared shop login, Supabase PostgreSQL for remote storage, and a custom sync engine. Use stable UUIDs for shops, customers, transactions, and sync operations. Primary screens: 1. Splash/onboarding and shop login/register 2. Dashboard with total outstanding debt, customer count with balances, and recent transactions 3. Customer list with search by name or phone 4. Add/edit customer screen 5. Customer detail screen with balance and transaction history 6. Add debt/payment transaction screen 7. Statement screen with running balance after each transaction 8. Sync status and backup/restore screens Important rules: All core actions must work offline. Save locally first, then queue sync. Transactions must be append-only. Never use floating point for money; store Iraqi dinar amounts as integers. Use RTL Arabic UI with large touch targets and clear error messages. Prevent duplicate submissions using local transaction UUIDs and server idempotency keys. Implement RLS so each shop only sees its own rows. Do not embed service-role credentials in the app. Data model: Shops, customers, financial_transactions, sync_operations, and backup metadata. Customers have name, optional phone, optional notes, shop_id, timestamps. Transactions have id, shop_id, customer_id, type (debt/payment/reversal), amount, note, reference_transaction_id for reversals, created_at, created_by_device_id, sync status, and idempotency key. Behavior: Debt increases balance, payment decreases balance, reversal negates a referenced transaction, overpayments should be blocked in MVP unless explicitly handled as a correction, duplicate customers should be warned about, and sync should retry safely after transient failures or lost acknowledgments. Show pending, synced, and failed states clearly. Build the app with clean architecture, unit tests for balance calculations, integration tests for sync, and Arabic RTL UI coverage. Keep the MVP simple and production-ready for a solo developer.
Prompt: Generate a Complete Product Requirements Document (PRD) Act as a senior Product Manager, UX researcher, and software architect. Create a comprehensive, implementation-ready Product Requirements Document (PRD) for a mobile application called Daftar (دفتر), a simple debt-tracking application for small shops and grocery stores. The PRD must be practical for a solo indie developer to build, test, and launch. Avoid unnecessary enterprise features, vague requirements, and overengineering. 1. Product Overview Product concept: A mobile-first digital debt ledger that replaces paper notebooks used by small shop owners to record customer debts and payments. Target market: Small grocery stores, neighborhood shops, and independent retailers, initially targeting Arabic-speaking users in Iraq. Primary platform: Android. Interface language: Arabic, with full right-to-left (RTL) support. Business model: Initially free for testing and validation. Propose realistic monetization options for a later stage, but do not make payment processing part of the MVP. Primary value proposition: Record debts and payments quickly, see accurate customer balances, and continue working without an internet connection. 2. Core Product Principles The product must follow these principles: 1. Offline-first: essential operations must work without internet access. 2. Local-first responsiveness: saving a debt or payment should immediately update the interface and local database. 3. Financial correctness: never lose, duplicate, or silently modify a financial transaction. 4. Simplicity: the target user may have limited technical experience. 5. Minimal friction: common tasks should require as few steps as reasonably possible. 6. Data portability: users must be able to back up and restore their records. 7. Future extensibility: the architecture should support multiple devices per shop without requiring a complete redesign. 3. Technical Constraints Use the following proposed technology stack: - Flutter for the Android application. - SQLite using Drift for local persistence. - Supabase Auth for authentication. - Supabase PostgreSQL for the shared remote database. - A custom synchronization engine for offline operations and remote updates. - Riverpod for state management, unless the PRD identifies a compelling reason to choose an alternative. Do not assume that Supabase automatically synchronizes the local SQLite database. Specify the synchronization mechanism, conflict-handling rules, retry behavior, and data-integrity guarantees. 4. Authentication and Account Model The initial product uses one shared shop account and one password for all shop employees. Requirements: - One account represents one shop. - Multiple devices may sign in using the same shop account. - All authorized devices belonging to the same shop access the same customer and transaction records. - Data from different shops must remain strictly isolated. - The application must not expose privileged Supabase service-role credentials. - The PRD must explicitly document the limitations of shared credentials, especially the inability to reliably identify individual employees. - Do not introduce individual employee accounts or mandatory employee PINs into the MVP unless you identify a critical security requirement. If suggested, classify them as a future enhancement. 5. MVP Scope Define the MVP around the following capabilities. A. Customer Management - Add a customer. - Edit customer information. - Store customer name, optional phone number, and optional notes. - Search by name or phone number. - View each customer's current outstanding balance. - View a customer's complete transaction history. - Prevent accidental duplicate customer creation where reasonably possible. B. Debt Transactions - Record a new debt against a customer. - Enter the amount and an optional note. - Save transactions locally even when offline. - Display the updated customer balance immediately. - Record transaction timestamps consistently. - Prevent accidental duplicate transaction submissions. C. Payment Transactions - Record full or partial customer payments. - Reduce the outstanding balance correctly. - Reject invalid amounts and clearly handle overpayments. - Preserve the historical transaction record. - Support corrections through documented reversal transactions rather than silently deleting financial history. D. Customer Statements - Display debts and payments in chronological order. - Show the balance after each transaction. - Show total debt, total payments, and remaining balance. - Provide a simple shareable or printable statement if feasible within the MVP. E. Dashboard - Display total outstanding debt. - Display the number of customers with outstanding balances. - Show recent transactions. - Provide prominent actions for adding a customer, recording a debt, and recording a payment. - Make the dashboard useful without requiring an internet connection. F. Backup and Recovery - Provide a documented backup and restore strategy. - Protect exported backups from accidental exposure where feasible. - Ensure that restoring data does not silently duplicate transactions. - Clearly distinguish a local backup from a remote backup. - Explain how the user can recover data if the phone is lost or damaged. 6. Offline-First Architecture and Synchronization Treat this as a critical part of the PRD. Specify: - The local database schema and the remote database schema. - Stable UUIDs for shops, customers, transactions, and synchronization operations. - A durable local synchronization queue. - Atomic local writes: a transaction and its queue entry must be committed together. - Idempotent remote writes, enforced by database constraints and server-side logic. - Retry strategies for transient failures. - Behavior when a request reaches the server but its acknowledgment is lost. - How remote changes from other devices are downloaded. - How deletions or corrections are represented, if supported. - How the application displays pending, successful, and failed synchronization states. - How users recover from permanent synchronization failures. - How data integrity is preserved when multiple devices are offline simultaneously. Financial transactions must be append-only in the MVP, except for explicitly documented reversal transactions. Do not resolve conflicting financial transactions using a simplistic "last write wins" strategy. Define separate conflict policies for customer profile edits and financial transactions. The PRD must also specify a realistic MVP synchronization strategy. Avoid implementing a complex distributed synchronization system unless it is necessary for the stated requirements. 7. Financial Rules Specify the precise business rules for calculating customer balances. At minimum: - Debt transactions increase the balance. - Payment transactions decrease the balance. - Reversal transactions negate the effect of the referenced transaction. - Balances must be calculated consistently from valid transactions. - Store monetary amounts as integers in the smallest supported currency unit, avoiding floating-point arithmetic. - Support Iraqi dinars as the initial currency. - Define behavior for zero amounts, negative amounts, overpayments, and corrections. - Ensure that local and remote balance calculations agree. Provide examples and acceptance criteria for each rule. 8. UX and Accessibility Design for small-shop owners who need to work quickly. Specify: - Arabic RTL layouts. - Clear Arabic labels and error messages. - Large, touch-friendly controls. - Minimal typing for routine tasks. - Fast customer search. - Clear distinction between debt, payment, and remaining balance. - Confirmation for destructive or financially significant actions. - Visible offline and synchronization status. - Accessible contrast and readable typography. - Graceful behavior on low-cost Android devices. Include user flows for: 1. First launch and shop registration. 2. Signing in to an existing shop account. 3. Adding a customer. 4. Recording a new debt. 5. Recording a partial payment. 6. Reviewing a customer statement. 7. Recording transactions while offline. 8. Restoring connectivity and synchronizing. 9. Handling a synchronization failure. 10. Backing up and restoring data. 9. Data Model and Security Propose a minimal database schema for: - Shops. - Customers. - Financial transactions. - Synchronization metadata. - Audit or correction records, where appropriate. Specify primary keys, foreign keys, unique constraints, indexes, timestamps, and required fields. Security requirements: - Row Level Security (RLS) must isolate shop data. - A client must not be able to access another shop's records by changing a shop ID. - Financial transaction creation and idempotency must be validated server-side. - Do not embed privileged credentials in the mobile application. - Define secure local storage and backup handling. - Explain the limitations of a shared account. - Avoid storing unnecessary personal information. 10. Explicitly Out of Scope for the MVP Exclude: - Inventory management. - Full point-of-sale functionality. - Employee payroll. - Accounting integrations. - Multiple branches. - Customer-facing applications. - Automated messaging and reminders. - Payment gateways. - AI features. - Advanced analytics. - Subscription billing. List these as possible future features only if supported by a clear user need. 11. Product Requirements and Prioritization Organize requirements into: - P0: Essential for launch. - P1: Important but deferrable. - P2: Future enhancements. For every P0 requirement, include: - Unique requirement ID. - Description. - User story. - Preconditions. - Expected behavior. - Acceptance criteria using Given/When/Then where appropriate. - Relevant failure cases. - Dependencies. Ensure every requirement is testable and unambiguous. 12. Non-Functional Requirements Define measurable targets where possible for: - App startup and responsiveness. - Local database read/write performance. - Offline availability. - Data durability. - Synchronization reliability. - Security and privacy. - Backup and restore. - Low-end Android device support. - Localization. - Crash recovery. Do not invent guarantees that cannot reasonably be validated. Label assumptions and proposed targets clearly. 13. Testing Strategy Include: - Unit tests for balance calculations. - Local database tests. - Integration tests for synchronization. - Tests for duplicate submissions. - Tests for lost acknowledgments and retries. - Tests for simultaneous offline transactions on multiple devices. - Tests for customer profile conflicts. - Tests for corrupted or incomplete backups. - Security tests for shop-data isolation. - Arabic RTL UI tests. - Tests involving app termination during a local write or synchronization operation. Define the release-blocking conditions for financial data loss, duplicate transactions, incorrect balances, and cross-shop data exposure. 14. Delivery Plan Create an incremental roadmap suitable for one developer: Phase 1: Product skeleton and local database. Phase 2: Customer management and financial transactions. Phase 3: Customer statements and dashboard. Phase 4: Authentication and Supabase integration. Phase 5: Offline synchronization and conflict handling. Phase 6: Backup, recovery, testing, and pilot release. For each phase, list deliverables, dependencies, exit criteria, and major risks. Do not provide unrealistically precise time estimates without stating assumptions about developer experience and available working hours. 15. Required PRD Output Structure Produce the final PRD in this order: 1. Executive summary. 2. Problem statement. 3. Product goals and non-goals. 4. Target users and user personas. 5. Jobs to be done. 6. User stories and user flows. 7. Functional requirements with IDs and acceptance criteria. 8. MVP scope and prioritization. 9. UX and screen specifications. 10. Data model and database schema. 11. Technical architecture. 12. Offline-first synchronization design. 13. Financial correctness and integrity rules. 14. Authentication, security, and privacy. 15. Non-functional requirements. 16. Testing strategy. 17. Delivery roadmap. 18. Risks, assumptions, and unresolved decisions. 19. MVP launch checklist. 20. Future opportunities. Final Instructions Write a professional, detailed, internally consistent PRD that a solo developer can use as the primary implementation reference. Clearly distinguish confirmed product decisions from assumptions and recommendations. Do not silently introduce new product requirements. Where a critical decision remains unresolved, state the assumption, explain the trade-off, and recommend the simplest safe default. Prioritize data correctness, offline usability, ease of use, and a realistic implementation scope over feature quantity.
Design by The Resonance | Powered by GPC – The AI Transformation Company