# synakr/le-git architecture

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

- Interactive diagram: https://gitdiagram.com/synakr/le-git
- Repository: https://github.com/synakr/le-git

## Overview

Le-Git is a local Electron lecture tracker: students create playlist or custom-video nodes, track viewing progress, and resume learning. The renderer communicates with Electron’s main process, which handles node actions, playlist retrieval, playback, and persistence in SQLite. The README also describes notes, goals, reminders, graphs, and hotkeys; their implementation is not present in the sampled source, so those capabilities are represented without speculative internal wiring. Upcoming browser capture and backup features are excluded.

Main entry points: [`main.js`](https://github.com/synakr/le-git/blob/main/main.js) (IPC handlers), [`src/db.js`](https://github.com/synakr/le-git/blob/main/src/db.js) (SQLite database), [`index.html`](https://github.com/synakr/le-git/blob/main/index.html) (Desktop interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Student experience"]
  node_renderer["Desktop interface<br/>[index.html]"]
end

subgraph group_runtime["Electron runtime"]
  node_main["IPC handlers<br/>[main.js]"]
end

subgraph group_learning["Learning features"]
  node_node_actions["Node management<br/>[main.js]"]
  node_playlist_import["Playlist import<br/>[main.js]"]
  node_custom_videos["Custom videos<br/>[main.js]"]
  node_progress["Progress tracking<br/>[main.js]"]
  node_notes_goals["Notes and goals<br/>[index.html]"]
  node_stats_reminders["Stats and reminders<br/>[index.html]"]
  node_shortcuts["Resume shortcuts<br/>[index.html]"]
  node_playback["Video playback<br/>[main.js]"]
end

subgraph group_storage["Local data"]
  node_sqlite[("SQLite database<br/>[db.js]")]
end

node_student(("Student"))
node_youtube_api["YouTube API"]
node_browser["External browser"]

node_student -->|"uses"| node_renderer
node_renderer -->|"sends IPC"| node_main
node_main -->|"dispatches"| node_node_actions
node_main -->|"dispatches"| node_playlist_import
node_main -->|"dispatches"| node_custom_videos
node_node_actions -->|"reads/writes"| node_sqlite
node_playlist_import -->|"fetches playlist"| node_youtube_api
node_playlist_import -->|"stores videos"| node_sqlite
node_custom_videos -->|"reads/writes"| node_sqlite
node_progress -->|"reads/writes"| node_sqlite
node_main -->|"recalculates"| node_progress
node_main -->|"dispatches"| node_playback
node_playback -->|"reads resume data"| node_sqlite
node_playback -->|"opens video"| node_browser
node_student -->|"uses"| node_notes_goals
node_student -->|"views"| node_stats_reminders
node_student -->|"uses"| node_shortcuts

click node_renderer "https://github.com/synakr/le-git/blob/main/index.html"
click node_main "https://github.com/synakr/le-git/blob/main/main.js"
click node_node_actions "https://github.com/synakr/le-git/blob/main/main.js"
click node_playlist_import "https://github.com/synakr/le-git/blob/main/main.js"
click node_custom_videos "https://github.com/synakr/le-git/blob/main/main.js"
click node_progress "https://github.com/synakr/le-git/blob/main/main.js"
click node_notes_goals "https://github.com/synakr/le-git/blob/main/index.html"
click node_stats_reminders "https://github.com/synakr/le-git/blob/main/index.html"
click node_shortcuts "https://github.com/synakr/le-git/blob/main/index.html"
click node_playback "https://github.com/synakr/le-git/blob/main/main.js"
click node_sqlite "https://github.com/synakr/le-git/blob/main/src/db.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_renderer,node_browser toneBlue
class node_main toneAmber
class node_node_actions,node_playlist_import,node_custom_videos,node_progress,node_notes_goals,node_stats_reminders,node_shortcuts,node_playback,node_youtube_api toneMint
class node_sqlite toneRose
class node_student toneIndigo
```

## Components

### Student experience

- [Desktop interface](https://github.com/synakr/le-git/blob/main/index.html): `index.html`

### Electron runtime

- [IPC handlers](https://github.com/synakr/le-git/blob/main/main.js): `main.js`

### Learning features

- [Node management](https://github.com/synakr/le-git/blob/main/main.js): `main.js`
- [Playlist import](https://github.com/synakr/le-git/blob/main/main.js): `main.js`
- [Custom videos](https://github.com/synakr/le-git/blob/main/main.js): `main.js`
- [Progress tracking](https://github.com/synakr/le-git/blob/main/main.js): `main.js`
- [Notes and goals](https://github.com/synakr/le-git/blob/main/index.html): `index.html`
- [Stats and reminders](https://github.com/synakr/le-git/blob/main/index.html): `index.html`
- [Resume shortcuts](https://github.com/synakr/le-git/blob/main/index.html): `index.html`
- [Video playback](https://github.com/synakr/le-git/blob/main/main.js): `main.js`

### Local data

- [SQLite database](https://github.com/synakr/le-git/blob/main/src/db.js): `src/db.js`

### Other components

- **Student**
- **YouTube API**
- **External browser**

## Connections

- Student → Desktop interface: uses
- Desktop interface → IPC handlers: sends IPC
- IPC handlers → Node management: dispatches
- IPC handlers → Playlist import: dispatches
- IPC handlers → Custom videos: dispatches
- Node management → SQLite database: reads/writes
- Playlist import → YouTube API: fetches playlist
- Playlist import → SQLite database: stores videos
- Custom videos → SQLite database: reads/writes
- Progress tracking → SQLite database: reads/writes
- IPC handlers → Progress tracking: recalculates
- IPC handlers → Video playback: dispatches
- Video playback → SQLite database: reads resume data
- Video playback → External browser: opens video
- Student → Notes and goals: uses
- Student → Stats and reminders: views
- Student → Resume shortcuts: uses
