# saksham1387/repeet architecture

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

- Interactive diagram: https://gitdiagram.com/saksham1387/repeet
- Repository: https://github.com/saksham1387/repeet

## Overview

Repeet is a local-first Chrome extension for capturing accepted LeetCode solutions, attaching reflection notes, and reviewing problems with spaced repetition. Its main workflow runs from a LeetCode submission through capture and persistence into a review card, then resurfaces due cards for rated recall. The dashboard also supports library management, backups, rescheduling, and activity history; the popup summarizes due work and activity. Relationships for unsampled UI modules are based on README-described capabilities, not inspected implementation.

Main entry points: [`src/background/index.ts`](https://github.com/saksham1387/repeet/blob/main/src/background/index.ts) (Message and deck worker), [`src/dashboard/App.tsx`](https://github.com/saksham1387/repeet/blob/main/src/dashboard/App.tsx) (Dashboard shell), [`src/popup/App.tsx`](https://github.com/saksham1387/repeet/blob/main/src/popup/App.tsx) (Popup summary), [`src/content/NotePanel.tsx`](https://github.com/saksham1387/repeet/blob/main/src/content/NotePanel.tsx) (Reflection panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and notes"]
  node_injector["Submission detector<br/>[inject.ts]"]
  node_content["Content entry<br/>[index.tsx]"]
  node_note_panel["Reflection panel<br/>[NotePanel.tsx]"]
end

subgraph group_review["Review scheduling"]
  node_srs["SM-2 scheduler<br/>[srs.ts]"]
  node_review_tab["Review session<br/>[ReviewTab.tsx]"]
end

subgraph group_surfaces["Extension surfaces"]
  node_dashboard["Dashboard shell<br/>[App.tsx]"]
  node_library_tab["Library and backups<br/>[LibraryTab.tsx]"]
  node_daily_log["Daily activity log<br/>[DailyLogTab.tsx]"]
  node_popup["Popup summary<br/>[App.tsx]"]
  node_theme["Theme control<br/>[ThemeToggle.tsx]"]
end

subgraph group_shared["Shared runtime"]
  node_worker["Message and deck worker<br/>[index.ts]"]
  node_storage_api["Question storage<br/>[storage.ts]"]
  node_local_store[("Local deck")]
  node_query["Deck queries<br/>[query.ts]"]
end

node_leetcode(("LeetCode"))
node_user(("User"))

node_leetcode -->|"submits solution"| node_injector
node_injector -->|"reports accepted"| node_worker
node_content -->|"shows reflection"| node_note_panel
node_worker -->|"reads and writes"| node_storage_api
node_storage_api -->|"persists deck"| node_local_store
node_worker -->|"applies rating"| node_srs
node_worker -->|"counts due cards"| node_query
node_user -->|"rates recall"| node_review_tab
node_review_tab -.->|"submits review"| node_worker
node_user -->|"writes notes"| node_note_panel
node_note_panel -.->|"saves notes"| node_worker
node_user -->|"manages deck"| node_library_tab
node_library_tab -.->|"requests deck changes"| node_worker
node_dashboard -.->|"hosts review"| node_review_tab
node_dashboard -.->|"hosts library"| node_library_tab
node_dashboard -.->|"hosts activity log"| node_daily_log
node_daily_log -.->|"summarizes activity"| node_query
node_user -->|"opens summary"| node_popup
node_popup -->|"loads deck"| node_storage_api
node_popup -->|"computes summary"| node_query
node_user -->|"changes theme"| node_theme

click node_injector "https://github.com/saksham1387/repeet/blob/main/src/content/inject.ts"
click node_content "https://github.com/saksham1387/repeet/blob/main/src/content/index.tsx"
click node_note_panel "https://github.com/saksham1387/repeet/blob/main/src/content/NotePanel.tsx"
click node_worker "https://github.com/saksham1387/repeet/blob/main/src/background/index.ts"
click node_storage_api "https://github.com/saksham1387/repeet/blob/main/src/shared/storage.ts"
click node_srs "https://github.com/saksham1387/repeet/blob/main/src/shared/srs.ts"
click node_query "https://github.com/saksham1387/repeet/blob/main/src/shared/query.ts"
click node_dashboard "https://github.com/saksham1387/repeet/blob/main/src/dashboard/App.tsx"
click node_review_tab "https://github.com/saksham1387/repeet/blob/main/src/dashboard/ReviewTab.tsx"
click node_library_tab "https://github.com/saksham1387/repeet/blob/main/src/dashboard/LibraryTab.tsx"
click node_daily_log "https://github.com/saksham1387/repeet/blob/main/src/dashboard/DailyLogTab.tsx"
click node_popup "https://github.com/saksham1387/repeet/blob/main/src/popup/App.tsx"
click node_theme "https://github.com/saksham1387/repeet/blob/main/src/components/ThemeToggle.tsx"

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_injector,node_content,node_note_panel,node_user toneBlue
class node_srs,node_review_tab toneAmber
class node_dashboard,node_library_tab,node_daily_log,node_popup,node_theme toneMint
class node_worker,node_storage_api,node_local_store,node_query toneRose
class node_leetcode toneIndigo
```

## Components

### Capture and notes

- [Submission detector](https://github.com/saksham1387/repeet/blob/main/src/content/inject.ts): `src/content/inject.ts`
- [Content entry](https://github.com/saksham1387/repeet/blob/main/src/content/index.tsx): `src/content/index.tsx`
- [Reflection panel](https://github.com/saksham1387/repeet/blob/main/src/content/NotePanel.tsx): `src/content/NotePanel.tsx`

### Review scheduling

- [SM-2 scheduler](https://github.com/saksham1387/repeet/blob/main/src/shared/srs.ts): `src/shared/srs.ts`
- [Review session](https://github.com/saksham1387/repeet/blob/main/src/dashboard/ReviewTab.tsx): `src/dashboard/ReviewTab.tsx`

### Extension surfaces

- [Dashboard shell](https://github.com/saksham1387/repeet/blob/main/src/dashboard/App.tsx): `src/dashboard/App.tsx`
- [Library and backups](https://github.com/saksham1387/repeet/blob/main/src/dashboard/LibraryTab.tsx): `src/dashboard/LibraryTab.tsx`
- [Daily activity log](https://github.com/saksham1387/repeet/blob/main/src/dashboard/DailyLogTab.tsx): `src/dashboard/DailyLogTab.tsx`
- [Popup summary](https://github.com/saksham1387/repeet/blob/main/src/popup/App.tsx): `src/popup/App.tsx`
- [Theme control](https://github.com/saksham1387/repeet/blob/main/src/components/ThemeToggle.tsx): `src/components/ThemeToggle.tsx`

### Shared runtime

- [Message and deck worker](https://github.com/saksham1387/repeet/blob/main/src/background/index.ts): `src/background/index.ts`
- [Question storage](https://github.com/saksham1387/repeet/blob/main/src/shared/storage.ts): `src/shared/storage.ts`
- **Local deck**
- [Deck queries](https://github.com/saksham1387/repeet/blob/main/src/shared/query.ts): `src/shared/query.ts`

### Other components

- **LeetCode**
- **User**

## Connections

- LeetCode → Submission detector: submits solution (evidence: `README.md`)
- Submission detector → Message and deck worker: reports accepted (evidence: `README.md`)
- Content entry → Reflection panel: shows reflection (evidence: `README.md`)
- Message and deck worker → Question storage: reads and writes (evidence: `src/background/index.ts`)
- Question storage → Local deck: persists deck (evidence: `src/shared/storage.ts`)
- Message and deck worker → SM-2 scheduler: applies rating (evidence: `src/background/index.ts`)
- Message and deck worker → Deck queries: counts due cards (evidence: `src/background/index.ts`)
- User → Review session: rates recall (evidence: `README.md`)
- Review session → Message and deck worker: submits review
- User → Reflection panel: writes notes (evidence: `README.md`)
- Reflection panel → Message and deck worker: saves notes
- User → Library and backups: manages deck (evidence: `README.md`)
- Library and backups → Message and deck worker: requests deck changes
- Dashboard shell → Review session: hosts review
- Dashboard shell → Library and backups: hosts library
- Dashboard shell → Daily activity log: hosts activity log
- Daily activity log → Deck queries: summarizes activity
- User → Popup summary: opens summary (evidence: `README.md`)
- Popup summary → Question storage: loads deck (evidence: `src/popup/App.tsx`)
- Popup summary → Deck queries: computes summary (evidence: `src/popup/App.tsx`)
- User → Theme control: changes theme (evidence: `README.md`)
