Welcome to DayVault! This guide will help you set up the project locally and start contributing to the ultimate Quantified Self platform.
Before you begin, ensure you have the following installed on your machine:
| Software | Version | Purpose | Download Link |
|---|---|---|---|
| Flutter SDK | ^3.2.0 |
Core framework | Install Flutter |
| Dart SDK | ^3.2.0 |
Programming language | (Included with Flutter) |
| Android Studio | Latest | Android development | Download |
| Xcode | Latest | iOS/macOS development | (Mac App Store) |
| Visual Studio | 2022 | Windows development | Download |
Follow these steps to get your development environment ready:
-
Clone the Repository
git clone https://github.com/yourusername/dayvault.git cd dayvault -
Install Flutter Dependencies
flutter pub get
-
Generate Source Code DayVault uses code generation for ObjectBox and Freezed models. This step is mandatory.
dart run build_runner build --delete-conflicting-outputs
-
Verify ObjectBox Setup Ensure the ObjectBox native libraries are correctly linked.
flutter doctor -v
-
Run the Application
# For Android flutter run # For iOS flutter run -d ios # For Windows flutter run -d windows
Flutter's hot reload feature allows you to see changes instantly.
- Press
rin the terminal or use the "Hot Reload" button in your IDE.
We recommend using VS Code with the Flutter extension or Android Studio.
- Use the Flutter DevTools to inspect the widget tree and monitor performance.
- Use
debugPrint()instead ofprint()for cleaner logs.
DayVault uses Riverpod 3.x. When adding new providers:
- Create a new file in
lib/services/orlib/providers/. - Use
@riverpodannotations. - Run
build_runnerto generate the provider code.
We strive for high test coverage. Always run tests before submitting a PR.
# Run all tests
flutter test
# Run tests with coverage
flutter test --coveragevoid main() {
test('Encryption Service should encrypt and decrypt correctly', () {
final service = EncryptionService();
const plainText = 'Hello World';
final encrypted = service.encrypt(plainText);
final decrypted = service.decrypt(encrypted);
expect(decrypted, equals(plainText));
});
}lib/
├── config/ # Global constants and security questions
├── models/ # Freezed domain models & ObjectBox entities
├── screens/ # UI Screen widgets (Journal, Identity, etc.)
├── services/ # Business logic & Repository implementations
├── widgets/ # Reusable glassmorphic UI components
└── main.dart # App entry point & initialization logicWe prefer Lucide Icons.
- Add the icon to
lucide_iconspackage or use the Material fallback inlib/config/constants.dart.
- Update the
@Entityclass inlib/models/objectbox_models.dart. - Run
dart run build_runner build. - ObjectBox will automatically handle the migration.
Theme constants are located in lib/config/constants.dart.
- Adjust
AppColorsfor global styling changes.
| Issue | Solution |
|---|---|
ObjectBoxException |
Run flutter clean and then flutter pub get. |
build_runner fails |
Use --delete-conflicting-outputs flag. |
| Biometrics not working | Ensure your emulator/device has biometrics enrolled. |
| PIN Lockout | Clear app data or use the "Forgot PIN" flow (if configured). |
Need more help? Join our community or open an issue!