# abiel999-lab/ai-speaker-notes-ptlensa architecture

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

- Interactive diagram: https://gitdiagram.com/abiel999-lab/ai-speaker-notes-ptlensa
- Repository: https://github.com/abiel999-lab/ai-speaker-notes-ptlensa

## Overview

NotePreso is a monorepo for speaker-note generation, presentation generation, PowerPoint translation, and supporting website/admin surfaces. The clearest sampled user workflow is uploading a presentation, checking account limits, queueing a job, parsing slides, generating notes, and writing them back while validating document integrity. Current presentation production artifacts are under runtime-app; the README explicitly warns that the editable TypeScript baseline is historical. The graph emphasizes evidenced relationships; unsampled translation, billing, and other capabilities are retained as subsystem nodes, with uncertain links omitted.

Main entry points: [`app/app/services/pipeline.py`](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/pipeline.py) (Notes Pipeline), [`app/app/api/routes.py`](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/api/routes.py) (Generation API), [`presentation/runtime-app/server-dist/server/generation-routes.js`](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/server/generation-routes.js) (Generation Routes), [`admin/app/api/admin_routes.py`](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/admin/app/api/admin_routes.py) (Admin Console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_notes["Speaker Notes"]
  node_api["Generation API<br/>[routes.py]"]
  node_models["Job And Deck Models<br/>[models.py]"]
  node_pipeline["Notes Pipeline<br/>[pipeline.py]"]
  node_parser["PPTX Parser<br/>[ppt_parser.py]"]
  node_renderer["Slide Renderer<br/>[ppt_renderer.py]"]
  node_generator["Notes Generators<br/>[factory.py]"]
  node_writer["Notes Writer<br/>[notes_writer.py]"]
  node_integrity["Integrity Checks<br/>[integrity.py]"]
end

subgraph group_account["Accounts And Jobs"]
  node_auth["Authentication<br/>[auth.py]"]
  node_entitlements["Plan Entitlements<br/>[entitlements.py]"]
  node_jobstore[("Job Store<br/>[job_store.py]")]
  node_database[("Account Database<br/>[database.py]")]
end

subgraph group_presentation["Presentation Generator"]
  node_presentation_api["Generation Routes"]
  node_document_workflow["Document Workflow"]
  node_planner["Slide Planner<br/>[planner.js]"]
  node_layout["Slide Layout<br/>[layout.js]"]
  node_creative["Creative Design<br/>[creative.js]"]
  node_export["PPTX Export<br/>[export.js]"]
end

subgraph group_surfaces["Product Surfaces"]
  node_chat["AI Chat<br/>[chat.py]"]
  node_admin["Admin Console<br/>[admin_routes.py]"]
  node_translator["PowerPoint Translator<br/>[pipeline.py]"]
end

node_user(("User"))

node_user -.->|"uploads presentation"| node_api
node_api -->|"checks plan"| node_entitlements
node_api -->|"queues job"| node_jobstore
node_api -->|"dispatches job"| node_pipeline
node_pipeline -->|"parses slides"| node_parser
node_pipeline -->|"renders slides"| node_renderer
node_pipeline -->|"selects generator"| node_generator
node_pipeline -->|"writes notes"| node_writer
node_pipeline -->|"validates output"| node_integrity
node_parser -->|"creates deck"| node_models
node_writer -.->|"reads deck data"| node_models
node_auth -.->|"authenticates requests"| node_api
node_presentation_api -->|"dispatches workflow"| node_document_workflow
node_presentation_api -->|"uses planner"| node_planner
node_presentation_api -->|"uses layout"| node_layout
node_presentation_api -->|"uses creative design"| node_creative
node_document_workflow -.->|"exports presentation"| node_export
node_admin -->|"uses authentication"| node_auth
node_admin -.->|"administers accounts"| node_database

click node_api "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/api/routes.py"
click node_models "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/domain/models.py"
click node_pipeline "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/pipeline.py"
click node_parser "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/ppt_parser.py"
click node_renderer "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/ppt_renderer.py"
click node_generator "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/notes/factory.py"
click node_writer "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/notes_writer.py"
click node_integrity "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/integrity.py"
click node_auth "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/auth.py"
click node_entitlements "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/entitlements.py"
click node_jobstore "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/job_store.py"
click node_database "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/database.py"
click node_chat "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/chat.py"
click node_admin "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/admin/app/api/admin_routes.py"
click node_translator "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/pipeline.py"
click node_presentation_api "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/server/generation-routes.js"
click node_document_workflow "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/server/document-workflow.js"
click node_planner "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/planner.js"
click node_layout "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/layout.js"
click node_creative "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/creative.js"
click node_export "https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/export.js"

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_api,node_models,node_pipeline,node_parser,node_renderer,node_generator,node_writer,node_integrity,node_user toneBlue
class node_auth,node_entitlements,node_jobstore,node_database toneAmber
class node_presentation_api,node_document_workflow,node_planner,node_layout,node_creative,node_export toneMint
class node_chat,node_admin,node_translator toneRose
```

## Components

### Speaker Notes

- [Generation API](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/api/routes.py): `app/app/api/routes.py`
- [Job And Deck Models](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/domain/models.py): `app/app/domain/models.py`
- [Notes Pipeline](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/pipeline.py): `app/app/services/pipeline.py`
- [PPTX Parser](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/ppt_parser.py): `app/app/services/ppt_parser.py`
- [Slide Renderer](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/ppt_renderer.py): `app/app/services/ppt_renderer.py`
- [Notes Generators](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/notes/factory.py): `app/app/services/notes/factory.py`
- [Notes Writer](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/notes_writer.py): `app/app/services/notes_writer.py`
- [Integrity Checks](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/integrity.py): `app/app/services/integrity.py`

### Accounts And Jobs

- [Authentication](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/auth.py): `app/app/core/auth.py`
- [Plan Entitlements](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/entitlements.py): `app/app/core/entitlements.py`
- [Job Store](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/job_store.py): `app/app/core/job_store.py`
- [Account Database](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/core/database.py): `app/app/core/database.py`

### Presentation Generator

- [Generation Routes](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/server/generation-routes.js): `presentation/runtime-app/server-dist/server/generation-routes.js`
- [Document Workflow](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/server/document-workflow.js): `presentation/runtime-app/server-dist/server/document-workflow.js`
- [Slide Planner](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/planner.js): `presentation/runtime-app/server-dist/core/planner.js`
- [Slide Layout](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/layout.js): `presentation/runtime-app/server-dist/core/layout.js`
- [Creative Design](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/creative.js): `presentation/runtime-app/server-dist/core/creative.js`
- [PPTX Export](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/presentation/runtime-app/server-dist/core/export.js): `presentation/runtime-app/server-dist/core/export.js`

### Product Surfaces

- [AI Chat](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/chat.py): `app/app/services/chat.py`
- [Admin Console](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/admin/app/api/admin_routes.py): `admin/app/api/admin_routes.py`
- [PowerPoint Translator](https://github.com/abiel999-lab/ai-speaker-notes-ptlensa/blob/main/app/app/services/pipeline.py): `app/app/services/pipeline.py`

### Other components

- **User**

## Connections

- User → Generation API: uploads presentation
- Generation API → Plan Entitlements: checks plan (evidence: `app/app/api/routes.py`)
- Generation API → Job Store: queues job (evidence: `app/app/api/routes.py`)
- Generation API → Notes Pipeline: dispatches job (evidence: `app/app/api/routes.py`)
- Notes Pipeline → PPTX Parser: parses slides (evidence: `app/app/services/pipeline.py`)
- Notes Pipeline → Slide Renderer: renders slides (evidence: `app/app/services/pipeline.py`)
- Notes Pipeline → Notes Generators: selects generator (evidence: `app/app/services/pipeline.py`)
- Notes Pipeline → Notes Writer: writes notes (evidence: `app/app/services/pipeline.py`)
- Notes Pipeline → Integrity Checks: validates output (evidence: `app/app/services/pipeline.py`)
- PPTX Parser → Job And Deck Models: creates deck (evidence: `app/app/services/ppt_parser.py`)
- Notes Writer → Job And Deck Models: reads deck data (evidence: `app/app/services/notes_writer.py`)
- Authentication → Generation API: authenticates requests (evidence: `app/app/api/routes.py`)
- Generation Routes → Document Workflow: dispatches workflow (evidence: `presentation/runtime-app/server-dist/server/generation-routes.js`)
- Generation Routes → Slide Planner: uses planner (evidence: `presentation/runtime-app/server-dist/server/generation-routes.js`)
- Generation Routes → Slide Layout: uses layout (evidence: `presentation/runtime-app/server-dist/server/generation-routes.js`)
- Generation Routes → Creative Design: uses creative design (evidence: `presentation/runtime-app/server-dist/server/generation-routes.js`)
- Document Workflow → PPTX Export: exports presentation
- Admin Console → Authentication: uses authentication (evidence: `admin/app/api/admin_routes.py`)
- Admin Console → Account Database: administers accounts
