# juanpagg15ug/washy architecture

> Architecture diagram of the GitHub repository juanpagg15ug/washy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/juanpagg15ug/washy
- Repository: https://github.com/juanpagg15ug/washy

## Overview

Washy is a local-first laundry ritual app for helping users start, track, and finish laundry in manageable steps. The main workflow runs from the dashboard through scheduling or backlog capture, time check, anchoring, garment classification, washing or soaking, drying, and an honest folding closure; the batch detail route presents a persisted batch workflow. Settings, the garment dictionary, weather-aware semaphore guidance, and timer reconciliation support that journey. The graph reflects sampled callers and documented module behavior; some route and integration wiring is not shown in the excerpts.

Main entry points: [`packages/washy-ui/app/(tabs)/index.tsx`](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/(tabs)/index.tsx) (Dashboard), [`packages/washy-ui/src/shared/lib/db.ts`](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/db.ts) (Database client), [`packages/washy-ui/src/shared/hooks/useReconciliation.ts`](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/hooks/useReconciliation.ts) (Timer reconciliation), [`packages/washy-ui/src/components/screens/Classification.tsx`](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Classification.tsx) (Classification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_dashboard["Dashboard<br/>[index.tsx]"]
  node_dictionary["Garment dictionary<br/>[dictionary.tsx]"]
  node_settings["User settings<br/>[settings.tsx]"]
end

subgraph group_ritual["Laundry ritual"]
  node_batch_create["Schedule or capture<br/>[new.tsx]"]
  node_batch_detail["Batch lifecycle<br/>[&#91;id&#93;.tsx]"]
  node_time_check["Time check<br/>[TimeCheck.tsx]"]
  node_anchor["Anchor step<br/>[Anchor.tsx]"]
  node_classification["Classification<br/>[Classification.tsx]"]
  node_blind_zone["Wash timer<br/>[BlindZone.tsx]"]
  node_soaking["Soaking step<br/>[Soaking.tsx]"]
  node_drying["Drying step<br/>[Drying.tsx]"]
  node_closure["Folding closure<br/>[Closure.tsx]"]
end

subgraph group_domain["Core domain"]
  node_weather["Weather lookup<br/>[weather.ts]"]
  node_semaphore["Time semaphore<br/>[semaphore.ts]"]
  node_wip["WIP limits<br/>[wip.ts]"]
  node_nagging["Reminder policy<br/>[nagging.ts]"]
  node_fsm["Batch state machine<br/>[fsm.ts]"]
end

subgraph group_persistence["Data and recovery"]
  node_reconciliation["Timer reconciliation"]
  node_db_client["Database client<br/>[db.ts]"]
  node_schema["Laundry data model<br/>[schema.ts]"]
  node_local_db[("App database<br/>[db.ts]")]
end

node_user(("Laundry user"))
node_notifications["Device notifications"]

node_user -->|"opens"| node_dashboard
node_dashboard -->|"opens scheduling"| node_batch_create
node_dashboard -->|"resumes batch"| node_batch_detail
node_dashboard -->|"opens dictionary"| node_dictionary
node_dashboard -->|"opens settings"| node_settings
node_dashboard -->|"loads conditions"| node_weather
node_dashboard -->|"checks time"| node_semaphore
node_dashboard -->|"checks limits"| node_wip
node_batch_detail -->|"starts ritual"| node_time_check
node_time_check -->|"continues"| node_anchor
node_anchor -->|"continues"| node_classification
node_classification -->|"chooses soak"| node_soaking
node_classification -->|"starts wash"| node_blind_zone
node_blind_zone -->|"advances"| node_drying
node_drying -->|"advances"| node_closure
node_closure -->|"returns home"| node_dashboard
node_classification -->|"reads garments"| node_db_client
node_dashboard -->|"reads batch state"| node_db_client
node_batch_detail -->|"loads and updates"| node_db_client
node_settings -->|"reads and saves"| node_db_client
node_reconciliation -->|"queries and updates"| node_db_client
node_reconciliation -.->|"optional policy"| node_nagging
node_reconciliation -->|"schedules alerts"| node_notifications
node_db_client -->|"reads and writes"| node_local_db
node_db_client -->|"uses tables"| node_schema
node_reconciliation -->|"queries batch rules"| node_schema

click node_dashboard "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/(tabs)/index.tsx"
click node_batch_create "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/batch/new.tsx"
click node_batch_detail "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/batch/%5Bid%5D.tsx"
click node_time_check "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/TimeCheck.tsx"
click node_anchor "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Anchor.tsx"
click node_classification "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Classification.tsx"
click node_blind_zone "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/BlindZone.tsx"
click node_soaking "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Soaking.tsx"
click node_drying "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Drying.tsx"
click node_closure "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Closure.tsx"
click node_dictionary "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/dictionary.tsx"
click node_settings "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/settings.tsx"
click node_weather "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/weather.ts"
click node_semaphore "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/rules/semaphore.ts"
click node_wip "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/rules/wip.ts"
click node_nagging "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/rules/nagging.ts"
click node_fsm "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/state-machine/fsm.ts"
click node_reconciliation "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/hooks/useReconciliation.ts"
click node_db_client "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/db.ts"
click node_schema "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/db/schema.ts"
click node_local_db "https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/db.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_dictionary,node_settings,node_user toneBlue
class node_batch_create,node_batch_detail,node_time_check,node_anchor,node_classification,node_blind_zone,node_soaking,node_drying,node_closure toneAmber
class node_weather,node_semaphore,node_wip,node_nagging,node_fsm toneMint
class node_reconciliation,node_db_client,node_schema,node_local_db toneRose
class node_notifications toneIndigo
```

## Components

### App experience

- [Dashboard](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/(tabs)/index.tsx): `packages/washy-ui/app/(tabs)/index.tsx`
- [Garment dictionary](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/dictionary.tsx): `packages/washy-ui/app/dictionary.tsx`
- [User settings](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/settings.tsx): `packages/washy-ui/app/settings.tsx`

### Laundry ritual

- [Schedule or capture](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/batch/new.tsx): `packages/washy-ui/app/batch/new.tsx`
- [Batch lifecycle](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/app/batch/%5Bid%5D.tsx): `packages/washy-ui/app/batch/[id].tsx`
- [Time check](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/TimeCheck.tsx): `packages/washy-ui/src/components/screens/TimeCheck.tsx`
- [Anchor step](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Anchor.tsx): `packages/washy-ui/src/components/screens/Anchor.tsx`
- [Classification](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Classification.tsx): `packages/washy-ui/src/components/screens/Classification.tsx`
- [Wash timer](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/BlindZone.tsx): `packages/washy-ui/src/components/screens/BlindZone.tsx`
- [Soaking step](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Soaking.tsx): `packages/washy-ui/src/components/screens/Soaking.tsx`
- [Drying step](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Drying.tsx): `packages/washy-ui/src/components/screens/Drying.tsx`
- [Folding closure](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/components/screens/Closure.tsx): `packages/washy-ui/src/components/screens/Closure.tsx`

### Core domain

- [Weather lookup](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/weather.ts): `packages/washy-ui/src/shared/lib/weather.ts`
- [Time semaphore](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/rules/semaphore.ts): `packages/washy-core/src/rules/semaphore.ts`
- [WIP limits](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/rules/wip.ts): `packages/washy-core/src/rules/wip.ts`
- [Reminder policy](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/rules/nagging.ts): `packages/washy-core/src/rules/nagging.ts`
- [Batch state machine](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/state-machine/fsm.ts): `packages/washy-core/src/state-machine/fsm.ts`

### Data and recovery

- [Timer reconciliation](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/hooks/useReconciliation.ts): `packages/washy-ui/src/shared/hooks/useReconciliation.ts`
- [Database client](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/db.ts): `packages/washy-ui/src/shared/lib/db.ts`
- [Laundry data model](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-core/src/db/schema.ts): `packages/washy-core/src/db/schema.ts`
- [App database](https://github.com/juanpagg15ug/washy/blob/main/packages/washy-ui/src/shared/lib/db.ts): `packages/washy-ui/src/shared/lib/db.ts`

### Other components

- **Laundry user**
- **Device notifications**

## Connections

- Laundry user → Dashboard: opens
- Dashboard → Schedule or capture: opens scheduling
- Dashboard → Batch lifecycle: resumes batch
- Dashboard → Garment dictionary: opens dictionary
- Dashboard → User settings: opens settings
- Dashboard → Weather lookup: loads conditions
- Dashboard → Time semaphore: checks time
- Dashboard → WIP limits: checks limits
- Batch lifecycle → Time check: starts ritual
- Time check → Anchor step: continues
- Anchor step → Classification: continues
- Classification → Soaking step: chooses soak
- Classification → Wash timer: starts wash
- Wash timer → Drying step: advances
- Drying step → Folding closure: advances
- Folding closure → Dashboard: returns home
- Classification → Database client: reads garments
- Dashboard → Database client: reads batch state
- Batch lifecycle → Database client: loads and updates
- User settings → Database client: reads and saves
- Timer reconciliation → Database client: queries and updates
- Timer reconciliation → Reminder policy: optional policy
- Timer reconciliation → Device notifications: schedules alerts
- Database client → App database: reads and writes
- Database client → Laundry data model: uses tables
- Timer reconciliation → Laundry data model: queries batch rules
