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