# chi-264/soundcircle architecture

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

- Interactive diagram: https://gitdiagram.com/chi-264/soundcircle
- Repository: https://github.com/chi-264/soundcircle

## Overview

SoundCircle is a song-first music discovery community: listeners search catalog results, publish a song recommendation, and discover or interact with recommendations. The React app presents auth, feeds, profiles, social features, and personal library workflows; its Express server exposes the API and accesses Supabase, while catalog search combines external music sources. The source excerpts show only selected UI and server paths, so unsampled feature relationships are included only where the README documents them; the UI and server are large, shared modules.

Main entry points: [`src/main.jsx`](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx) (React app), [`server.js`](https://github.com/chi-264/soundcircle/blob/main/server.js) (Express API), [`music-genres.js`](https://github.com/chi-264/soundcircle/blob/main/music-genres.js) (Genre rules), [`supabase/migrations`](https://github.com/chi-264/soundcircle/tree/main/supabase/migrations) (Database schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Listener experience"]
  node_webapp["React app<br/>[main.jsx]"]
  node_account["Accounts and profiles<br/>[main.jsx]"]
  node_songsearch["Song search<br/>[main.jsx]"]
end

subgraph group_social["Discovery and social"]
  node_recommend["Recommendations<br/>[main.jsx]"]
  node_feeds["Discovery feeds<br/>[main.jsx]"]
  node_engagement["Likes and comments<br/>[main.jsx]"]
  node_following["Following<br/>[main.jsx]"]
  node_notifications["Notifications<br/>[main.jsx]"]
end

subgraph group_library["Personal music"]
  node_library["Music library<br/>[main.jsx]"]
  node_collections["Collections<br/>[main.jsx]"]
end

subgraph group_runtime["App and services"]
  node_catalog["Catalog search<br/>[server.js]"]
  node_musicproviders["Music catalogs"]
  node_api["Express API<br/>[server.js]"]
  node_genredata["Genre rules<br/>[music-genres.js]"]
  node_supabase[("Supabase")]
  node_schema[("Database schema")]
  node_authprovider["Google OAuth"]
end

node_listener(("Listener"))

node_listener -->|"uses"| node_webapp
node_webapp -->|"renders"| node_account
node_webapp -->|"routes to"| node_songsearch
node_songsearch -->|"requests search"| node_api
node_api -->|"serves"| node_catalog
node_catalog -->|"searches"| node_musicproviders
node_webapp -->|"renders"| node_recommend
node_recommend -->|"requests"| node_api
node_webapp -->|"renders"| node_feeds
node_feeds -->|"requests"| node_api
node_webapp -->|"renders"| node_engagement
node_engagement -->|"updates"| node_api
node_webapp -->|"renders"| node_following
node_webapp -->|"renders"| node_notifications
node_notifications -->|"marks read"| node_api
node_webapp -->|"renders"| node_library
node_library -->|"requests"| node_api
node_webapp -->|"renders"| node_collections
node_collections -->|"creates"| node_api
node_api -->|"reads and writes"| node_supabase
node_schema -->|"defines tables"| node_supabase
node_account -.->|"signs in with"| node_authprovider
node_account -->|"authenticates"| node_supabase
node_webapp -->|"uses"| node_genredata
node_api -->|"uses"| node_genredata
node_feeds -.->|"requests ranked feeds"| node_api

click node_webapp "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_account "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_songsearch "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_catalog "https://github.com/chi-264/soundcircle/blob/main/server.js"
click node_recommend "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_feeds "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_engagement "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_following "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_notifications "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_library "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_collections "https://github.com/chi-264/soundcircle/blob/main/src/main.jsx"
click node_api "https://github.com/chi-264/soundcircle/blob/main/server.js"
click node_genredata "https://github.com/chi-264/soundcircle/blob/main/music-genres.js"
click node_schema "https://github.com/chi-264/soundcircle/tree/main/supabase/migrations"

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_webapp,node_account,node_songsearch toneBlue
class node_recommend,node_feeds,node_engagement,node_following,node_notifications toneAmber
class node_library,node_collections toneMint
class node_catalog,node_musicproviders,node_api,node_genredata,node_supabase,node_schema,node_authprovider toneRose
class node_listener toneIndigo
```

## Components

### Listener experience

- [React app](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Accounts and profiles](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Song search](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`

### Discovery and social

- [Recommendations](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Discovery feeds](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Likes and comments](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Following](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Notifications](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`

### Personal music

- [Music library](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`
- [Collections](https://github.com/chi-264/soundcircle/blob/main/src/main.jsx): `src/main.jsx`

### App and services

- [Catalog search](https://github.com/chi-264/soundcircle/blob/main/server.js): `server.js`
- **Music catalogs**
- [Express API](https://github.com/chi-264/soundcircle/blob/main/server.js): `server.js`
- [Genre rules](https://github.com/chi-264/soundcircle/blob/main/music-genres.js): `music-genres.js`
- **Supabase**
- [Database schema](https://github.com/chi-264/soundcircle/tree/main/supabase/migrations): `supabase/migrations`
- **Google OAuth**

### Other components

- **Listener**

## Connections

- Listener → React app: uses (evidence: `README.md`)
- React app → Accounts and profiles: renders (evidence: `src/main.jsx`)
- React app → Song search: routes to (evidence: `src/main.jsx`)
- Song search → Express API: requests search (evidence: `src/main.jsx`)
- Express API → Catalog search: serves (evidence: `server.js`)
- Catalog search → Music catalogs: searches (evidence: `README.md`)
- React app → Recommendations: renders (evidence: `src/main.jsx`)
- Recommendations → Express API: requests (evidence: `src/main.jsx`)
- React app → Discovery feeds: renders (evidence: `src/main.jsx`)
- Discovery feeds → Express API: requests (evidence: `src/main.jsx`)
- React app → Likes and comments: renders (evidence: `src/main.jsx`)
- Likes and comments → Express API: updates (evidence: `src/main.jsx`)
- React app → Following: renders (evidence: `src/main.jsx`)
- React app → Notifications: renders (evidence: `src/main.jsx`)
- Notifications → Express API: marks read (evidence: `src/main.jsx`)
- React app → Music library: renders (evidence: `src/main.jsx`)
- Music library → Express API: requests (evidence: `src/main.jsx`)
- React app → Collections: renders (evidence: `src/main.jsx`)
- Collections → Express API: creates (evidence: `src/main.jsx`)
- Express API → Supabase: reads and writes (evidence: `server.js`)
- Database schema → Supabase: defines tables (evidence: `README.md`)
- Accounts and profiles → Google OAuth: signs in with (evidence: `README.md`)
- Accounts and profiles → Supabase: authenticates (evidence: `README.md`)
- React app → Genre rules: uses (evidence: `src/main.jsx`)
- Express API → Genre rules: uses (evidence: `server.js`)
- Discovery feeds → Express API: requests ranked feeds (evidence: `README.md`)
