# sunflowerguy/jjs-setlist architecture

> Architecture diagram of the GitHub repository sunflowerguy/jjs-setlist, 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/sunflowerguy/jjs-setlist
- Repository: https://github.com/sunflowerguy/jjs-setlist

## Overview

JJ’s Musicians Setlist Organiser is a browser-based gig-planning app. A musician loads a song library, builds and reorders up to four sets, then saves, exports or prints the result. The main UI and application logic are concentrated in web/app.js; persistence can be browser-local, file-backed through the localhost helper, or optional Firebase accounts. The README documents additional capabilities whose implementation is not shown in the excerpts, so those components are represented without speculative internal links. Bundled Firebase code is treated as an external-service client layer.

Main entry points: [`web/app.js`](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js) (Setlist app), [`web/lib/firebase/firebase-app-compat.js`](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-app-compat.js) (Firebase app SDK), [`web/lib/firebase/firebase-auth-compat.js`](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-auth-compat.js) (Firebase authentication), [`web/lib/firebase/firebase-firestore-compat.js`](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-firestore-compat.js) (Firestore SDK)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Setlist planning"]
  node_app["Setlist app<br/>[app.js]"]
  node_set_editor["Set editor<br/>[app.js]"]
  node_setlist_files["Setlist files<br/>[app.js]"]
  node_print_export["Print and export<br/>[app.js]"]
  node_help_templates["Help and templates<br/>[app.js]"]
end

subgraph group_library["Song library"]
  node_song_input["Song database input<br/>[app.js]"]
  node_song_parser["Spreadsheet and CSV parsing<br/>[app.js]"]
  node_song_search["Song search<br/>[app.js]"]
  node_songsheets["Songsheet links<br/>[app.js]"]
end

subgraph group_persistence["Persistence"]
  node_local_store[("Browser storage<br/>[app.js]")]
  node_drive_database["Google Drive database<br/>[app.js]"]
  node_helper["Local file helper<br/>[serve.py]"]
  node_file_storage[("Project files<br/>[serve.py]")]
end

subgraph group_accounts["Online accounts"]
  node_firebase_config["Firebase configuration<br/>[firebase-config.js]"]
  node_firebase_app["Firebase app SDK"]
  node_firebase_auth["Firebase authentication"]
  node_firestore_sdk["Firestore SDK"]
  node_firestore_rules["Firestore rules<br/>[firestore.rules]"]
end

node_musician(("Musician"))
node_firebase_service[("Firebase services")]

node_musician -->|"uses"| node_app
node_app -->|"presents"| node_set_editor
node_app -->|"loads"| node_song_input
node_song_input -->|"parses"| node_song_parser
node_app -->|"searches"| node_song_search
node_set_editor -->|"opens links"| node_songsheets
node_app -->|"saves and loads"| node_setlist_files
node_app -->|"prints and exports"| node_print_export
node_app -->|"offers"| node_help_templates
node_app -->|"reads and writes"| node_local_store
node_app -->|"loads database"| node_drive_database
node_app -->|"calls file API"| node_helper
node_helper -->|"reads and writes"| node_file_storage
node_app -.->|"uses configuration"| node_firebase_config
node_app -.->|"authenticates"| node_firebase_auth
node_app -->|"reads and writes"| node_firestore_sdk
node_firebase_config -.->|"configures"| node_firebase_app
node_firebase_app -.->|"provides SDK"| node_firebase_auth
node_firebase_app -.->|"provides SDK"| node_firestore_sdk
node_firebase_auth -.->|"signs in"| node_firebase_service
node_firestore_sdk -.->|"accesses data"| node_firebase_service
node_firestore_rules -.->|"restricts access"| node_firebase_service

click node_app "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_set_editor "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_setlist_files "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_print_export "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_help_templates "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_song_input "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_song_parser "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_song_search "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_songsheets "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_local_store "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_drive_database "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js"
click node_helper "https://github.com/sunflowerguy/jjs-setlist/blob/main/serve.py"
click node_file_storage "https://github.com/sunflowerguy/jjs-setlist/blob/main/serve.py"
click node_firebase_config "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/firebase-config.js"
click node_firebase_app "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-app-compat.js"
click node_firebase_auth "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-auth-compat.js"
click node_firestore_sdk "https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-firestore-compat.js"
click node_firestore_rules "https://github.com/sunflowerguy/jjs-setlist/blob/main/firestore.rules"

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_app,node_set_editor,node_setlist_files,node_print_export,node_help_templates toneBlue
class node_song_input,node_song_parser,node_song_search,node_songsheets,node_firebase_service toneAmber
class node_local_store,node_drive_database,node_helper,node_file_storage toneMint
class node_firebase_config,node_firebase_app,node_firebase_auth,node_firestore_sdk,node_firestore_rules toneRose
class node_musician toneIndigo
```

## Components

### Setlist planning

- [Setlist app](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Set editor](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Setlist files](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Print and export](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Help and templates](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`

### Song library

- [Song database input](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Spreadsheet and CSV parsing](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Song search](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Songsheet links](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`

### Persistence

- [Browser storage](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Google Drive database](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/app.js): `web/app.js`
- [Local file helper](https://github.com/sunflowerguy/jjs-setlist/blob/main/serve.py): `serve.py`
- [Project files](https://github.com/sunflowerguy/jjs-setlist/blob/main/serve.py): `serve.py`

### Online accounts

- [Firebase configuration](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/firebase-config.js): `web/firebase-config.js`
- [Firebase app SDK](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-app-compat.js): `web/lib/firebase/firebase-app-compat.js`
- [Firebase authentication](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-auth-compat.js): `web/lib/firebase/firebase-auth-compat.js`
- [Firestore SDK](https://github.com/sunflowerguy/jjs-setlist/blob/main/web/lib/firebase/firebase-firestore-compat.js): `web/lib/firebase/firebase-firestore-compat.js`
- [Firestore rules](https://github.com/sunflowerguy/jjs-setlist/blob/main/firestore.rules): `firestore.rules`

### Other components

- **Musician**
- **Firebase services**

## Connections

- Musician → Setlist app: uses (evidence: `README.md`)
- Setlist app → Set editor: presents (evidence: `README.md`)
- Setlist app → Song database input: loads (evidence: `README.md`)
- Song database input → Spreadsheet and CSV parsing: parses (evidence: `README.md`)
- Setlist app → Song search: searches (evidence: `README.md`)
- Set editor → Songsheet links: opens links (evidence: `README.md`)
- Setlist app → Setlist files: saves and loads (evidence: `README.md`)
- Setlist app → Print and export: prints and exports (evidence: `README.md`)
- Setlist app → Help and templates: offers (evidence: `README.md`)
- Setlist app → Browser storage: reads and writes (evidence: `web/app.js`)
- Setlist app → Google Drive database: loads database (evidence: `README.md`)
- Setlist app → Local file helper: calls file API (evidence: `web/app.js`)
- Local file helper → Project files: reads and writes (evidence: `serve.py`)
- Setlist app → Firebase configuration: uses configuration
- Setlist app → Firebase authentication: authenticates
- Setlist app → Firestore SDK: reads and writes (evidence: `web/app.js`)
- Firebase configuration → Firebase app SDK: configures
- Firebase app SDK → Firebase authentication: provides SDK
- Firebase app SDK → Firestore SDK: provides SDK
- Firebase authentication → Firebase services: signs in
- Firestore SDK → Firebase services: accesses data
- Firestore rules → Firebase services: restricts access
