A sophisticated portfolio management application for Small Savings Schemes, built with Flutter, Riverpod, and Firebase.
For detailed instructions on setting up a new development machine, managing release keys, or recovering from a lost environment, please refer to the Setup & Disaster Recovery Guide.
- Clone the repository.
- Install dependencies:
flutter pub get
- Initialize Firebase (if not already configured):
flutterfire configure
Runs the app connected to your live Firebase project.
flutter runRuns the app connected to the local Firebase Emulator Suite. This is recommended for development to avoid costs and data pollution.
Step A: Start the Emulators In a separate terminal, start the Firestore and Authentication emulators. It is recommended to specify your project ID to ensure the emulator uses the correct configuration:
firebase emulators:start --project=postfolio-appTip: You can access the Emulator UI at
http://localhost:4000to manage local users and view Firestore data.
Step B: Run the App
Run the app with the USE_EMULATOR flag:
flutter run --dart-define=USE_EMULATOR=trueNote: You can also use the "Postfolio (Firebase Emulator)" launch configuration in VS Code.
To completely stop the emulators and any running Flutter instances (especially helpful if ports are stuck), you can use:
# Kill Firebase Emulators (silent if no processes found)
lsof -ti:8080,9099 | xargs -r kill -9
# Kill all Chrome/Flutter run processes (Linux/macOS)
pkill -f chromeIf you need to bootstrap your local environment with legacy data (CSV/JSON), use the built-in migration utility. Note: Running on Chrome is highly recommended for the migration UI.
- Place your CSV/JSON files in the
data/directory. - Ensure the Firebase Emulator is running (
firebase emulators:start). - Run the migration script using the following command:
flutter run -t lib/run_migration.dart -d chrome
- Once the app launches, click "Sign In" to authenticate, then click "Run Migration".
This project follows strict architectural patterns:
- State Management: Riverpod (Notifiers & AsyncNotifiers).
- Models: Freezed (Immutable classes & Sealed unions).
- Navigation: GoRouter (Declarative routing).
- Design System: Standardized components in
lib/core/widgets/using HugeIcons.
Refer to AGENTS.md for detailed coding conventions and structural guidelines.