# palak413/hyperbloom architecture

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

- Interactive diagram: https://gitdiagram.com/palak413/hyperbloom
- Repository: https://github.com/palak413/hyperbloom

## Overview

ClearForm is a browser-only prototype that guides a resident through a fictional rent-relief application: welcome, eligibility triage, document preparation, one-question-at-a-time answers, review, and a receipt. The app shell manages screen navigation and shared journey state; question content and validation rules are separated from the screens, while reusable accessible controls support the form. Progress is saved in localStorage, with no backend or submission service. Screen dispatch details are only partially excerpted, so the graph limits those links to relationships evidenced by the App source index and README.

Main entry points: [`src/App.tsx`](https://github.com/palak413/hyperbloom/blob/main/src/App.tsx) (App shell), [`src/ui.tsx`](https://github.com/palak413/hyperbloom/blob/main/src/ui.tsx) (Shared components), [`src/screens/Review.tsx`](https://github.com/palak413/hyperbloom/blob/main/src/screens/Review.tsx) (Answer review), [`src/screens/Ask.tsx`](https://github.com/palak413/hyperbloom/blob/main/src/screens/Ask.tsx) (Question flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Application journey"]
  node_app["App shell<br/>[App.tsx]"]
  node_welcome["Welcome<br/>[Welcome.tsx]"]
  node_triage["Eligibility triage<br/>[Triage.tsx]"]
  node_out["Ineligible guidance<br/>[Out.tsx]"]
  node_documents["Document checklist<br/>[Docs.tsx]"]
  node_questions["Question flow<br/>[Ask.tsx]"]
  node_review["Answer review<br/>[Review.tsx]"]
  node_receipt["Receipt and next steps<br/>[Done.tsx]"]
end

subgraph group_rules["Content and rules"]
  node_content["Program content<br/>[data.ts]"]
  node_logic["Validation and summaries<br/>[lib.ts]"]
end

subgraph group_shared["Shared interface"]
  node_controls["Form controls<br/>[fields.tsx]"]
  node_components["Shared components<br/>[ui.tsx]"]
end

subgraph group_persistence["Local persistence"]
  node_state["Journey state<br/>[state.ts]"]
  node_storage[("Browser localStorage")]
end

node_resident(("Resident"))

node_resident -->|"uses"| node_app
node_app -->|"manages"| node_state
node_app -->|"dispatches"| node_welcome
node_app -->|"dispatches"| node_triage
node_app -->|"dispatches"| node_out
node_app -->|"dispatches"| node_documents
node_app -->|"dispatches"| node_questions
node_app -->|"dispatches"| node_review
node_app -->|"dispatches"| node_receipt
node_state -->|"reads and writes"| node_storage
node_triage -->|"routes when ineligible"| node_out
node_triage -->|"routes when eligible"| node_documents
node_documents -->|"starts questions"| node_questions
node_documents -->|"filters checklist"| node_content
node_questions -->|"validates answers"| node_logic
node_questions -->|"renders fields"| node_controls
node_questions -->|"renders components"| node_components
node_review -->|"validates and summarizes"| node_logic
node_review -->|"opens answer edit"| node_questions
node_review -->|"confirms application"| node_receipt
node_review -->|"uses document content"| node_content
node_receipt -->|"builds summary"| node_logic
node_receipt -->|"shows timeline and documents"| node_content
node_welcome -->|"renders components"| node_components
node_triage -->|"renders choices"| node_controls
node_triage -->|"uses situations"| node_content
node_documents -->|"renders components"| node_components
node_review -->|"renders components"| node_components
node_receipt -->|"renders components"| node_components
node_out -->|"uses journey context"| node_state
node_out -->|"renders components"| node_components
node_logic -->|"uses program rules"| node_content
node_components -->|"reads glossary"| node_content
node_controls -->|"uses icons and styles"| node_components

click node_app "https://github.com/palak413/hyperbloom/blob/main/src/App.tsx"
click node_welcome "https://github.com/palak413/hyperbloom/blob/main/src/screens/Welcome.tsx"
click node_triage "https://github.com/palak413/hyperbloom/blob/main/src/screens/Triage.tsx"
click node_out "https://github.com/palak413/hyperbloom/blob/main/src/screens/Out.tsx"
click node_documents "https://github.com/palak413/hyperbloom/blob/main/src/screens/Docs.tsx"
click node_questions "https://github.com/palak413/hyperbloom/blob/main/src/screens/Ask.tsx"
click node_review "https://github.com/palak413/hyperbloom/blob/main/src/screens/Review.tsx"
click node_receipt "https://github.com/palak413/hyperbloom/blob/main/src/screens/Done.tsx"
click node_content "https://github.com/palak413/hyperbloom/blob/main/src/data.ts"
click node_logic "https://github.com/palak413/hyperbloom/blob/main/src/lib.ts"
click node_state "https://github.com/palak413/hyperbloom/blob/main/src/state.ts"
click node_controls "https://github.com/palak413/hyperbloom/blob/main/src/fields.tsx"
click node_components "https://github.com/palak413/hyperbloom/blob/main/src/ui.tsx"

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_app,node_welcome,node_triage,node_out,node_documents,node_questions,node_review,node_receipt toneBlue
class node_content,node_logic toneAmber
class node_controls,node_components toneMint
class node_state,node_storage toneRose
class node_resident toneIndigo
```

## Components

### Application journey

- [App shell](https://github.com/palak413/hyperbloom/blob/main/src/App.tsx): `src/App.tsx`
- [Welcome](https://github.com/palak413/hyperbloom/blob/main/src/screens/Welcome.tsx): `src/screens/Welcome.tsx`
- [Eligibility triage](https://github.com/palak413/hyperbloom/blob/main/src/screens/Triage.tsx): `src/screens/Triage.tsx`
- [Ineligible guidance](https://github.com/palak413/hyperbloom/blob/main/src/screens/Out.tsx): `src/screens/Out.tsx`
- [Document checklist](https://github.com/palak413/hyperbloom/blob/main/src/screens/Docs.tsx): `src/screens/Docs.tsx`
- [Question flow](https://github.com/palak413/hyperbloom/blob/main/src/screens/Ask.tsx): `src/screens/Ask.tsx`
- [Answer review](https://github.com/palak413/hyperbloom/blob/main/src/screens/Review.tsx): `src/screens/Review.tsx`
- [Receipt and next steps](https://github.com/palak413/hyperbloom/blob/main/src/screens/Done.tsx): `src/screens/Done.tsx`

### Content and rules

- [Program content](https://github.com/palak413/hyperbloom/blob/main/src/data.ts): `src/data.ts`
- [Validation and summaries](https://github.com/palak413/hyperbloom/blob/main/src/lib.ts): `src/lib.ts`

### Shared interface

- [Form controls](https://github.com/palak413/hyperbloom/blob/main/src/fields.tsx): `src/fields.tsx`
- [Shared components](https://github.com/palak413/hyperbloom/blob/main/src/ui.tsx): `src/ui.tsx`

### Local persistence

- [Journey state](https://github.com/palak413/hyperbloom/blob/main/src/state.ts): `src/state.ts`
- **Browser localStorage**

### Other components

- **Resident**

## Connections

- Resident → App shell: uses (evidence: `README.md`)
- App shell → Journey state: manages (evidence: `src/App.tsx`)
- App shell → Welcome: dispatches (evidence: `src/App.tsx`)
- App shell → Eligibility triage: dispatches (evidence: `src/App.tsx`)
- App shell → Ineligible guidance: dispatches (evidence: `src/App.tsx`)
- App shell → Document checklist: dispatches (evidence: `src/App.tsx`)
- App shell → Question flow: dispatches (evidence: `src/App.tsx`)
- App shell → Answer review: dispatches (evidence: `src/App.tsx`)
- App shell → Receipt and next steps: dispatches (evidence: `src/App.tsx`)
- Journey state → Browser localStorage: reads and writes (evidence: `src/state.ts`)
- Eligibility triage → Ineligible guidance: routes when ineligible (evidence: `src/screens/Triage.tsx`)
- Eligibility triage → Document checklist: routes when eligible (evidence: `src/screens/Triage.tsx`)
- Document checklist → Question flow: starts questions (evidence: `src/screens/Docs.tsx`)
- Document checklist → Program content: filters checklist (evidence: `src/screens/Docs.tsx`)
- Question flow → Validation and summaries: validates answers (evidence: `src/screens/Ask.tsx`)
- Question flow → Form controls: renders fields (evidence: `src/screens/Ask.tsx`)
- Question flow → Shared components: renders components (evidence: `src/screens/Ask.tsx`)
- Answer review → Validation and summaries: validates and summarizes (evidence: `src/screens/Review.tsx`)
- Answer review → Question flow: opens answer edit (evidence: `src/screens/Review.tsx`)
- Answer review → Receipt and next steps: confirms application (evidence: `src/screens/Review.tsx`)
- Answer review → Program content: uses document content (evidence: `src/screens/Review.tsx`)
- Receipt and next steps → Validation and summaries: builds summary (evidence: `src/screens/Done.tsx`)
- Receipt and next steps → Program content: shows timeline and documents (evidence: `src/screens/Done.tsx`)
- Welcome → Shared components: renders components (evidence: `src/screens/Welcome.tsx`)
- Eligibility triage → Form controls: renders choices (evidence: `src/screens/Triage.tsx`)
- Eligibility triage → Program content: uses situations (evidence: `src/screens/Triage.tsx`)
- Document checklist → Shared components: renders components (evidence: `src/screens/Docs.tsx`)
- Answer review → Shared components: renders components (evidence: `src/screens/Review.tsx`)
- Receipt and next steps → Shared components: renders components (evidence: `src/screens/Done.tsx`)
- Ineligible guidance → Journey state: uses journey context (evidence: `src/screens/Out.tsx`)
- Ineligible guidance → Shared components: renders components (evidence: `src/screens/Out.tsx`)
- Validation and summaries → Program content: uses program rules (evidence: `src/lib.ts`)
- Shared components → Program content: reads glossary (evidence: `src/ui.tsx`)
- Form controls → Shared components: uses icons and styles (evidence: `src/fields.tsx`)
