cedar-flutter

byBheda Nikhilkumar

๐Ÿ“ฑ Product Requirements Document (PRD) Product Name: MyMoney (Offline Expense Tracker) ๐ŸŽฏ Objective Build a completely offline personal finance app using Flutter that helps users: Track income & expenses Categorize spending View analytics (charts) Plan budgets Secure data locally โš ๏ธ No backend, no cloud sync. All data stored locally using SharedPreferences. ๐Ÿงฑ Tech Overview Framework: Flutter Storage: SharedPreferences (JSON encoded objects) Charts: fl_chart (or similar) State Management: Provider / Riverpod (simple) Security: Local passcode (stored hashed in SharedPreferences) ๐Ÿงฉ Core Features 1. ๐Ÿ’ฐ Transaction Management Add income / expense / transfer Edit & delete transactions Assign category Payment mode (Cash / Card / Wallet) Date & time selection 2. ๐Ÿ“Š Analytics (Interactive Charts) Pie chart for expense distribution Monthly summary: Total Income Total Expense Balance Category-wise breakdown 3. ๐Ÿท๏ธ Category Management Default categories (Food, Bills, Shopping, etc.) Create unlimited custom categories Separate: Income categories Expense categories 4. ๐Ÿ“… Budget Planning Monthly budget per category Track: Spent amount Remaining balance Visual progress bar Alerts (UI-based, no push notifications) 5. ๐ŸŽจ Themes Multiple color themes Light / Dark mode Accent color customization 6. ๐Ÿ” Passcode Protection 4-digit passcode Lock app on launch Optional enable/disable 7. ๐Ÿ“ฑ Widgets (Simulated In-App Widget View) Quick summary card: Total balance Last transaction (Note: Real OS widgets optional later) ๐Ÿ“บ Screen-wise Breakdown ๐Ÿ  1. Home / Records Screen Purpose: View all transactions UI Elements: Header: Month selector (โ† Jan 2021 โ†’) Summary: Income Expense Total balance Transaction list: Grouped by date Each item shows: Category icon Title Payment type Amount (color-coded) Actions: โž• Floating button โ†’ Add transaction Tap โ†’ Edit transaction Swipe โ†’ Delete โž• 2. Add / Edit Transaction Screen Purpose: Add new entry Fields: Type: Income / Expense / Transfer Amount (numeric keypad UI) Category selector Account (Card / Wallet / Cash) Note (optional) Date & Time Actions: Save Cancel ๐Ÿ“Š 3. Analysis Screen Purpose: Spending insights Components: Pie chart (expense distribution) Category legend Time filter: Monthly Custom range Data: Category % Total per category ๐Ÿ’ธ 4. Budget Screen Purpose: Manage budgets Sections: Total Budget vs Spent Category budgets list: Limit Spent Remaining Progress bar States: Normal โ†’ Green Warning โ†’ Yellow Exceeded โ†’ Red Actions: Set/Edit budget Remove budget ๐Ÿฆ 5. Accounts Screen Purpose: Manage money sources Default Accounts: Wallet Card Features: Add account Edit name/icon View balance per account ๐Ÿท๏ธ 6. Categories Screen Purpose: Manage categories Sections: Income categories Expense categories Features: Add category Edit / delete Icon & color selection ๐Ÿ” 7. Passcode Screen Purpose: Secure app Flow: First time โ†’ Set passcode Later โ†’ Enter passcode Features: Enable/Disable lock Reset passcode ๐ŸŽจ 8. Theme Settings Screen Purpose: Personalization Options: Light / Dark mode Accent color picker Preview UI ๐Ÿ“Š 9. Dashboard Widget Screen (In-App) Purpose: Quick overview Cards: Total balance Last transaction Monthly summary ๐Ÿ’พ Data Model (Stored in SharedPreferences) All data stored as JSON strings. Transaction Model { "id": "uuid", "type": "expense", "amount": 120.0, "categoryId": "cat_1", "account": "card", "note": "Groceries", "date": "2026-04-04T10:00:00" } Category Model { "id": "cat_1", "name": "Food", "type": "expense", "icon": "๐Ÿ”", "color": "#FF5733" } Budget Model { "categoryId": "cat_1", "limit": 500, "month": "2026-04" } Settings Model { "theme": "dark", "accentColor": "#6C63FF", "passcodeEnabled": true, "passcodeHash": "****" } ๐Ÿ”„ Data Handling Logic Store lists as JSON arrays: transactions categories budgets On app start: Load all from SharedPreferences On update: Overwrite full list (simple approach) โš™๏ธ Key Flows Add Expense Flow Tap โž• Enter details Save Update: Transactions list Budget usage Analytics Budget Tracking Logic Remaining = Limit - Total Expenses (category, month) Analytics Calculation Group transactions by category Sum amounts Convert to percentage ๐Ÿšซ Limitations (Intentional) No cloud sync No multi-device support No real-time notifications SharedPreferences size limitations ๐Ÿš€ Future Enhancements (Optional) SQLite (for scalability) Export to CSV Backup/Restore Real home screen widgets Biometric authentication โœ… Success Criteria Smooth offline performance Simple UX (1โ€“2 taps for adding expense) Clear financial insights Zero data loss locally

HomeBudgetPasscode
Home

Comments (0)

No comments yet. Be the first!

Budget design preview
Home: Browse Transactions
Add Transaction: Add Expense
Analytics: View Summary
Settings: Set Passcode
Settings: Choose Theme