# austinf02/english-flashcards architecture

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

- Interactive diagram: https://gitdiagram.com/austinf02/english-flashcards
- Repository: https://github.com/austinf02/english-flashcards

## Overview

Conf English is a browser-based English vocabulary flashcard and quiz app, with three decks, Japanese meanings and examples, pronunciation audio, quiz history, and device-local progress. The main workflow runs from a learner selecting cards in the app through study or quiz interactions; the app records progress locally and, when configured and signed in, synchronizes it through an authenticated API. The backend validates and applies progress operations. README documents deployment services and optional sign-in/sync; unsampled runtime wiring is shown only where documented.

Main entry points: [`src/app.ts`](https://github.com/austinf02/english-flashcards/blob/main/src/app.ts) (Study app), [`backend/index.py`](https://github.com/austinf02/english-flashcards/blob/main/backend/index.py) (Lambda entrypoint), [`src/auth.ts`](https://github.com/austinf02/english-flashcards/blob/main/src/auth.ts) (Cognito auth), [`src/cards.ts`](https://github.com/austinf02/english-flashcards/blob/main/src/cards.ts) (Deck content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_study["Study experience"]
  node_app["Study app<br/>[app.ts]"]
  node_decks["Deck content<br/>[cards.ts]"]
  node_quiz["Quiz engine<br/>[quiz.ts]"]
  node_audio["Audio playback<br/>[audio.ts]"]
  node_history["Quiz history<br/>[quizHistory.ts]"]
end

subgraph group_progress["Progress and sync"]
  node_progressmodel["Progress model<br/>[progress.ts]"]
  node_device["Device tracking<br/>[device.ts]"]
  node_localstore[("Local progress<br/>[storage.ts]")]
  node_cloudsync["Cloud sync<br/>[cloud.ts]"]
end

subgraph group_identity["Identity"]
  node_config["Runtime config<br/>[config.ts]"]
  node_auth["Cognito auth<br/>[auth.ts]"]
end

subgraph group_backend["Progress backend"]
  node_lambda["Lambda entrypoint<br/>[index.py]"]
  node_handler["Progress handler<br/>[handler.py]"]
end

subgraph group_content["Content assets"]
  node_audiofiles["Pronunciation MP3s"]
end

node_learner(("Learner"))
node_cognito["Amazon Cognito"]
node_api["Progress API"]
node_ddb[("Progress table")]

node_learner -->|"studies with"| node_app
node_app -->|"loads decks"| node_decks
node_app -->|"builds and scores"| node_quiz
node_app -->|"plays clips"| node_audio
node_app -->|"loads history"| node_history
node_app -->|"records progress"| node_progressmodel
node_app -->|"tracks device"| node_device
node_app -->|"saves progress"| node_localstore
node_app -->|"syncs progress"| node_cloudsync
node_app -->|"loads config"| node_config
node_app -->|"handles login"| node_auth
node_localstore -->|"uses model"| node_progressmodel
node_decks -->|"references clips"| node_audiofiles
node_app -.->|"plays pronunciation"| node_audiofiles
node_cloudsync -->|"sends sync requests"| node_api
node_auth -->|"authenticates with"| node_cognito
node_config -->|"provides settings"| node_auth
node_api -->|"routes requests"| node_lambda
node_lambda -->|"calls handler"| node_handler
node_lambda -->|"reads and writes"| node_ddb
node_api -->|"authorizes requests"| node_cognito
node_lambda -->|"deletes user"| node_cognito

click node_app "https://github.com/austinf02/english-flashcards/blob/main/src/app.ts"
click node_decks "https://github.com/austinf02/english-flashcards/blob/main/src/cards.ts"
click node_quiz "https://github.com/austinf02/english-flashcards/blob/main/src/quiz.ts"
click node_audio "https://github.com/austinf02/english-flashcards/blob/main/src/audio.ts"
click node_history "https://github.com/austinf02/english-flashcards/blob/main/src/quizHistory.ts"
click node_progressmodel "https://github.com/austinf02/english-flashcards/blob/main/src/progress.ts"
click node_device "https://github.com/austinf02/english-flashcards/blob/main/src/device.ts"
click node_localstore "https://github.com/austinf02/english-flashcards/blob/main/src/storage.ts"
click node_cloudsync "https://github.com/austinf02/english-flashcards/blob/main/src/cloud.ts"
click node_config "https://github.com/austinf02/english-flashcards/blob/main/src/config.ts"
click node_auth "https://github.com/austinf02/english-flashcards/blob/main/src/auth.ts"
click node_lambda "https://github.com/austinf02/english-flashcards/blob/main/backend/index.py"
click node_handler "https://github.com/austinf02/english-flashcards/blob/main/backend/handler.py"
click node_audiofiles "https://github.com/austinf02/english-flashcards/tree/main/public/audio"

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_decks,node_quiz,node_audio,node_history toneBlue
class node_progressmodel,node_device,node_localstore,node_cloudsync,node_ddb toneAmber
class node_config,node_auth,node_api toneMint
class node_lambda,node_handler toneRose
class node_audiofiles,node_learner,node_cognito toneIndigo
```

## Components

### Study experience

- [Study app](https://github.com/austinf02/english-flashcards/blob/main/src/app.ts): `src/app.ts`
- [Deck content](https://github.com/austinf02/english-flashcards/blob/main/src/cards.ts): `src/cards.ts`
- [Quiz engine](https://github.com/austinf02/english-flashcards/blob/main/src/quiz.ts): `src/quiz.ts`
- [Audio playback](https://github.com/austinf02/english-flashcards/blob/main/src/audio.ts): `src/audio.ts`
- [Quiz history](https://github.com/austinf02/english-flashcards/blob/main/src/quizHistory.ts): `src/quizHistory.ts`

### Progress and sync

- [Progress model](https://github.com/austinf02/english-flashcards/blob/main/src/progress.ts): `src/progress.ts`
- [Device tracking](https://github.com/austinf02/english-flashcards/blob/main/src/device.ts): `src/device.ts`
- [Local progress](https://github.com/austinf02/english-flashcards/blob/main/src/storage.ts): `src/storage.ts`
- [Cloud sync](https://github.com/austinf02/english-flashcards/blob/main/src/cloud.ts): `src/cloud.ts`

### Identity

- [Runtime config](https://github.com/austinf02/english-flashcards/blob/main/src/config.ts): `src/config.ts`
- [Cognito auth](https://github.com/austinf02/english-flashcards/blob/main/src/auth.ts): `src/auth.ts`

### Progress backend

- [Lambda entrypoint](https://github.com/austinf02/english-flashcards/blob/main/backend/index.py): `backend/index.py`
- [Progress handler](https://github.com/austinf02/english-flashcards/blob/main/backend/handler.py): `backend/handler.py`

### Content assets

- [Pronunciation MP3s](https://github.com/austinf02/english-flashcards/tree/main/public/audio): `public/audio`

### Other components

- **Learner**
- **Amazon Cognito**
- **Progress API**
- **Progress table**

## Connections

- Learner → Study app: studies with (evidence: `README.md`)
- Study app → Deck content: loads decks (evidence: `src/app.ts`)
- Study app → Quiz engine: builds and scores (evidence: `src/app.ts`)
- Study app → Audio playback: plays clips (evidence: `src/app.ts`)
- Study app → Quiz history: loads history (evidence: `src/app.ts`)
- Study app → Progress model: records progress (evidence: `src/app.ts`)
- Study app → Device tracking: tracks device (evidence: `src/app.ts`)
- Study app → Local progress: saves progress (evidence: `src/app.ts`)
- Study app → Cloud sync: syncs progress (evidence: `src/app.ts`)
- Study app → Runtime config: loads config (evidence: `src/app.ts`)
- Study app → Cognito auth: handles login (evidence: `src/app.ts`)
- Local progress → Progress model: uses model (evidence: `src/storage.ts`)
- Deck content → Pronunciation MP3s: references clips (evidence: `src/cards.ts`)
- Study app → Pronunciation MP3s: plays pronunciation (evidence: `README.md`)
- Cloud sync → Progress API: sends sync requests (evidence: `README.md`)
- Cognito auth → Amazon Cognito: authenticates with (evidence: `src/auth.ts`)
- Runtime config → Cognito auth: provides settings (evidence: `src/config.ts`)
- Progress API → Lambda entrypoint: routes requests (evidence: `README.md`)
- Lambda entrypoint → Progress handler: calls handler (evidence: `backend/index.py`)
- Lambda entrypoint → Progress table: reads and writes (evidence: `backend/index.py`)
- Progress API → Amazon Cognito: authorizes requests (evidence: `README.md`)
- Lambda entrypoint → Amazon Cognito: deletes user (evidence: `backend/index.py`)
