# mrpeng4/1869ac architecture

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

- Interactive diagram: https://gitdiagram.com/mrpeng4/1869ac
- Repository: https://github.com/mrpeng4/1869ac

## Overview

1869AC combines an offline Python terminal music player with an early-stage React website. The main terminal workflow supports guest or account access, loads or imports playlists, lets the user select a track list, then hands playback and interactive controls to the terminal UI. Account playlists can be synchronized through Supabase. The website provides home and feature pages plus login, protected-route, and dashboard views; its sampled login state is stored locally. The archived macOS copy is omitted. Website-to-backend wiring beyond the shown route and local state is not established by the excerpts.

Main entry points: [`main.py`](https://github.com/mrpeng4/1869ac/blob/main/main.py) (Player Startup), [`react-stuff/src/App.jsx`](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/App.jsx) (Web Router), [`widgets.py`](https://github.com/mrpeng4/1869ac/blob/main/widgets.py) (Playback UI), [`react-stuff/src/protected.jsx`](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/protected.jsx) (Route Guard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_terminal["Terminal Player"]
  node_entry["Player Startup<br/>[main.py]"]
  node_controls["Playback UI<br/>[widgets.py]"]
  node_audio["VLC Playback"]
end

subgraph group_library["Playlist Library"]
  node_importer["Folder Importer<br/>[import_system.py]"]
  node_playlists["Playlist Definitions<br/>[songs_path.py]"]
end

subgraph group_accounts["Accounts and Cloud"]
  node_account["Account Access<br/>[auth.py]"]
  node_supaclient["Supabase Client<br/>[supabaseclient.py]"]
end

subgraph group_website["Web Experience"]
  node_webapp["Web Router<br/>[App.jsx]"]
  node_home["Home Page<br/>[home.jsx]"]
  node_features["Feature Page<br/>[features.jsx]"]
  node_animation["Home Animation<br/>[animation.jsx]"]
  node_ascii["ASCII Animation"]
  node_navbar["Navigation Bar<br/>[navbar.jsx]"]
  node_login["Login Page<br/>[login.jsx]"]
  node_protected["Route Guard<br/>[protected.jsx]"]
  node_dashboard["Dashboard<br/>[dashboard.jsx]"]
  node_webstate["Login State<br/>[data.jsx]"]
end

node_user(("Listener"))
node_cloud[("Supabase Service")]

node_user -->|"starts"| node_entry
node_entry -->|"offers access"| node_account
node_account -->|"authenticates via"| node_supaclient
node_supaclient -->|"connects"| node_cloud
node_entry -->|"syncs playlists"| node_cloud
node_entry -->|"imports folders"| node_importer
node_entry -->|"loads playlists"| node_playlists
node_importer -->|"appends playlists"| node_playlists
node_entry -->|"starts controls"| node_controls
node_controls -->|"imports folders"| node_importer
node_controls -->|"reads playlists"| node_playlists
node_entry -->|"starts playback"| node_audio
node_controls -->|"controls playback"| node_audio
node_user -->|"browses"| node_webapp
node_webapp -->|"routes to"| node_home
node_webapp -->|"routes to"| node_features
node_webapp -->|"routes to"| node_login
node_webapp -->|"guards dashboard"| node_protected
node_protected -->|"renders when allowed"| node_dashboard
node_home -->|"renders"| node_animation
node_animation -->|"uses"| node_ascii
node_webapp -->|"renders"| node_navbar
node_login -->|"updates state"| node_webstate
node_protected -->|"checks state"| node_webstate
node_navbar -->|"checks state"| node_webstate

click node_entry "https://github.com/mrpeng4/1869ac/blob/main/main.py"
click node_controls "https://github.com/mrpeng4/1869ac/blob/main/widgets.py"
click node_importer "https://github.com/mrpeng4/1869ac/blob/main/import_system.py"
click node_playlists "https://github.com/mrpeng4/1869ac/blob/main/songs_path.py"
click node_account "https://github.com/mrpeng4/1869ac/blob/main/auth.py"
click node_supaclient "https://github.com/mrpeng4/1869ac/blob/main/supabaseclient.py"
click node_webapp "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/App.jsx"
click node_home "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/home.jsx"
click node_features "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/features.jsx"
click node_animation "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/animation.jsx"
click node_ascii "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/ascii-motion-animation.jsx"
click node_navbar "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/navbar.jsx"
click node_login "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/login.jsx"
click node_protected "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/protected.jsx"
click node_dashboard "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/dashboard.jsx"
click node_webstate "https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/data.jsx"

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_entry,node_controls,node_audio toneBlue
class node_importer,node_playlists,node_cloud toneAmber
class node_account,node_supaclient toneMint
class node_webapp,node_home,node_features,node_animation,node_ascii,node_navbar,node_login,node_protected,node_dashboard,node_webstate toneRose
class node_user toneIndigo
```

## Components

### Terminal Player

- [Player Startup](https://github.com/mrpeng4/1869ac/blob/main/main.py): `main.py`
- [Playback UI](https://github.com/mrpeng4/1869ac/blob/main/widgets.py): `widgets.py`
- **VLC Playback**

### Playlist Library

- [Folder Importer](https://github.com/mrpeng4/1869ac/blob/main/import_system.py): `import_system.py`
- [Playlist Definitions](https://github.com/mrpeng4/1869ac/blob/main/songs_path.py): `songs_path.py`

### Accounts and Cloud

- [Account Access](https://github.com/mrpeng4/1869ac/blob/main/auth.py): `auth.py`
- [Supabase Client](https://github.com/mrpeng4/1869ac/blob/main/supabaseclient.py): `supabaseclient.py`

### Web Experience

- [Web Router](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/App.jsx): `react-stuff/src/App.jsx`
- [Home Page](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/home.jsx): `react-stuff/src/home.jsx`
- [Feature Page](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/features.jsx): `react-stuff/src/features.jsx`
- [Home Animation](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/animation.jsx): `react-stuff/src/animation.jsx`
- [ASCII Animation](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/ascii-motion-animation.jsx): `react-stuff/src/ascii-motion-animation.jsx`
- [Navigation Bar](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/navbar.jsx): `react-stuff/src/navbar.jsx`
- [Login Page](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/login.jsx): `react-stuff/src/login.jsx`
- [Route Guard](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/protected.jsx): `react-stuff/src/protected.jsx`
- [Dashboard](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/dashboard.jsx): `react-stuff/src/dashboard.jsx`
- [Login State](https://github.com/mrpeng4/1869ac/blob/main/react-stuff/src/data.jsx): `react-stuff/src/data.jsx`

### Other components

- **Listener**
- **Supabase Service**

## Connections

- Listener → Player Startup: starts (evidence: `README.md`)
- Player Startup → Account Access: offers access (evidence: `main.py`)
- Account Access → Supabase Client: authenticates via (evidence: `auth.py`)
- Supabase Client → Supabase Service: connects (evidence: `supabaseclient.py`)
- Player Startup → Supabase Service: syncs playlists (evidence: `main.py`)
- Player Startup → Folder Importer: imports folders (evidence: `main.py`)
- Player Startup → Playlist Definitions: loads playlists (evidence: `main.py`)
- Folder Importer → Playlist Definitions: appends playlists (evidence: `import_system.py`)
- Player Startup → Playback UI: starts controls (evidence: `main.py`)
- Playback UI → Folder Importer: imports folders (evidence: `widgets.py`)
- Playback UI → Playlist Definitions: reads playlists (evidence: `widgets.py`)
- Player Startup → VLC Playback: starts playback (evidence: `main.py`)
- Playback UI → VLC Playback: controls playback (evidence: `widgets.py`)
- Listener → Web Router: browses (evidence: `README.md`)
- Web Router → Home Page: routes to (evidence: `react-stuff/src/App.jsx`)
- Web Router → Feature Page: routes to (evidence: `react-stuff/src/App.jsx`)
- Web Router → Login Page: routes to (evidence: `react-stuff/src/App.jsx`)
- Web Router → Route Guard: guards dashboard (evidence: `react-stuff/src/App.jsx`)
- Route Guard → Dashboard: renders when allowed (evidence: `react-stuff/src/App.jsx`)
- Home Page → Home Animation: renders (evidence: `react-stuff/src/home.jsx`)
- Home Animation → ASCII Animation: uses (evidence: `react-stuff/src/animation.jsx`)
- Web Router → Navigation Bar: renders (evidence: `react-stuff/src/App.jsx`)
- Login Page → Login State: updates state (evidence: `react-stuff/src/login.jsx`)
- Route Guard → Login State: checks state (evidence: `react-stuff/src/protected.jsx`)
- Navigation Bar → Login State: checks state (evidence: `react-stuff/src/navbar.jsx`)
