# carocamblor/taylor-swift-lyric-search architecture

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

- Interactive diagram: https://gitdiagram.com/carocamblor/taylor-swift-lyric-search
- Repository: https://github.com/carocamblor/taylor-swift-lyric-search

## Overview

This is an Express-based Taylor Swift lyric-search and album/song browsing application. Visitors can search lyrics, optionally filter by album, browse album and song details, and register, log in, or post comments. The main flow is HTTP routing to controllers, which query the in-memory catalog or Firebase and render EJS pages. Firebase supports authentication and comment/profile data. The README is empty, and some source excerpts are partial; the graph reflects only evidenced wiring and documented dependencies.

Main entry points: [`controllers/indexController.js`](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/indexController.js) (Search and account), [`app.js`](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/app.js) (Express app), [`controllers/albumsController.js`](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/albumsController.js) (Album details), [`controllers/songsController.js`](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/songsController.js) (Song details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Express app<br/>[app.js]"]
  node_index_routes["Home routes<br/>[index.js]"]
  node_album_routes["Album routes<br/>[albums.js]"]
  node_song_routes["Song routes<br/>[songs.js]"]
end

subgraph group_catalog["Catalog and search"]
  node_index_controller["Search and account<br/>[indexController.js]"]
  node_album_controller["Album details"]
  node_song_controller["Song details<br/>[songsController.js]"]
  node_songs_data["Song catalog<br/>[songs.js]"]
  node_albums_data["Album catalog<br/>[albums.js]"]
end

subgraph group_community["Accounts and comments"]
  node_firebase_auth["Firebase Auth"]
  node_firestore[("Cloud Firestore")]
end

subgraph group_presentation["Rendered pages"]
  node_views["EJS pages"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends requests"| node_app
node_app -->|"mounts at /"| node_index_routes
node_app -->|"mounts at /album"| node_album_routes
node_app -->|"mounts at /song"| node_song_routes
node_index_routes -->|"dispatches"| node_index_controller
node_album_routes -->|"dispatches"| node_album_controller
node_song_routes -->|"dispatches"| node_song_controller
node_index_controller -->|"searches"| node_songs_data
node_index_controller -->|"reads"| node_albums_data
node_albums_data -->|"gets album songs"| node_songs_data
node_album_controller -->|"finds album"| node_albums_data
node_song_controller -->|"finds song"| node_songs_data
node_index_controller -->|"authenticates"| node_firebase_auth
node_index_controller -->|"writes profiles"| node_firestore
node_album_controller -->|"reads and writes comments"| node_firestore
node_song_controller -->|"reads and writes comments"| node_firestore
node_index_controller -->|"renders"| node_views
node_album_controller -->|"renders"| node_views
node_song_controller -->|"renders"| node_views
node_views -->|"returns pages"| node_visitor

click node_app "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/app.js"
click node_index_routes "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/routes/index.js"
click node_album_routes "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/routes/albums.js"
click node_song_routes "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/routes/songs.js"
click node_index_controller "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/indexController.js"
click node_album_controller "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/albumsController.js"
click node_song_controller "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/songsController.js"
click node_songs_data "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/data/songs.js"
click node_albums_data "https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/data/albums.js"
click node_views "https://github.com/carocamblor/taylor-swift-lyric-search/tree/main/views"

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_index_routes,node_album_routes,node_song_routes toneBlue
class node_index_controller,node_album_controller,node_song_controller,node_songs_data,node_albums_data toneAmber
class node_firebase_auth,node_firestore toneMint
class node_views toneRose
class node_visitor toneIndigo
```

## Components

### Web application

- [Express app](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/app.js): `app.js`
- [Home routes](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/routes/index.js): `routes/index.js`
- [Album routes](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/routes/albums.js): `routes/albums.js`
- [Song routes](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/routes/songs.js): `routes/songs.js`

### Catalog and search

- [Search and account](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/indexController.js): `controllers/indexController.js`
- [Album details](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/albumsController.js): `controllers/albumsController.js`
- [Song details](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/controllers/songsController.js): `controllers/songsController.js`
- [Song catalog](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/data/songs.js): `data/songs.js`
- [Album catalog](https://github.com/carocamblor/taylor-swift-lyric-search/blob/main/data/albums.js): `data/albums.js`

### Accounts and comments

- **Firebase Auth**
- **Cloud Firestore**

### Rendered pages

- [EJS pages](https://github.com/carocamblor/taylor-swift-lyric-search/tree/main/views): `views`

### Other components

- **Visitor**

## Connections

- Visitor → Express app: sends requests
- Express app → Home routes: mounts at /
- Express app → Album routes: mounts at /album
- Express app → Song routes: mounts at /song
- Home routes → Search and account: dispatches
- Album routes → Album details: dispatches
- Song routes → Song details: dispatches
- Search and account → Song catalog: searches
- Search and account → Album catalog: reads
- Album catalog → Song catalog: gets album songs
- Album details → Album catalog: finds album
- Song details → Song catalog: finds song
- Search and account → Firebase Auth: authenticates
- Search and account → Cloud Firestore: writes profiles
- Album details → Cloud Firestore: reads and writes comments
- Song details → Cloud Firestore: reads and writes comments
- Search and account → EJS pages: renders
- Album details → EJS pages: renders
- Song details → EJS pages: renders
- EJS pages → Visitor: returns pages
