# xdev200/grow-baby-grow architecture

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

- Interactive diagram: https://gitdiagram.com/xdev200/grow-baby-grow
- Repository: https://github.com/xdev200/grow-baby-grow

## Overview

Grow Baby Grow is an offline-first child health tracking app for parents. A parent creates or selects a child profile, then uses the dashboard to review age-adjusted developmental milestones and alerts, and navigates to assessment, timeline, growth, or vaccination tracking; reports support pediatric consultations. Local persistence underpins these workflows. The README documents clinical standards, corrected age, immunization guidance, offline use, safety alerts, and PDF reporting. Some screen implementations were not sampled, so their internal connections are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/xdev200/grow-baby-grow/blob/main/src/App.tsx) (App Router), [`src/context/ChildContext.tsx`](https://github.com/xdev200/grow-baby-grow/blob/main/src/context/ChildContext.tsx) (Child Context), [`src/screens/DashboardScreen.tsx`](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/DashboardScreen.tsx) (Dashboard), [`src/screens/VaccinationScreen.tsx`](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/VaccinationScreen.tsx) (Vaccination Tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Profiles"]
  node_app["App Router<br/>[App.tsx]"]
  node_onboard["Child Onboarding"]
  node_profileform["Profile Form<br/>[ProfileForm.tsx]"]
  node_childctx["Child Context<br/>[ChildContext.tsx]"]
end

subgraph group_clinical["Developmental Tracking"]
  node_dashboard["Dashboard"]
  node_assessment["Assessment Logic<br/>[useAssessment.ts]"]
  node_quiz["Development Quiz<br/>[QuizScreen.tsx]"]
  node_timeline["Milestone Timeline<br/>[TimelineScreen.tsx]"]
  node_milestones["Milestone Processor"]
end

subgraph group_health["Growth and Immunization"]
  node_growth["Growth Tracking<br/>[GrowthScreen.tsx]"]
  node_growthchart["Growth Chart<br/>[GrowthChart.tsx]"]
  node_vaccinations["Vaccination Tracking"]
  node_vaccineservice["Vaccine Schedule<br/>[vaccineService.ts]"]
  node_report["Clinical Reports<br/>[report.ts]"]
end

subgraph group_local["Local Data"]
  node_storage[("IndexedDB Storage<br/>[storage.ts]")]
  node_preferences["Local Preferences"]
end

subgraph group_shared["Clinical Foundations"]
  node_age["Age Calculation<br/>[age.ts]"]
  node_childhelpers["Child Helpers<br/>[childHelpers.ts]"]
  node_idutil["ID Utility<br/>[id.ts]"]
  node_types["Clinical Data Types<br/>[index.ts]"]
end

node_parent(("Parent"))

node_parent -->|"uses"| node_app
node_app -->|"routes to"| node_onboard
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_quiz
node_app -->|"routes to"| node_timeline
node_app -->|"routes to"| node_growth
node_app -->|"routes to"| node_vaccinations
node_app -->|"provides"| node_childctx
node_onboard -.->|"renders"| node_profileform
node_childctx -->|"reads and writes"| node_storage
node_childctx -->|"reads and writes"| node_preferences
node_childctx -->|"calculates age"| node_age
node_dashboard -->|"reads context"| node_childctx
node_dashboard -->|"uses"| node_assessment
node_assessment -->|"reads logs"| node_storage
node_assessment -->|"uses milestones"| node_milestones
node_dashboard -->|"checks schedule"| node_vaccineservice
node_dashboard -->|"generates report"| node_report
node_growth -->|"renders"| node_growthchart
node_vaccinations -->|"uses schedule"| node_vaccineservice
node_vaccineservice -->|"reads and writes logs"| node_storage
node_vaccinations -->|"uses"| node_storage
node_vaccinations -->|"uses"| node_preferences
node_vaccinations -->|"reads context"| node_childctx
node_growth -->|"reads context"| node_childctx
node_report -->|"uses milestones"| node_milestones
node_report -->|"uses"| node_childhelpers
node_dashboard -->|"reads logs"| node_storage
node_profileform -->|"calculates age"| node_age
node_profileform -->|"creates identifiers"| node_idutil
node_vaccineservice -->|"uses types"| node_types
node_milestones -->|"uses types"| node_types

click node_app "https://github.com/xdev200/grow-baby-grow/blob/main/src/App.tsx"
click node_onboard "https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/OnboardingScreen.tsx"
click node_profileform "https://github.com/xdev200/grow-baby-grow/blob/main/src/components/onboarding/ProfileForm.tsx"
click node_childctx "https://github.com/xdev200/grow-baby-grow/blob/main/src/context/ChildContext.tsx"
click node_dashboard "https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/DashboardScreen.tsx"
click node_assessment "https://github.com/xdev200/grow-baby-grow/blob/main/src/hooks/useAssessment.ts"
click node_quiz "https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/QuizScreen.tsx"
click node_timeline "https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/TimelineScreen.tsx"
click node_milestones "https://github.com/xdev200/grow-baby-grow/blob/main/src/data/milestoneProcessor.ts"
click node_growth "https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/GrowthScreen.tsx"
click node_growthchart "https://github.com/xdev200/grow-baby-grow/blob/main/src/components/growth/GrowthChart.tsx"
click node_vaccinations "https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/VaccinationScreen.tsx"
click node_vaccineservice "https://github.com/xdev200/grow-baby-grow/blob/main/src/services/vaccineService.ts"
click node_report "https://github.com/xdev200/grow-baby-grow/blob/main/src/services/report.ts"
click node_storage "https://github.com/xdev200/grow-baby-grow/blob/main/src/services/storage.ts"
click node_preferences "https://github.com/xdev200/grow-baby-grow/blob/main/src/services/preferencesService.ts"
click node_age "https://github.com/xdev200/grow-baby-grow/blob/main/src/utils/age.ts"
click node_childhelpers "https://github.com/xdev200/grow-baby-grow/blob/main/src/utils/childHelpers.ts"
click node_idutil "https://github.com/xdev200/grow-baby-grow/blob/main/src/utils/id.ts"
click node_types "https://github.com/xdev200/grow-baby-grow/blob/main/src/types/index.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_app,node_onboard,node_profileform,node_childctx toneBlue
class node_dashboard,node_assessment,node_quiz,node_timeline,node_milestones toneAmber
class node_growth,node_growthchart,node_vaccinations,node_vaccineservice,node_report toneMint
class node_storage,node_preferences toneRose
class node_age,node_childhelpers,node_idutil,node_types,node_parent toneIndigo
```

## Components

### App and Profiles

- [App Router](https://github.com/xdev200/grow-baby-grow/blob/main/src/App.tsx): `src/App.tsx`
- [Child Onboarding](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/OnboardingScreen.tsx): `src/screens/OnboardingScreen.tsx`
- [Profile Form](https://github.com/xdev200/grow-baby-grow/blob/main/src/components/onboarding/ProfileForm.tsx): `src/components/onboarding/ProfileForm.tsx`
- [Child Context](https://github.com/xdev200/grow-baby-grow/blob/main/src/context/ChildContext.tsx): `src/context/ChildContext.tsx`

### Developmental Tracking

- [Dashboard](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/DashboardScreen.tsx): `src/screens/DashboardScreen.tsx`
- [Assessment Logic](https://github.com/xdev200/grow-baby-grow/blob/main/src/hooks/useAssessment.ts): `src/hooks/useAssessment.ts`
- [Development Quiz](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/QuizScreen.tsx): `src/screens/QuizScreen.tsx`
- [Milestone Timeline](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/TimelineScreen.tsx): `src/screens/TimelineScreen.tsx`
- [Milestone Processor](https://github.com/xdev200/grow-baby-grow/blob/main/src/data/milestoneProcessor.ts): `src/data/milestoneProcessor.ts`

### Growth and Immunization

- [Growth Tracking](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/GrowthScreen.tsx): `src/screens/GrowthScreen.tsx`
- [Growth Chart](https://github.com/xdev200/grow-baby-grow/blob/main/src/components/growth/GrowthChart.tsx): `src/components/growth/GrowthChart.tsx`
- [Vaccination Tracking](https://github.com/xdev200/grow-baby-grow/blob/main/src/screens/VaccinationScreen.tsx): `src/screens/VaccinationScreen.tsx`
- [Vaccine Schedule](https://github.com/xdev200/grow-baby-grow/blob/main/src/services/vaccineService.ts): `src/services/vaccineService.ts`
- [Clinical Reports](https://github.com/xdev200/grow-baby-grow/blob/main/src/services/report.ts): `src/services/report.ts`

### Local Data

- [IndexedDB Storage](https://github.com/xdev200/grow-baby-grow/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [Local Preferences](https://github.com/xdev200/grow-baby-grow/blob/main/src/services/preferencesService.ts): `src/services/preferencesService.ts`

### Clinical Foundations

- [Age Calculation](https://github.com/xdev200/grow-baby-grow/blob/main/src/utils/age.ts): `src/utils/age.ts`
- [Child Helpers](https://github.com/xdev200/grow-baby-grow/blob/main/src/utils/childHelpers.ts): `src/utils/childHelpers.ts`
- [ID Utility](https://github.com/xdev200/grow-baby-grow/blob/main/src/utils/id.ts): `src/utils/id.ts`
- [Clinical Data Types](https://github.com/xdev200/grow-baby-grow/blob/main/src/types/index.ts): `src/types/index.ts`

### Other components

- **Parent**

## Connections

- Parent → App Router: uses (evidence: `src/App.tsx`)
- App Router → Child Onboarding: routes to (evidence: `src/App.tsx`)
- App Router → Dashboard: routes to (evidence: `src/App.tsx`)
- App Router → Development Quiz: routes to (evidence: `src/App.tsx`)
- App Router → Milestone Timeline: routes to (evidence: `src/App.tsx`)
- App Router → Growth Tracking: routes to (evidence: `src/App.tsx`)
- App Router → Vaccination Tracking: routes to (evidence: `src/App.tsx`)
- App Router → Child Context: provides (evidence: `src/App.tsx`)
- Child Onboarding → Profile Form: renders
- Child Context → IndexedDB Storage: reads and writes (evidence: `src/context/ChildContext.tsx`)
- Child Context → Local Preferences: reads and writes (evidence: `src/context/ChildContext.tsx`)
- Child Context → Age Calculation: calculates age (evidence: `src/context/ChildContext.tsx`)
- Dashboard → Child Context: reads context (evidence: `src/screens/DashboardScreen.tsx`)
- Dashboard → Assessment Logic: uses (evidence: `src/screens/DashboardScreen.tsx`)
- Assessment Logic → IndexedDB Storage: reads logs (evidence: `src/hooks/useAssessment.ts`)
- Assessment Logic → Milestone Processor: uses milestones (evidence: `src/hooks/useAssessment.ts`)
- Dashboard → Vaccine Schedule: checks schedule (evidence: `src/screens/DashboardScreen.tsx`)
- Dashboard → Clinical Reports: generates report (evidence: `src/screens/DashboardScreen.tsx`)
- Growth Tracking → Growth Chart: renders (evidence: `src/screens/GrowthScreen.tsx`)
- Vaccination Tracking → Vaccine Schedule: uses schedule (evidence: `src/screens/VaccinationScreen.tsx`)
- Vaccine Schedule → IndexedDB Storage: reads and writes logs (evidence: `src/services/vaccineService.ts`)
- Vaccination Tracking → IndexedDB Storage: uses (evidence: `src/screens/VaccinationScreen.tsx`)
- Vaccination Tracking → Local Preferences: uses (evidence: `src/screens/VaccinationScreen.tsx`)
- Vaccination Tracking → Child Context: reads context (evidence: `src/screens/VaccinationScreen.tsx`)
- Growth Tracking → Child Context: reads context (evidence: `src/screens/GrowthScreen.tsx`)
- Clinical Reports → Milestone Processor: uses milestones (evidence: `src/services/report.ts`)
- Clinical Reports → Child Helpers: uses (evidence: `src/services/report.ts`)
- Dashboard → IndexedDB Storage: reads logs (evidence: `src/screens/DashboardScreen.tsx`)
- Profile Form → Age Calculation: calculates age (evidence: `src/components/onboarding/ProfileForm.tsx`)
- Profile Form → ID Utility: creates identifiers (evidence: `src/components/onboarding/ProfileForm.tsx`)
- Vaccine Schedule → Clinical Data Types: uses types (evidence: `src/services/vaccineService.ts`)
- Milestone Processor → Clinical Data Types: uses types (evidence: `src/data/milestoneProcessor.ts`)
