# kai-xin-02/leave-me architecture

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

- Interactive diagram: https://gitdiagram.com/kai-xin-02/leave-me
- Repository: https://github.com/kai-xin-02/leave-me

## Overview

leave.me is a hosted link-in-bio/profile product: visitors open a user’s public page, while creators authenticate, edit their profile and media, and manage incoming messages. The README describes profile content, social links, themed image/GIF/video backgrounds, music, anonymous messages, and view counts. The tree and excerpts show separate landing, dashboard, profile, and guestbook code; the guestbook entry point uses its own Supabase DAO. Dashboard and profile internals are only partially sampled, so uncertain implementation wiring is omitted.

Main entry points: [`js/dashboard.js`](https://github.com/kai-xin-02/leave-me/blob/main/js/dashboard.js) (Dashboard editor), [`js/landing.js`](https://github.com/kai-xin-02/leave-me/blob/main/js/landing.js) (Auth flows), [`js/profile.js`](https://github.com/kai-xin-02/leave-me/blob/main/js/profile.js) (Profile rendering), [`dashboard.html`](https://github.com/kai-xin-02/leave-me/blob/main/dashboard.html) (Creator dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Account access"]
  node_landing_page["Sign-in page<br/>[index.html]"]
  node_auth_ui["Auth flows<br/>[landing.js]"]
  node_supabase_config["Supabase setup<br/>[supabase-config.js]"]
end

subgraph group_creator["Profile editing"]
  node_dashboard_page["Creator dashboard<br/>[dashboard.html]"]
  node_dashboard_logic["Dashboard editor<br/>[dashboard.js]"]
  node_music_editor["Music trimming<br/>[music-trimmer.js]"]
end

subgraph group_public["Public experience"]
  node_profile_page["Public profile<br/>[index.html]"]
  node_profile_logic["Profile rendering<br/>[profile.js]"]
  node_theme_controls["Theme controls<br/>[theme-controls.js]"]
end

subgraph group_messages["Messages and data"]
  node_guestbook_page["Guestbook page<br/>[main.js]"]
  node_guestbook_dao["Guestbook DAO<br/>[supabaseClient.js]"]
  node_firebase_messages["Message service<br/>[firebase.js]"]
  node_admin_page["Message admin<br/>[admin.html]"]
  node_admin_logic["Admin controls<br/>[admin.js]"]
end

node_creator_actor(("Creator"))
node_visitor_actor(("Visitor"))
node_supabase[("Supabase")]
node_firebase[("Firebase")]
node_storage[("Media storage")]

node_creator_actor -->|"opens"| node_landing_page
node_landing_page -->|"runs"| node_auth_ui
node_auth_ui -->|"uses auth"| node_supabase_config
node_supabase_config -->|"connects"| node_supabase
node_auth_ui -->|"redirects"| node_dashboard_page
node_creator_actor -->|"opens"| node_dashboard_page
node_dashboard_page -->|"runs"| node_dashboard_logic
node_dashboard_logic -->|"reads/writes"| node_supabase
node_dashboard_logic -->|"uses"| node_music_editor
node_dashboard_logic -.->|"uploads media"| node_storage
node_visitor_actor -->|"visits"| node_profile_page
node_profile_page -->|"runs"| node_profile_logic
node_profile_logic -->|"loads profile"| node_supabase
node_profile_logic -->|"uses"| node_theme_controls
node_visitor_actor -->|"opens"| node_guestbook_page
node_guestbook_page -->|"calls"| node_guestbook_dao
node_guestbook_dao -->|"queries and subscribes"| node_supabase
node_admin_page -->|"runs"| node_admin_logic
node_admin_logic -->|"calls"| node_firebase_messages
node_firebase_messages -->|"reads/writes/deletes"| node_firebase

click node_landing_page "https://github.com/kai-xin-02/leave-me/blob/main/index.html"
click node_auth_ui "https://github.com/kai-xin-02/leave-me/blob/main/js/landing.js"
click node_supabase_config "https://github.com/kai-xin-02/leave-me/blob/main/js/supabase-config.js"
click node_dashboard_page "https://github.com/kai-xin-02/leave-me/blob/main/dashboard.html"
click node_dashboard_logic "https://github.com/kai-xin-02/leave-me/blob/main/js/dashboard.js"
click node_music_editor "https://github.com/kai-xin-02/leave-me/blob/main/js/music-trimmer.js"
click node_profile_page "https://github.com/kai-xin-02/leave-me/blob/main/u/index.html"
click node_profile_logic "https://github.com/kai-xin-02/leave-me/blob/main/js/profile.js"
click node_theme_controls "https://github.com/kai-xin-02/leave-me/blob/main/js/theme-controls.js"
click node_guestbook_page "https://github.com/kai-xin-02/leave-me/blob/main/main.js"
click node_guestbook_dao "https://github.com/kai-xin-02/leave-me/blob/main/supabaseClient.js"
click node_firebase_messages "https://github.com/kai-xin-02/leave-me/blob/main/js/firebase.js"
click node_admin_page "https://github.com/kai-xin-02/leave-me/blob/main/admin.html"
click node_admin_logic "https://github.com/kai-xin-02/leave-me/blob/main/js/admin.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_landing_page,node_auth_ui,node_supabase_config toneBlue
class node_dashboard_page,node_dashboard_logic,node_music_editor,node_supabase,node_firebase,node_storage toneAmber
class node_profile_page,node_profile_logic,node_theme_controls toneMint
class node_guestbook_page,node_guestbook_dao,node_firebase_messages,node_admin_page,node_admin_logic toneRose
class node_creator_actor,node_visitor_actor toneIndigo
```

## Components

### Account access

- [Sign-in page](https://github.com/kai-xin-02/leave-me/blob/main/index.html): `index.html`
- [Auth flows](https://github.com/kai-xin-02/leave-me/blob/main/js/landing.js): `js/landing.js`
- [Supabase setup](https://github.com/kai-xin-02/leave-me/blob/main/js/supabase-config.js): `js/supabase-config.js`

### Profile editing

- [Creator dashboard](https://github.com/kai-xin-02/leave-me/blob/main/dashboard.html): `dashboard.html`
- [Dashboard editor](https://github.com/kai-xin-02/leave-me/blob/main/js/dashboard.js): `js/dashboard.js`
- [Music trimming](https://github.com/kai-xin-02/leave-me/blob/main/js/music-trimmer.js): `js/music-trimmer.js`

### Public experience

- [Public profile](https://github.com/kai-xin-02/leave-me/blob/main/u/index.html): `u/index.html`
- [Profile rendering](https://github.com/kai-xin-02/leave-me/blob/main/js/profile.js): `js/profile.js`
- [Theme controls](https://github.com/kai-xin-02/leave-me/blob/main/js/theme-controls.js): `js/theme-controls.js`

### Messages and data

- [Guestbook page](https://github.com/kai-xin-02/leave-me/blob/main/main.js): `main.js`
- [Guestbook DAO](https://github.com/kai-xin-02/leave-me/blob/main/supabaseClient.js): `supabaseClient.js`
- [Message service](https://github.com/kai-xin-02/leave-me/blob/main/js/firebase.js): `js/firebase.js`
- [Message admin](https://github.com/kai-xin-02/leave-me/blob/main/admin.html): `admin.html`
- [Admin controls](https://github.com/kai-xin-02/leave-me/blob/main/js/admin.js): `js/admin.js`

### Other components

- **Creator**
- **Visitor**
- **Supabase**
- **Firebase**
- **Media storage**

## Connections

- Creator → Sign-in page: opens
- Sign-in page → Auth flows: runs
- Auth flows → Supabase setup: uses auth
- Supabase setup → Supabase: connects
- Auth flows → Creator dashboard: redirects
- Creator → Creator dashboard: opens
- Creator dashboard → Dashboard editor: runs
- Dashboard editor → Supabase: reads/writes
- Dashboard editor → Music trimming: uses
- Dashboard editor → Media storage: uploads media
- Visitor → Public profile: visits
- Public profile → Profile rendering: runs
- Profile rendering → Supabase: loads profile
- Profile rendering → Theme controls: uses
- Visitor → Guestbook page: opens
- Guestbook page → Guestbook DAO: calls
- Guestbook DAO → Supabase: queries and subscribes
- Message admin → Admin controls: runs
- Admin controls → Message service: calls
- Message service → Firebase: reads/writes/deletes
