# kinman1313/bard2rosie architecture

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

- Interactive diagram: https://gitdiagram.com/kinman1313/bard2rosie
- Repository: https://github.com/kinman1313/bard2rosie

## Overview

Chronicle is a family memoir platform: memories enter through photos and written context, guided interviews, recordings, or email replies; they become reviewed chapters that families can read, hear, share, and print. The graph preserves the documented collaboration, entity-management, voice, and publishing branches. Source excerpts show chapter generation and entity-management behavior, plus a separate stateless video-render worker; other links are based on README statements, so unsampled implementation details are not inferred.

Main entry points: [`chronicle/src/app/chronicle`](https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/chronicle) (Chapter archive), [`chronicle/src/app/api/generate-chapter/route.ts`](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/generate-chapter/route.ts) (Chapter generation), [`chronicle/src/app/api/tts/route.ts`](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/tts/route.ts) (Voice and narration), [`chronicle/src/app/upload`](https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/upload) (Memory entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Memory capture"]
  node_capture_ui["Memory entry"]
  node_interview["Guided interview<br/>[InterviewFlow.tsx]"]
  node_email_prompts["Email prompts<br/>[send-prompt.ts]"]
  node_inbound["Email and audio intake<br/>[route.ts]"]
  node_drafts["Story Inbox"]
end

subgraph group_chapters["Chapter and archive"]
  node_chapter_api["Chapter generation<br/>[route.ts]"]
  node_prompt["Narrative prompt<br/>[prompt.ts]"]
  node_ai["Claude AI"]
  node_chapter_archive[("Chapter archive")]
  node_entities["People and relationships"]
  node_merge_picker["Entity merge picker"]
  node_guide["Chronicle Guide<br/>[route.ts]"]
end

subgraph group_family["Family collaboration"]
  node_family_admin["Family workspace"]
  node_notifications["Notifications<br/>[route.ts]"]
end

subgraph group_media["Listening and media"]
  node_voice["Voice and narration<br/>[route.ts]"]
  node_voice_services["Speech services"]
  node_bequests["Voice bequests<br/>[route.ts]"]
  node_video_worker["Video render worker<br/>[server.ts]"]
  node_render["Video rendering<br/>[render.ts]"]
end

subgraph group_publishing["Sharing and publishing"]
  node_sharing["Private sharing<br/>[route.ts]"]
  node_book_order["Printed book orders<br/>[route.ts]"]
  node_payments_print["Payment and print"]
  node_search["Chapter search<br/>[route.ts]"]
end

node_family(("Family storyteller"))

node_family -->|"shares memories"| node_capture_ui
node_family -->|"answers questions"| node_interview
node_family -->|"replies to prompts"| node_email_prompts
node_email_prompts -->|"routes replies"| node_inbound
node_inbound -->|"creates drafts"| node_drafts
node_interview -->|"supplies transcript"| node_chapter_api
node_capture_ui -->|"submits memory"| node_chapter_api
node_chapter_api -->|"builds prompt"| node_prompt
node_chapter_api -->|"streams generation"| node_ai
node_chapter_api -->|"saves chapter"| node_chapter_archive
node_chapter_api -->|"uses family context"| node_entities
node_entities -->|"renders picker"| node_merge_picker
node_family -->|"reviews drafts"| node_drafts
node_family -->|"manages family"| node_family_admin
node_family_admin -->|"sets preferences"| node_notifications
node_chapter_archive -->|"provides memory context"| node_guide
node_chapter_archive -->|"narrates chapters"| node_voice
node_voice -->|"requests speech"| node_voice_services
node_voice -->|"supports delivery"| node_bequests
node_chapter_archive -->|"shares chapters"| node_sharing
node_chapter_archive -->|"searches content"| node_search
node_chapter_archive -->|"selects chapters"| node_book_order
node_book_order -->|"orders printed book"| node_payments_print
node_video_worker -->|"invokes rendering"| node_render

click node_capture_ui "https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/upload"
click node_interview "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/components/InterviewFlow.tsx"
click node_email_prompts "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/lib/storytellers/send-prompt.ts"
click node_inbound "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/inbound-email/route.ts"
click node_drafts "https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/family/drafts"
click node_chapter_api "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/generate-chapter/route.ts"
click node_prompt "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/generate-chapter/prompt.ts"
click node_chapter_archive "https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/chronicle"
click node_entities "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/components/entities/EntityRecordManager.tsx"
click node_merge_picker "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/components/entities/MergeEntityPicker.tsx"
click node_guide "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/guide/route.ts"
click node_family_admin "https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/family/settings"
click node_notifications "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/notifications/route.ts"
click node_voice "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/tts/route.ts"
click node_bequests "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/bequest/route.ts"
click node_video_worker "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/worker/src/server.ts"
click node_render "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/worker/src/render.ts"
click node_sharing "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/create-share/route.ts"
click node_book_order "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/create-book-order/route.ts"
click node_search "https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/search/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_capture_ui,node_interview,node_email_prompts,node_inbound,node_drafts toneBlue
class node_chapter_api,node_prompt,node_ai,node_chapter_archive,node_entities,node_merge_picker,node_guide toneAmber
class node_family_admin,node_notifications toneMint
class node_voice,node_voice_services,node_bequests,node_video_worker,node_render toneRose
class node_sharing,node_book_order,node_payments_print,node_search,node_family toneIndigo
```

## Components

### Memory capture

- [Memory entry](https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/upload): `chronicle/src/app/upload`
- [Guided interview](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/components/InterviewFlow.tsx): `chronicle/src/components/InterviewFlow.tsx`
- [Email prompts](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/lib/storytellers/send-prompt.ts): `chronicle/src/lib/storytellers/send-prompt.ts`
- [Email and audio intake](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/inbound-email/route.ts): `chronicle/src/app/api/inbound-email/route.ts`
- [Story Inbox](https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/family/drafts): `chronicle/src/app/family/drafts`

### Chapter and archive

- [Chapter generation](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/generate-chapter/route.ts): `chronicle/src/app/api/generate-chapter/route.ts`
- [Narrative prompt](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/generate-chapter/prompt.ts): `chronicle/src/app/api/generate-chapter/prompt.ts`
- **Claude AI**
- [Chapter archive](https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/chronicle): `chronicle/src/app/chronicle`
- [People and relationships](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/components/entities/EntityRecordManager.tsx): `chronicle/src/components/entities/EntityRecordManager.tsx`
- [Entity merge picker](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/components/entities/MergeEntityPicker.tsx): `chronicle/src/components/entities/MergeEntityPicker.tsx`
- [Chronicle Guide](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/guide/route.ts): `chronicle/src/app/api/guide/route.ts`

### Family collaboration

- [Family workspace](https://github.com/kinman1313/bard2rosie/tree/main/chronicle/src/app/family/settings): `chronicle/src/app/family/settings`
- [Notifications](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/notifications/route.ts): `chronicle/src/app/api/notifications/route.ts`

### Listening and media

- [Voice and narration](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/tts/route.ts): `chronicle/src/app/api/tts/route.ts`
- **Speech services**
- [Voice bequests](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/bequest/route.ts): `chronicle/src/app/api/bequest/route.ts`
- [Video render worker](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/worker/src/server.ts): `chronicle/worker/src/server.ts`
- [Video rendering](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/worker/src/render.ts): `chronicle/worker/src/render.ts`

### Sharing and publishing

- [Private sharing](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/create-share/route.ts): `chronicle/src/app/api/create-share/route.ts`
- [Printed book orders](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/create-book-order/route.ts): `chronicle/src/app/api/create-book-order/route.ts`
- **Payment and print**
- [Chapter search](https://github.com/kinman1313/bard2rosie/blob/main/chronicle/src/app/api/search/route.ts): `chronicle/src/app/api/search/route.ts`

### Other components

- **Family storyteller**

## Connections

- Family storyteller → Memory entry: shares memories (evidence: `README.md`)
- Family storyteller → Guided interview: answers questions (evidence: `README.md`)
- Family storyteller → Email prompts: replies to prompts (evidence: `README.md`)
- Email prompts → Email and audio intake: routes replies (evidence: `README.md`)
- Email and audio intake → Story Inbox: creates drafts (evidence: `README.md`)
- Guided interview → Chapter generation: supplies transcript (evidence: `README.md`)
- Memory entry → Chapter generation: submits memory (evidence: `README.md`)
- Chapter generation → Narrative prompt: builds prompt (evidence: `chronicle/src/app/api/generate-chapter/route.ts`)
- Chapter generation → Claude AI: streams generation (evidence: `chronicle/src/app/api/generate-chapter/route.ts`)
- Chapter generation → Chapter archive: saves chapter (evidence: `README.md`)
- Chapter generation → People and relationships: uses family context (evidence: `chronicle/src/app/api/generate-chapter/route.ts`)
- People and relationships → Entity merge picker: renders picker (evidence: `chronicle/src/components/entities/EntityRecordManager.tsx`)
- Family storyteller → Story Inbox: reviews drafts (evidence: `README.md`)
- Family storyteller → Family workspace: manages family (evidence: `README.md`)
- Family workspace → Notifications: sets preferences (evidence: `README.md`)
- Chapter archive → Chronicle Guide: provides memory context (evidence: `README.md`)
- Chapter archive → Voice and narration: narrates chapters (evidence: `README.md`)
- Voice and narration → Speech services: requests speech (evidence: `README.md`)
- Voice and narration → Voice bequests: supports delivery (evidence: `README.md`)
- Chapter archive → Private sharing: shares chapters (evidence: `README.md`)
- Chapter archive → Chapter search: searches content (evidence: `README.md`)
- Chapter archive → Printed book orders: selects chapters (evidence: `README.md`)
- Printed book orders → Payment and print: orders printed book (evidence: `README.md`)
- Video render worker → Video rendering: invokes rendering (evidence: `chronicle/worker/src/server.ts`)
