16 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-foundation | 01 | execute | 1 |
|
true |
|
|
Purpose: Establish every foundational dependency and pattern so Plan 02 can build the UI shell without any infrastructure work. Tests provide fast feedback during execution. Output: A Flutter project that compiles, has all dependencies resolved, code generation working, database initialized, theme/localization ready for consumption by UI code, and test scaffolding in place.
<execution_context> @/home/jlmak/.claude/get-shit-done/workflows/execute-plan.md @/home/jlmak/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/01-foundation/1-CONTEXT.md @.planning/phases/01-foundation/01-RESEARCH.md Task 1: Create Flutter project and configure all dependencies and tooling pubspec.yaml, analysis_options.yaml, build.yaml, l10n.yaml 1. Run `flutter create household_keeper --org com.jlmak --platforms android` inside the project root (the project root IS the repo root `/home/jlmak/Projects/jlmak/HouseHoldKeaper`). Since the repo already has files (LICENSE, README.md, .gitignore, .planning/), use `--project-name household_keeper` and target the current directory: `flutter create . --org com.jlmak --platforms android --project-name household_keeper`. This avoids creating a subdirectory.-
Add runtime dependencies:
flutter pub add flutter_riverpod riverpod_annotation drift drift_flutter go_router path_provider shared_preferences -
Add dev dependencies:
flutter pub add -d riverpod_generator drift_dev build_runner riverpod_lint -
Add
flutter_localizationsandintlmanually topubspec.yamlsince they use the SDK dependency format:dependencies: flutter_localizations: sdk: flutter intl: any -
Add
generate: trueunder theflutter:section inpubspec.yaml. -
Create
l10n.yamlin project root:arb-dir: lib/l10n template-arb-file: app_de.arb output-localization-file: app_localizations.dart nullable-getter: false -
Update
analysis_options.yamlto include riverpod_lint:include: package:flutter_lints/flutter.yaml plugins: riverpod_lint: ^3.1.3 -
Create
build.yamlin project root for Drift configuration:targets: $default: builders: drift_dev: options: databases: household_keeper: lib/core/database/database.dart sql: dialect: sqlite options: version: "3.38" -
Run
flutter pub getto verify all dependencies resolve cleanly. cd /home/jlmak/Projects/jlmak/HouseHoldKeaper && flutter pub get && echo "PASS: All dependencies resolved" Flutter project exists with all dependencies in pubspec.yaml (flutter_riverpod, drift, drift_flutter, go_router, path_provider, shared_preferences, flutter_localizations, intl, riverpod_annotation as runtime; riverpod_generator, drift_dev, build_runner, riverpod_lint as dev). l10n.yaml, build.yaml, and analysis_options.yaml configured correctly.flutter pub getsucceeds.
-
Create
lib/core/providers/database_provider.dart-- Riverpod provider for database:- Import riverpod_annotation and the database
- Add
part 'database_provider.g.dart'; - Use
@Riverpod(keepAlive: true)annotation (database must persist) - Function
appDatabase(Ref ref)returnsAppDatabase() - The provider creates the singleton database instance
-
Create
lib/core/theme/app_theme.dart-- light and dark theme definitions:- Define
AppThemeclass with static methodslightTheme()anddarkTheme()returningThemeData - Light ColorScheme:
ColorScheme.fromSeed(seedColor: Color(0xFF7A9A6D), brightness: Brightness.light, dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot).copyWith(surface: Color(0xFFF5F0E8), surfaceContainerLowest: Color(0xFFFAF7F2), surfaceContainerLow: Color(0xFFF2EDE4), surfaceContainer: Color(0xFFEDE7DC), surfaceContainerHigh: Color(0xFFE7E0D5), surfaceContainerHighest: Color(0xFFE0D9CE)) - Dark ColorScheme: Same seed,
Brightness.dark,.copyWith(surface: Color(0xFF2A2520), surfaceContainerLowest: Color(0xFF1E1A16), surfaceContainerLow: Color(0xFF322D27), surfaceContainer: Color(0xFF3A342E), surfaceContainerHigh: Color(0xFF433D36), surfaceContainerHighest: Color(0xFF4D463F)) - Both ThemeData set
useMaterial3: trueand use the respective ColorScheme
- Define
-
Create
lib/core/theme/theme_provider.dart-- Riverpod provider for theme mode:- Import riverpod_annotation, flutter/material.dart, shared_preferences
- Add
part 'theme_provider.g.dart'; @riverpod class ThemeNotifier extends _$ThemeNotifierbuild()method: read from SharedPreferences key'theme_mode', parse to ThemeMode enum, default toThemeMode.systemsetThemeMode(ThemeMode mode)method: update state, persist to SharedPreferences- Use
ref.readpattern for async SharedPreferences access (NOT ref.watch -- this is a Notifier, not build()) - Helper:
_themeModeFromString(String? value)and_themeModeToString(ThemeMode mode)for serialization
-
Create
lib/l10n/app_de.arb-- German localization strings for all Phase 1 UI:{ "@@locale": "de", "appTitle": "HouseHoldKeaper", "tabHome": "\u00dcbersicht", "tabRooms": "R\u00e4ume", "tabSettings": "Einstellungen", "homeEmptyTitle": "Noch nichts zu tun!", "homeEmptyMessage": "Lege zuerst einen Raum an, um Aufgaben zu planen.", "homeEmptyAction": "Raum erstellen", "roomsEmptyTitle": "Hier ist noch alles leer!", "roomsEmptyMessage": "Erstelle deinen ersten Raum, um loszulegen.", "roomsEmptyAction": "Raum erstellen", "settingsSectionAppearance": "Darstellung", "settingsThemeLabel": "Farbschema", "themeSystem": "System", "themeLight": "Hell", "themeDark": "Dunkel", "settingsSectionAbout": "\u00dcber", "aboutAppName": "HouseHoldKeaper", "aboutTagline": "Dein Haushalt, entspannt organisiert.", "aboutVersion": "Version {version}", "@aboutVersion": { "placeholders": { "version": { "type": "String" } } } }IMPORTANT: Use proper German umlauts throughout -- "Ubersicht" with umlaut (U+00DC), "Raume" with umlaut (U+00E4), "Uber" with umlaut (U+00DC). Per CONTEXT.md user decision: labels are "Ubersicht", "Raume", "Einstellungen" with umlauts.
-
Remove the default
lib/main.dartcontent and replace with a minimal placeholder that imports ProviderScope (just enough to verify compilation -- full wiring happens in Plan 02):import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; void main() { runApp(const ProviderScope(child: MaterialApp(home: Scaffold()))); } -
Run code generation:
dart run build_runner build --delete-conflicting-outputsThis generates:database.g.dart,database_provider.g.dart,theme_provider.g.dart -
Run Drift migration capture:
dart run drift_dev make-migrationsThis captures schema version 1 indrift_schemas/directory. -
Create Wave 0 test files:
a.
test/core/database/database_test.dart(covers FOUND-01):- Test that
AppDatabase(NativeDatabase.memory())opens successfully - Test that
schemaVersionequals 1 - Test that the database can be closed without error
- Use in-memory database (
NativeDatabase.memory()) for test isolation
b.
test/core/theme/color_scheme_test.dart(covers THEME-02):- Test that
AppTheme.lightTheme()hasBrightness.light - Test that
AppTheme.darkTheme()hasBrightness.dark - Test that both use sage green seed: verify
primarycolor is in the green hue range - Test that light surface color is warm (0xFFF5F0E8)
- Test that dark surface color is warm charcoal (0xFF2A2520), not cold gray
c.
test/core/theme/theme_test.dart(covers THEME-01):- Widget test: wrap a
MaterialAppwithProviderScopeand verify thatThemeNotifierdefaults toThemeMode.system - Test that calling
setThemeMode(ThemeMode.dark)updates state - Test that calling
setThemeMode(ThemeMode.light)updates state - Use
SharedPreferences.setMockInitialValues({})for test isolation
d.
test/l10n/localization_test.dart(covers FOUND-03):- Widget test: create a
MaterialAppwithAppLocalizations.localizationsDelegates,supportedLocales: [Locale('de')],locale: Locale('de') - Pump a widget that reads
AppLocalizations.of(context)and displaystabHome - Verify the rendered text contains the expected German string (with umlaut)
- Test that all critical keys are non-empty:
appTitle,tabHome,tabRooms,tabSettings
- Test that
-
Run
dart analyzeto verify riverpod_lint is active and no analysis issues exist. -
Run
flutter testto verify all Wave 0 tests pass. cd /home/jlmak/Projects/jlmak/HouseHoldKeaper && dart run build_runner build --delete-conflicting-outputs 2>&1 | tail -5 && dart analyze 2>&1 | tail -5 && flutter test 2>&1 | tail -10 && echo "PASS: Codegen, analysis, and tests clean" database.dart defines AppDatabase with schemaVersion 1. database_provider.dart exposes AppDatabase via @riverpod. app_theme.dart provides lightTheme() and darkTheme() with sage green seed and warm surface overrides. theme_provider.dart provides ThemeNotifier with shared_preferences persistence and ThemeMode.system default. app_de.arb contains all German strings for Phase 1 screens with proper umlauts (Ubersicht, Raume, Uber). All .g.dart files generated successfully. drift_dev make-migrations has captured schema v1. dart analyze passes cleanly. All 4 Wave 0 test files created and passing: database_test.dart, color_scheme_test.dart, theme_test.dart, localization_test.dart.
<success_criteria>
- Flutter project scaffolded with all Phase 1 dependencies
- Drift database class exists with schemaVersion 1 and migration workflow established
- Riverpod providers created with @riverpod annotation and code generation
- Light and dark theme definitions with sage & stone ColorScheme palette
- ThemeMode provider with shared_preferences persistence
- ARB localization file with all German strings for Phase 1 using proper umlauts
- All code generation (.g.dart files) succeeds
- dart analyze passes cleanly with riverpod_lint active
- Wave 0 tests pass: database (FOUND-01), localization (FOUND-03), theme switching (THEME-01), color scheme (THEME-02) </success_criteria>