A cross-platform Flutter application for tracking personal expenses and budgets with analytics. Built with clean architecture, state management, and offline-first approach.
-
Dashboard
- Real-time current balance (Income - Expenses)
- Recent transactions list (last 10)
- Interactive pie chart showing expenses by category
- Responsive layout for all screen sizes
-
Transactions Management
- Add, edit, and delete transactions
- Categories for Income (Salary, Business, Investment, Gift, Other)
- Categories for Expenses (Food, Travel, Bills, Shopping, Entertainment, Healthcare, Education, Other)
- Input validation and error handling
- Swipe-to-delete with undo functionality
- Offline-first storage using Hive
- Filter by transaction type (All, Income, Expense)
-
Budget Management
- Set monthly budgets per category
- Visual progress indicators with color-coded alerts
- Budget status tracking:
- 🟢 Green: Under 80% of budget
- 🟠 Orange: 80-100% of budget (approaching limit)
- 🔴 Red: Over budget
- Month navigation to view historical budgets
- ✅ Light/Dark Mode Toggle - System-aware theme with manual toggle
- ✅ Smooth Animations - Animated charts and transitions
- ✅ CSV Export - Export transactions to CSV format
- Tap the download icon (📥) in the Transactions screen app bar
- File is saved to the Downloads folder on your device
- Includes all filtered transactions (All/Income/Expense)
- CSV columns: ID, Title, Amount, Date, Category, Type, Description
- Can be opened in Excel, Google Sheets, or any CSV reader
- ✅ Undo Delete - Restore accidentally deleted transactions
- Swipe left on any transaction to delete it
- A snackbar appears with an "UNDO" button
- Tap "UNDO" within a few seconds to restore the transaction
lib/
├── models/ # Data models with Hive adapters
│ ├── transaction_model.dart
│ ├── budget_model.dart
│ └── *.g.dart # Generated Hive adapters
├── screens/ # UI screens
│ ├── dashboard_screen.dart
│ ├── transactions_screen.dart
│ ├── budgets_screen.dart
│ ├── add_transaction_screen.dart
│ └── add_budget_screen.dart
├── widgets/ # Reusable widgets
│ ├── balance_card.dart
│ ├── expense_chart.dart
│ └── transaction_list_item.dart
├── providers/ # State management
│ ├── transaction_provider.dart
│ ├── budget_provider.dart
│ └── theme_provider.dart
├── services/ # Business logic
│ ├── storage_service.dart
│ └── csv_export_service.dart
└── main.dart # App entry point
test/
├── models/ # Model tests
├── widget_test.dart # Widget and provider tests
└── ...
Choice: Provider
Provider was chosen for this project because:
- ✅ Official Flutter recommendation
- ✅ Simple and intuitive API
- ✅ Excellent for small to medium apps
- ✅ Great performance with ChangeNotifier
- ✅ Easy testing and debugging
- ✅ Built-in dependency injection
Alternative Considered:
- Riverpod: More powerful but overkill for this scope
- Bloc: More boilerplate, better for large teams
TransactionProvider: Manages transaction CRUD, balance calculations, category aggregationsBudgetProvider: Handles budget CRUD, budget status checks, alertsThemeProvider: Manages theme mode persistence and switching
Choice: Hive
Hive was selected because:
- ✅ Fast, pure Dart NoSQL database
- ✅ Type-safe with code generation
- ✅ Excellent offline support
- ✅ Minimal boilerplate
- ✅ Cross-platform compatibility
- ✅ Better performance than SQLite for this use case
Storage Boxes:
transactions: Stores all transaction recordsbudgets: Stores monthly budget configurationssettings: Stores app preferences (theme mode)
- Flutter SDK 3.0.0 or higher
- Dart SDK 3.0.0 or higher
- Android Studio / VS Code with Flutter extensions
- Android SDK (for Android) or Xcode (for iOS)
- Clone the repository
git clone https://github.com/swatv3nub/FinTrack.git
cd fintrack- Install dependencies
flutter pub get- Generate Hive adapters (already included in repo, but if needed)
flutter pub run build_runner build --delete-conflicting-outputs- Run the app
# Debug mode
flutter run
# Release mode
flutter run --release
# Specific device
flutter run -d <device_id>- Run tests
# All tests
flutter test
# With coverage
flutter test --coverage
# Specific test file
flutter test test/widget_test.dartThe project includes comprehensive testing:
-
✅ Unit Tests
- Transaction model tests (creation, copyWith, toMap)
- Budget model tests (creation, copyWith, toMap)
- Category validation tests
-
✅ Widget Tests
- BalanceCard display tests
- TransactionListItem rendering tests
- Theme switching tests
-
✅ Provider Tests
- Transaction CRUD operations
- Balance calculations
- Expense aggregation by category
- Budget status checks
- Undo delete functionality
# Run all tests
flutter test
# Run with coverage report
flutter test --coverage
lcov --summary coverage/lcov.info
# Run specific test suite
flutter test test/models/transaction_model_test.darttest/models/transaction_model_test.dart- Transaction model unit teststest/models/budget_model_test.dart- Budget model unit teststest/widget_test.dart- Widget and provider integration tests
provider: ^6.1.1 # State management
hive: ^2.2.3 # NoSQL database
hive_flutter: ^1.1.0 # Flutter integration for Hive
path_provider: ^2.1.1 # File system paths
fl_chart: ^0.65.0 # Beautiful charts
csv: ^5.1.1 # CSV export functionality
intl: ^0.18.1 # Internationalization
cupertino_icons: ^1.0.6 # iOS-style iconsflutter_test: # Testing framework
flutter_lints: ^3.0.1 # Flutter linting rules
hive_generator: ^2.0.1 # Hive adapter generator
build_runner: ^2.4.6 # Code generation- Material Design 3 with custom theming
- Card-based layout for better visual hierarchy
- Color-coded indicators (green/orange/red) for budget status
- Swipe gestures for intuitive deletion
- Bottom navigation for easy access to main features
- Pull-to-refresh on dashboard
- Lazy loading of transactions with ListView.builder
- Efficient state updates with ChangeNotifier
- Offline-first approach reduces network dependency
- Optimized chart rendering with fl_chart
- Clean architecture with separation of concerns
- Consistent naming conventions
- Comprehensive documentation
- Flutter lints enabled
- Type-safe data models with Hive
- Error handling and validation throughout
Potential improvements for future versions:
- Multi-currency support
- Cloud sync with Firebase
- Recurring transactions
- Advanced analytics and reports
- Bill reminders and notifications
- Biometric authentication
- Data import from bank statements
- Category customization
- Budget templates