# vginski9-cmyk/rosie architecture

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

- Interactive diagram: https://gitdiagram.com/vginski9-cmyk/rosie
- Repository: https://github.com/vginski9-cmyk/rosie

## Overview

Rosie is a workforce-aligned education-program planning app. Program leads author curriculum and cohort targets, evaluate the enrollment-to-employment funnel, and model delivery capacity; operational planning then compares concurrent demand with staffing and clinical-site supply. The README documents the end-to-end product scope, while sampled source confirms selected pipeline, calendar, persistence, and export behavior. Some feature wiring is documented but not sampled, so uncertain implementation-level links are omitted.

Main entry points: [`src/lib/db.ts`](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/db.ts) (Application database), [`src/app/api/programs/[id]/export/route.ts`](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/programs/%5Bid%5D/export/route.ts) (Program workbook export), [`src/lib/calendarquery.ts`](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/calendarquery.ts) (Calendar query), [`src/lib/funnel.ts`](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/funnel.ts) (Funnel analytics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_author["Program authoring"]
  node_portfolio["Portfolio dashboard<br/>[page.tsx]"]
  node_program["Program design<br/>[page.tsx]"]
  node_structure["Structure editor<br/>[page.tsx]"]
  node_sequencer["Course sequencer"]
  node_actions["Authoring actions<br/>[actions.ts]"]
  node_sequence_api["Sequence endpoint<br/>[route.ts]"]
end

subgraph group_funnel["Talent pipeline"]
  node_goals["Goal planner<br/>[page.tsx]"]
  node_funnel_engine["Funnel analytics<br/>[funnel.ts]"]
  node_pipeline["Cohort pipeline facts<br/>[pipeline.ts]"]
  node_actuals["Learner stage actuals<br/>[pipelineactuals.ts]"]
  node_students["Student records<br/>[page.tsx]"]
end

subgraph group_capacity["Capacity planning"]
  node_capacity_ui["Capacity workbench"]
  node_capacity_engine["Capacity engine<br/>[capacity.ts]"]
  node_operations["Operations planning<br/>[page.tsx]"]
end

subgraph group_clinical["Clinical operations"]
  node_calendar["Master calendar<br/>[page.tsx]"]
  node_calendar_data["Calendar query<br/>[calendarquery.ts]"]
  node_clinical_supply["Clinical supply<br/>[clinicalsupply.ts]"]
  node_wbl["WBL alignment<br/>[wbl.ts]"]
end

subgraph group_insights["Analytics and exports"]
  node_insights["Planning insights<br/>[page.tsx]"]
  node_program_export["Program workbook export<br/>[route.ts]"]
  node_asset_export["Clinical asset export<br/>[route.ts]"]
end

node_lead(("Program lead"))
node_db[("Application database<br/>[db.ts]")]
node_stakeholders(("Employer and staff"))

node_lead -->|"opens portfolio"| node_portfolio
node_portfolio -->|"selects program"| node_program
node_program -->|"edits structure"| node_structure
node_structure -->|"saves changes"| node_actions
node_sequencer -->|"submits ordering"| node_sequence_api
node_sequence_api -->|"updates courses"| node_db
node_actions -->|"persists authoring"| node_db
node_lead -->|"sets targets"| node_goals
node_students -->|"stage records"| node_actuals
node_actuals -->|"reads and updates"| node_db
node_goals -->|"analyzes funnel"| node_funnel_engine
node_pipeline -->|"pivots facts"| node_funnel_engine
node_lead -->|"tests enrollment"| node_capacity_ui
node_capacity_ui -->|"computes demand"| node_capacity_engine
node_operations -->|"models capacity"| node_capacity_engine
node_calendar -->|"requests schedule"| node_calendar_data
node_calendar_data -->|"loads schedules"| node_db
node_calendar_data -->|"shows assignments"| node_stakeholders
node_operations -->|"compares supply"| node_clinical_supply
node_lead -.->|"reviews alignment"| node_wbl
node_lead -->|"reviews metrics"| node_insights
node_program_export -->|"loads program data"| node_db
node_program_export -->|"calculates demand"| node_capacity_engine
node_program_export -->|"analyzes stages"| node_funnel_engine
node_lead -->|"downloads workbook"| node_program_export
node_asset_export -->|"loads asset map"| node_db
node_asset_export -->|"exports site data"| node_stakeholders

click node_portfolio "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/page.tsx"
click node_program "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/programs/%5Bid%5D/page.tsx"
click node_structure "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/programs/%5Bid%5D/structure/page.tsx"
click node_sequencer "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/components/CourseSequencer.tsx"
click node_actions "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/actions.ts"
click node_sequence_api "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/programs/%5Bid%5D/sequence/route.ts"
click node_db "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/db.ts"
click node_goals "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/goals/page.tsx"
click node_funnel_engine "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/funnel.ts"
click node_pipeline "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/pipeline.ts"
click node_actuals "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/pipelineactuals.ts"
click node_students "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/students/page.tsx"
click node_capacity_ui "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/components/CapacityWorkbench.tsx"
click node_capacity_engine "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/capacity.ts"
click node_operations "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/(insights)/capacity/page.tsx"
click node_calendar "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/calendar/page.tsx"
click node_calendar_data "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/calendarquery.ts"
click node_clinical_supply "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/clinicalsupply.ts"
click node_wbl "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/wbl.ts"
click node_insights "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/(insights)/insights/page.tsx"
click node_program_export "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/programs/%5Bid%5D/export/route.ts"
click node_asset_export "https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/asset-map/route.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_portfolio,node_program,node_structure,node_sequencer,node_actions,node_sequence_api toneBlue
class node_goals,node_funnel_engine,node_pipeline,node_actuals,node_students,node_db toneAmber
class node_capacity_ui,node_capacity_engine,node_operations toneMint
class node_calendar,node_calendar_data,node_clinical_supply,node_wbl toneRose
class node_insights,node_program_export,node_asset_export,node_lead,node_stakeholders toneIndigo
```

## Components

### Program authoring

- [Portfolio dashboard](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/page.tsx): `src/app/page.tsx`
- [Program design](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/programs/%5Bid%5D/page.tsx): `src/app/programs/[id]/page.tsx`
- [Structure editor](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/programs/%5Bid%5D/structure/page.tsx): `src/app/programs/[id]/structure/page.tsx`
- [Course sequencer](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/components/CourseSequencer.tsx): `src/components/CourseSequencer.tsx`
- [Authoring actions](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/actions.ts): `src/lib/actions.ts`
- [Sequence endpoint](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/programs/%5Bid%5D/sequence/route.ts): `src/app/api/programs/[id]/sequence/route.ts`

### Talent pipeline

- [Goal planner](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/goals/page.tsx): `src/app/goals/page.tsx`
- [Funnel analytics](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/funnel.ts): `src/lib/funnel.ts`
- [Cohort pipeline facts](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/pipeline.ts): `src/lib/pipeline.ts`
- [Learner stage actuals](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/pipelineactuals.ts): `src/lib/pipelineactuals.ts`
- [Student records](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/students/page.tsx): `src/app/students/page.tsx`

### Capacity planning

- [Capacity workbench](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/components/CapacityWorkbench.tsx): `src/components/CapacityWorkbench.tsx`
- [Capacity engine](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/capacity.ts): `src/lib/capacity.ts`
- [Operations planning](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/(insights)/capacity/page.tsx): `src/app/(insights)/capacity/page.tsx`

### Clinical operations

- [Master calendar](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/calendar/page.tsx): `src/app/calendar/page.tsx`
- [Calendar query](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/calendarquery.ts): `src/lib/calendarquery.ts`
- [Clinical supply](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/clinicalsupply.ts): `src/lib/clinicalsupply.ts`
- [WBL alignment](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/wbl.ts): `src/lib/wbl.ts`

### Analytics and exports

- [Planning insights](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/(insights)/insights/page.tsx): `src/app/(insights)/insights/page.tsx`
- [Program workbook export](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/programs/%5Bid%5D/export/route.ts): `src/app/api/programs/[id]/export/route.ts`
- [Clinical asset export](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/app/api/asset-map/route.ts): `src/app/api/asset-map/route.ts`

### Other components

- **Program lead**
- [Application database](https://github.com/vginski9-cmyk/rosie/blob/claude/beautiful-wozniak-s9lf4d/src/lib/db.ts): `src/lib/db.ts`
- **Employer and staff**

## Connections

- Program lead → Portfolio dashboard: opens portfolio
- Portfolio dashboard → Program design: selects program
- Program design → Structure editor: edits structure
- Structure editor → Authoring actions: saves changes
- Course sequencer → Sequence endpoint: submits ordering
- Sequence endpoint → Application database: updates courses
- Authoring actions → Application database: persists authoring
- Program lead → Goal planner: sets targets
- Student records → Learner stage actuals: stage records
- Learner stage actuals → Application database: reads and updates
- Goal planner → Funnel analytics: analyzes funnel
- Cohort pipeline facts → Funnel analytics: pivots facts
- Program lead → Capacity workbench: tests enrollment
- Capacity workbench → Capacity engine: computes demand
- Operations planning → Capacity engine: models capacity
- Master calendar → Calendar query: requests schedule
- Calendar query → Application database: loads schedules
- Calendar query → Employer and staff: shows assignments
- Operations planning → Clinical supply: compares supply
- Program lead → WBL alignment: reviews alignment
- Program lead → Planning insights: reviews metrics
- Program workbook export → Application database: loads program data
- Program workbook export → Capacity engine: calculates demand
- Program workbook export → Funnel analytics: analyzes stages
- Program lead → Program workbook export: downloads workbook
- Clinical asset export → Application database: loads asset map
- Clinical asset export → Employer and staff: exports site data
