Getting Started
Rewhaven is the clean rebuild of a neurodiversity-affirming household platform — a
token economy designed to fade into intrinsic motivation. The repo is a single
Dart pub workspace (one lockfile) on Flutter 3.44 / Dart 3.9, pinned with
FVM — so every command is fvm flutter … / fvm dart ….
Prerequisites
- FVM (the SDK version is pinned in
.fvmrc) - The repo cloned at
…/rytedesigns/rewhaven
First run
# from the repo root — resolves the whole workspace (one lockfile)
fvm flutter pub get
# run the app against the seeded in-memory demo (dev entry)
cd app
fvm flutter run -t lib/main_dev.dart
lib/main_dev.dart boots the app with an in-memory seeded demo household
("The Riveras") — no backend needed. It's the entry the web/emulator deploys use.
Run the tests
cd app
fvm flutter test # the whole app suite (flow + unit)
fvm flutter test test/flows/ # just the gadfly flow tests
The flow tests render real screens across light / dark / focus trips and assert both widgets and the analytics transcript. Golden screenshots are generated only with the screenshot flag:
fvm flutter test test/flows --update-goldens --dart-define=createScreenshots=true
Code generation
auto_route (routing) and json_serializable (bloc state) are generated. After
changing a route or a @JsonSerializable state, regenerate — scoped to the
file you changed so codegen never clobbers a hand-maintained sibling:
cd app
fvm dart run build_runner build --delete-conflicting-outputs \
--build-filter "lib/inside/blocs/<feature>/state.g.dart"
See Codegen & graphify for the full recipe.
Find your way around the code
The repo ships a graphify knowledge graph (AST-only, no API cost). Prefer it over grep for "where is X / how does Y work":
graphify query "how does the app create a household and add a member"
graphify path "SetupBloc" "HouseholdRepository"
graphify explain "kidColorResolved"
After changing code, keep the graph current: graphify update .
Where things live
| Path | What it is |
|---|---|
packages/client_sdk/ | The data layer — facade → services → adapters → models. Pure Dart. |
packages/client_sdk_testing/ | In-memory adapter + seed factories + MockClient (test doubles). |
packages/design_system/ | Tokens + theme + atoms (model-agnostic) — see the Design System section. |
packages/flow_test/ | The UI flow-test harness. |
app/ | The Flutter app — inside/outside architecture (see Architecture). |
infra/supabase/ | Migrations + Edge Functions (IaC). |
Next: Architecture & Concepts for how the layers fit together.