# yating021/interactive-tech-tutor architecture

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

- Interactive diagram: https://gitdiagram.com/yating021/interactive-tech-tutor
- Repository: https://github.com/yating021/interactive-tech-tutor

## Overview

Interactive Tech Tutor is a browser-based learning platform: a learner chooses a technical topic, receives an AI-generated simulation, and explores it with canvas visuals, narration, voice controls, and topic chat. The frontend also supports authentication, quizzes, progress, and history. The API coordinates generation and learner-data operations, with Bedrock and AWS persistence described by the README. Source excerpts establish frontend/API and local-store links; AWS service links and some feature endpoints are documented but not visible in sampled handlers, so those are shown as unverified.

Main entry points: [`apps/api/src/index.ts`](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/index.ts) (API and generation), [`apps/web/src/App.tsx`](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/App.tsx) (Learning app), [`apps/api/src/store.ts`](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/store.ts) (Local JSON store), [`apps/web/src/api.ts`](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learn["Learning experience"]
  node_web["Learning app<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_canvas["Canvas renderer"]
  node_web_types["Learning models<br/>[types.ts]"]
end

subgraph group_api["API services"]
  node_api_server["API and generation<br/>[index.ts]"]
  node_auth["JWT authentication<br/>[auth.ts]"]
  node_seed["Topics and quizzes<br/>[seed.ts]"]
  node_api_types["Domain models<br/>[types.ts]"]
  node_bedrock["AWS Bedrock"]
end

subgraph group_persist["Learner data"]
  node_store[("Local JSON store<br/>[store.ts]")]
  node_dynamodb[("DynamoDB")]
  node_s3[("S3 simulation cache")]
  node_backup_export["Backup export<br/>[backup-export.ts]"]
  node_backup_import["Backup import<br/>[backup-import.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_web
node_web -->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_api_server
node_web -->|"renders simulation"| node_canvas
node_web -->|"uses models"| node_web_types
node_api_server -->|"uses models"| node_api_types
node_api_server -->|"uses defaults"| node_seed
node_api_server -->|"authenticates requests"| node_auth
node_api_server -.->|"generates content"| node_bedrock
node_api_server -->|"reads and writes"| node_store
node_auth -.->|"checks sessions"| node_dynamodb
node_api_server -.->|"stores learner data"| node_dynamodb
node_api_server -.->|"caches simulations"| node_s3
node_backup_export -->|"reads snapshot"| node_store
node_backup_import -->|"restores snapshot"| node_store

click node_web "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/App.tsx"
click node_api_client "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/api.ts"
click node_canvas "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/SimulationCanvasRenderer.ts"
click node_web_types "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/types.ts"
click node_api_server "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/index.ts"
click node_auth "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/auth.ts"
click node_seed "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/seed.ts"
click node_api_types "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/types.ts"
click node_store "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/store.ts"
click node_backup_export "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/backup-export.ts"
click node_backup_import "https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/backup-import.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_web,node_api_client,node_canvas,node_web_types toneBlue
class node_api_server,node_auth,node_seed,node_api_types,node_bedrock toneAmber
class node_store,node_dynamodb,node_s3,node_backup_export,node_backup_import toneMint
class node_learner toneIndigo
```

## Components

### Learning experience

- [Learning app](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [API client](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/api.ts): `apps/web/src/api.ts`
- [Canvas renderer](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/SimulationCanvasRenderer.ts): `apps/web/src/SimulationCanvasRenderer.ts`
- [Learning models](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/web/src/types.ts): `apps/web/src/types.ts`

### API services

- [API and generation](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/index.ts): `apps/api/src/index.ts`
- [JWT authentication](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/auth.ts): `apps/api/src/auth.ts`
- [Topics and quizzes](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/seed.ts): `apps/api/src/seed.ts`
- [Domain models](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/types.ts): `apps/api/src/types.ts`
- **AWS Bedrock**

### Learner data

- [Local JSON store](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/store.ts): `apps/api/src/store.ts`
- **DynamoDB**
- **S3 simulation cache**
- [Backup export](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/backup-export.ts): `apps/api/src/backup-export.ts`
- [Backup import](https://github.com/yating021/interactive-tech-tutor/blob/master/apps/api/src/backup-import.ts): `apps/api/src/backup-import.ts`

### Other components

- **Learner**

## Connections

- Learner → Learning app: uses (evidence: `README.md`)
- Learning app → API client: requests data (evidence: `apps/web/src/App.tsx`)
- API client → API and generation: calls API (evidence: `README.md`)
- Learning app → Canvas renderer: renders simulation (evidence: `apps/web/src/App.tsx`)
- Learning app → Learning models: uses models (evidence: `apps/web/src/App.tsx`)
- API and generation → Domain models: uses models (evidence: `apps/api/src/index.ts`)
- API and generation → Topics and quizzes: uses defaults (evidence: `apps/api/src/index.ts`)
- API and generation → JWT authentication: authenticates requests (evidence: `apps/api/src/index.ts`)
- API and generation → AWS Bedrock: generates content (evidence: `README.md`)
- API and generation → Local JSON store: reads and writes (evidence: `apps/api/src/index.ts`)
- JWT authentication → DynamoDB: checks sessions (evidence: `apps/api/src/auth.ts`)
- API and generation → DynamoDB: stores learner data (evidence: `README.md`)
- API and generation → S3 simulation cache: caches simulations (evidence: `README.md`)
- Backup export → Local JSON store: reads snapshot (evidence: `apps/api/src/backup-export.ts`)
- Backup import → Local JSON store: restores snapshot (evidence: `apps/api/src/backup-import.ts`)
