retro-song

byAli Ali

A song

LandingSongs
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirements Document for A Song

1. Introduction

A Song is a song application for listeners and song creators. Listeners play and stream songs and read their lyrics. Song creators make their own tracks, share them with other users, and — the defining capability of this product — reproduce an existing AI-generated song by matching it: the user has an AI-generated song and wants to make the same song.

The product's intent is record-shop gravity rather than pop hype: songs are presented as coded artifacts, each with a square colour plate and a catalogue number, and the act of matching an AI-generated song is treated as a precise studio operation rather than a novelty generator.

The audience is two active human roles: the Listener, who browses, streams, and reads lyrics, and the Song Creator, who additionally produces tracks and matches an existing AI-generated song. Both roles establish an application-owned account so that created tracks, matches, and shared songs remain bound to the correct person and can be resumed and revisited.

This document is the System Requirements Document for the project named A Song (the project was also referred to during intake as retro-song).

2. System Overview

Page 1 of 24

2a. Product Interpretation and Delivery Boundary

A Song is delivered as a first-party web application: a React frontend, a shared FastAPI backend that owns all application APIs and domain modules, and MariaDB as the application-owned persistent store. The backend calls model providers through a provisioned LiteLLM gateway, which is backed by its own PostgreSQL instance kept separate from application-owned storage.

Access is application-owned. The Landing page is the public entry and is reachable without an account. Sign Up and Login are the anonymous identity surfaces: a new Listener or Song Creator establishes an account through Sign Up, and a returning user verifies the account at Login. The working destinations — Songs, Song Details, Create Track, and Match Song — require a signed-in account, because browsing history, created tracks, shared tracks, and song matches are durable, actor-specific state that must remain bound to the correct participant and be resumable on return.

The current delivery covers: playing and streaming songs, viewing song lyrics, creating and sharing tracks, and matching an existing AI-generated song. Model-provider calls for matching are made by the backend through the LiteLLM gateway; the gateway is infrastructure, not a user-facing destination. Nothing in this document extends the product into adjacent areas such as social feeds, messaging, payments, or artist verification.

Removed from scope

  • None. No concept from the authoritative requirement thread was removed or replaced; the latest refinement ("I have an ai generated song I would like to make the same") narrows and sharpens the creator's goal toward matching an existing AI-generated song and does not delete any earlier accepted capability.
Page 2 of 24

2b. Source Content Inventory

Not applicable. No reference directive in this request declares content_source; no external factual inventory is supplied or reproduced.

2c. Page Content and Component Coverage

Landing

  • Information/state: Public entry. Explains the song app to both Listeners and Song Creators. Hero headline "One song. Make it yours.", subline "Play the track, read the lyrics, then build a match of your own.", call to action "Enter the studio". A full dark field with one large square signal-orange colour plate off-center left; the headline stacks in bone caps to its right; a catalogue number (e.g. RS-001) and the play control sit in a thin bottom rule.
  • Primary action: "Enter the studio" — routes an unauthenticated visitor to Sign Up or Login, and a signed-in user into the working destinations.
  • Supporting actions: Navigate to Login; navigate to Sign Up.
  • Domain entities: Song (title, catalogue number, colour plate), Track preview state.
  • Component responsibilities: Hero block (colour plate, stacked headline, subline, CTA); bottom rule with catalogue number and play control; entry links to Sign Up and Login.
  • States: Loading — hero renders immediately as static content, no blocking spinner. Empty — not applicable (static entry). Success — CTA routes to the correct access surface based on session state. Error — if session check fails, treat the visitor as unauthenticated and route to Login. Recovery — the visitor can always reach Sign Up or Login from the bottom rule.
Page 3 of 24

Songs

  • Information/state: Signed-in catalogue of songs available to stream. Gallery grid of strict columns; each song shown as a square colour plate, title, and catalogue number in caps beneath the title.
  • Primary action: Play/stream a song from the grid.
  • Supporting actions: Open a song to view its details and lyrics; navigate to Create Track; navigate to Match Song.
  • Domain entities: Song (title, catalogue number, colour plate, audio reference, owner), Playback state.
  • Component responsibilities: Catalogue grid; per-song plate/title/catalogue block; full-width bottom player rule with thin waveform and no rounded controls; navigation to creator destinations.
  • States: Loading — grid placeholders in surface colour while the catalogue loads. Empty — a plain statement that no songs are available yet, with a link to Create Track. Success — grid populated; selected song begins streaming in the bottom player. Error — catalogue request failure shows a retry action. Recovery — retry reloads the catalogue; playback failure on one song leaves the grid usable and surfaces a per-song retry.
Page 4 of 24

Song Details

  • Information/state: One song: title, catalogue number, colour plate, owner/creator credit, streaming player, and lyrics presented as one narrow centered column with a mustard rule at the left.
  • Primary action: Play/stream the song.
  • Supporting actions: Read the lyrics; return to Songs; open Match Song to build a match of this song.
  • Domain entities: Song, Lyrics (text body), Playback state.
  • Component responsibilities: Song header with plate and catalogue number; full-width bottom player rule; lyric column with mustard left rule; link into Match Song.
  • States: Loading — header and lyric column skeleton. Empty — a song with no lyrics shows the lyric column with a plain "no lyrics recorded" line, player still usable. Success — lyrics and player render. Error — song not found or failed load shows a message and a link back to Songs. Recovery — return to Songs and reselect; playback retry available in the player.
Page 5 of 24

Create Track

  • Information/state: Signed-in creator workspace for making a track and sharing it with other users. Shows the creator's own created tracks and their sharing state.
  • Primary action: Create a track and share it so other users can find and stream it.
  • Supporting actions: Provide track title and audio; review the assigned catalogue number and colour plate; open Match Song; return to Songs.
  • Domain entities: Track (title, audio, owner, catalogue number, colour plate, sharing state), Share state.
  • Component responsibilities: Track composition form; catalogue-number and colour-plate assignment display; share control; list of the creator's tracks with sharing status.
  • States: Loading — creator's track list loads with placeholders. Empty — no tracks yet, with the composition form as the primary focus. Success — track saved, catalogue number assigned, sharing state shown, and the track appears in Songs for other users once shared. Error — validation failure on missing title or audio is shown inline; save failure preserves entered input and offers retry. Recovery — retry save; unshared tracks remain private to the creator until sharing succeeds.
Page 6 of 24

Match Song

  • Information/state: Signed-in creator workspace for reproducing an existing AI-generated song. Shows the reference AI-generated song being matched, the match request state, and the resulting matched song with its catalogue number and colour plate.
  • Primary action: Submit an AI-generated song as the reference and request a match.
  • Supporting actions: Review the reference song's details and lyrics; review the produced match; save the match as the creator's own track; share the match; return to Songs or Song Details.
  • Domain entities: Reference AI-generated song (title, lyrics, audio reference), Match request (state: submitted, processing, completed, failed), Matched song (title, audio, catalogue number, colour plate, owner, sharing state).
  • Component responsibilities: Reference song panel; match submission control (signal orange, the match action); progress/state display; matched-song result panel with plate and catalogue number; save and share controls.
  • States: Loading — reference song loads with placeholders; match submission shows a processing state while the backend calls the model provider through the LiteLLM gateway. Empty — no reference selected yet, with the submission control as the primary focus. Success — matched song returned, saved to the creator, and shareable. Error — provider or match failure shows a plain failure message with the reference preserved and a retry action. Recovery — retry the match without re-entering the reference; a failed match never produces a partial track in the creator's catalogue.
Page 7 of 24

Sign Up

  • Information/state: Anonymous identity surface. Establishes a new account for a Listener or Song Creator.
  • Primary action: Create an account with the required identity details.
  • Supporting actions: Switch to Login if an account already exists; return to Landing.
  • Domain entities: Account (identity details, role context as Listener or Song Creator).
  • Component responsibilities: Enrollment form; submit control; link to Login.
  • States: Loading — submit control shows a pending state during account creation. Empty — blank form. Success — account created and the user continues into the working destinations. Error — invalid or already-used identity details are shown inline without clearing the form. Recovery — correct the field and resubmit; or switch to Login.
Page 8 of 24

Login

  • Information/state: Anonymous identity surface. Verifies a returning Listener or Song Creator.
  • Primary action: Verify the account with the returning user's identity details.
  • Supporting actions: Switch to Sign Up; return to Landing.
  • Domain entities: Account.
  • Component responsibilities: Verification form; submit control; link to Sign Up.
  • States: Loading — submit control shows a pending state during verification. Empty — blank form. Success — verified and routed into the working destinations. Error — incorrect details shown as a plain message without revealing which field was wrong. Recovery — retry verification; or switch to Sign Up.
Page 9 of 24

3. Functional Requirements

FR-1 — Play and stream songs (explicit) As a Listener, I should play and stream songs so that I can listen to the catalogue.

  • Trigger/input: the Listener selects a song in Songs or Song Details.
  • Observable result: the full-width bottom player rule begins streaming the selected song, and its thin waveform advances only with the audio.
  • Access state: signed in.
  • Failure/recovery: if a song fails to stream, the player surfaces a retry for that song and the catalogue remains usable.
  • Continuation: the Listener selects another song or opens Song Details.

FR-2 — View song lyrics (explicit) As a Listener, I should view a song's lyrics so that I can read along with the track.

  • Trigger/input: the Listener opens a song in Song Details.
  • Observable result: the lyrics render as one narrow centered column with a mustard rule at the left, alongside the song's title, catalogue number, and colour plate.
  • Access state: signed in.
  • Failure/recovery: a song without lyrics shows a plain "no lyrics recorded" line while the player stays usable; a failed song load offers a return to Songs.
  • Continuation: the Listener plays the song or returns to Songs.
Page 10 of 24

FR-3 — Create and share a track (explicit) As a Song Creator, I should create a track and share it so that other users can find and stream my song.

  • Trigger/input: the Song Creator provides a track title and audio in Create Track and shares it.
  • Observable result: the track is saved to the creator, assigned a catalogue number and colour plate, marked shared, and appears in Songs for other users to stream.
  • Access state: signed in.
  • Failure/recovery: missing title or audio is reported inline; a save failure preserves the entered input and offers retry; an unshared track stays private to the creator.
  • Continuation: the creator opens the shared track in Song Details or creates another track.

FR-4 — Match an existing AI-generated song (explicit) As a Song Creator, I should submit an AI-generated song I already have and make the same song, so that I end up with a matching track of my own.

  • Trigger/input: the Song Creator submits the reference AI-generated song in Match Song and invokes the match action.
  • Observable result: the backend requests the match through the LiteLLM gateway; on completion the matched song is returned with its title, audio, catalogue number, and colour plate, and is saved to the creator.
  • Access state: signed in.
  • Failure/recovery: a provider or match failure shows a plain failure message, preserves the reference, and offers retry; no partial track is written to the creator's catalogue.
  • Continuation: the creator reviews the match, shares it, or returns to Songs.
Page 11 of 24

FR-5 — Share a matched song (required_inference) As a Song Creator, I should share a matched song so that other users can stream the song I made to match the AI-generated original.

  • Trigger/input: the Song Creator shares the matched song from Match Song.
  • Observable result: the matched song's sharing state becomes shared and it appears in Songs for other users.
  • Access state: signed in.
  • Failure/recovery: a failed share leaves the song saved but private and offers retry.
  • Continuation: the creator opens the shared song in Song Details.

FR-6 — Self-service enrollment (required_inference) As a new Listener or Song Creator, I should complete self-service enrollment so that my created tracks, matches, and listening state remain mine and resumable.

  • Trigger/input: an unauthenticated visitor chooses to enter the studio from Landing and completes the Sign Up form.
  • Observable result: an account is created and the user continues into the working destinations.
  • Access state: anonymous entry; protected destinations remain unavailable until enrollment succeeds.
  • Failure/recovery: invalid or already-used identity details are shown inline without clearing the form; the user may switch to Login.
  • Continuation: the user lands in Songs (Listener) or Create Track / Match Song (Song Creator).
Page 12 of 24

FR-7 — Returning verification (required_inference) As a returning Listener or Song Creator, I should verify my account at Login so that I can resume my songs, matches, and listening.

  • Trigger/input: a returning user submits identity details at Login.
  • Observable result: the account is verified and the user is routed into the working destinations with their prior state intact.
  • Access state: anonymous entry; protected destinations remain unavailable until verification succeeds.
  • Failure/recovery: incorrect details produce a plain message that does not reveal which field was wrong; the user may retry or switch to Sign Up.
  • Continuation: the user resumes in Songs or their creator destinations.

4. User Personas

Song Creator

The Song Creator is the persona the product was requested for: someone who already holds an AI-generated song and wants to make the same song. Their work is studio work, not browsing. They arrive with a reference artifact in hand, submit it in Match Song, and judge the produced match against the original. They also make tracks from scratch in Create Track and share them so other users can stream them. Their decisions are concrete: which reference song to match, whether the produced match is acceptable, and whether to share it. They interact with the Listener as the audience for their shared tracks, and with the identity surfaces to keep their catalogue bound to them across sessions. Observable success is a matched song saved under their account with its own catalogue number and colour plate, and — once shared — visible and streamable by Listeners in Songs.

Page 13 of 24

Listener

The Listener is the audience persona. Their work is playback and reading: they browse the Songs catalogue, stream a track in the bottom player, and open Song Details to read the lyrics in the narrow centered column. They do not produce tracks. Their inputs are song selections; their decisions are what to play next and whether to read the lyrics. They interact with the Song Creator only indirectly, as the recipient of shared tracks that appear in the catalogue, and with the identity surfaces to keep their listening state resumable. Observable success is a song streaming with its waveform advancing in step with the audio and its lyrics fully readable.

5. Core User Flows

Page 14 of 24

Flow A — Listener plays a song and reads its lyrics

  1. The Listener arrives at Landing (public, no account) and reads the hero: "One song. Make it yours." with the subline and the "Enter the studio" call to action.
  2. The Listener selects "Enter the studio". Because no session exists, the app routes to Login; the Listener switches to Sign Up and completes enrollment (Flow C).
  3. After enrollment the Listener lands in Songs, which loads the catalogue grid of colour plates, titles, and catalogue numbers.
  4. The Listener selects a song. The full-width bottom player rule begins streaming it and the thin waveform advances only with the audio.
  5. The Listener opens the song in Song Details and reads the lyrics in the narrow centered column with the mustard left rule.
  6. Continuation: the Listener returns to Songs and selects another track.
  7. Failure/recovery: if the catalogue fails to load, a retry action reloads it; if one song fails to stream, that song offers a retry and the rest of the grid stays usable; if a song has no lyrics, the lyric column states so and the player remains usable.
Page 15 of 24

Flow B — Song Creator matches an existing AI-generated song

  1. The Song Creator signs in through Login (or enrolls through Sign Up) and lands in Songs.
  2. The Song Creator navigates to Match Song.
  3. The Song Creator submits the AI-generated song they already have as the reference and invokes the match action (signal orange).
  4. The backend sends the match request through the LiteLLM gateway to the model provider. Match Song shows a processing state.
  5. On completion, Match Song returns the matched song with its title, audio, catalogue number, and colour plate, and saves it to the creator's account.
  6. The Song Creator reviews the match and shares it. The matched song's sharing state becomes shared.
  7. The Listener's side of this handoff: the shared song now appears in Songs, where a Listener can stream it and read its lyrics in Song Details.
  8. Continuation: the Song Creator opens the shared song in Song Details or returns to Songs.
  9. Failure/recovery: if the provider or match fails, Match Song shows a plain failure message, keeps the reference intact, and offers retry; no partial track is written. If sharing fails, the song stays saved but private with a retry available.
Page 16 of 24

Flow C — New user enrolls

  1. The visitor arrives at Landing and selects "Enter the studio".
  2. The visitor is routed to Login and switches to Sign Up.
  3. The visitor enters identity details and submits. The submit control shows a pending state.
  4. On success the account is created and the visitor continues into Songs (as a Listener) or into Create Track / Match Song (as a Song Creator).
  5. Failure/recovery: invalid or already-used details are shown inline without clearing the form; the visitor corrects the field and resubmits, or switches to Login.

Flow D — Returning user verifies and resumes

  1. The returning Listener or Song Creator arrives at Landing and selects "Enter the studio".
  2. The app routes to Login. The user submits identity details; the submit control shows a pending state.
  3. On success the user is routed into the working destinations with prior state intact — the Listener to Songs, the Song Creator to Songs, Create Track, or Match Song.
  4. Failure/recovery: incorrect details produce a plain message that does not reveal which field was wrong; the user retries or switches to Sign Up.
Page 17 of 24

Flow E — Song Creator creates and shares a track

  1. The signed-in Song Creator navigates to Create Track.
  2. The Song Creator provides a track title and audio.
  3. The Song Creator saves the track. It is assigned a catalogue number and colour plate and appears in the creator's track list.
  4. The Song Creator shares the track. Its sharing state becomes shared.
  5. The Listener's side: the shared track appears in Songs and is streamable, with its lyrics readable in Song Details.
  6. Continuation: the Song Creator opens the track in Song Details or creates another track.
  7. Failure/recovery: missing title or audio is reported inline; a save failure preserves the entered input and offers retry; an unshared track remains private to the creator.
Page 18 of 24

6. Visuals Colors and Theme

Muse and headline: Peter Saville — a record sleeve treated as a coded artifact. One exact colour code and one centered artifact carry the identity. The mood is record-shop gravity, not pop hype.

Mode: dark.

Colour tokens (exact hex, by role):

  • Background: #101012 — near-black ground covering roughly 80 percent of every surface.
  • Surface: #1A1A1E — framed metadata boxes, plates' backing, player rule ground.
  • Text: #F2F0EA — bone text for all reading.
  • Primary: #E8552B — signal orange; marks the play control and the match action only.
  • Accent: #F2C230 — mustard; appears only in the lyric column rule.
  • Muted: #8A8A93 — secondary metadata and catalogue numbers.

Typography:

  • Headings: Archivo — uppercase, wide 0.18em tracking, medium weight, small sizes with large silence around them.
  • Body: Spectral.
  • Scale: 1.25 modular — 44 / 34 / 26 / 18 / 15. Headline 44px on mobile, 96px on desktop, using clamp() so the headline stays whole at 375px, 768px, and 1280px.

Shape language: sharp corners only; no rounded cards, no pill buttons. One hairline rule per block. Metadata sits in small framed boxes like sleeve credits.

Page 19 of 24

Layout: a gallery grid of strict columns; one centered artifact per section; sparse metadata blocks at the edges.

Imagery: no photography. One coded colour field per song; thin waveform diagrams and catalogue numbers act as images.

Avoid: rounded cards and pill buttons; gradient blobs and glass panels; bright white grounds; stock artist photos; marquee text; the generic indigo/blue-on-white SaaS template.

7. Signature Design Concept

The public entry is a full dark field of #101012. One large square colour plate of signal orange #E8552B sits off-center left — the coded artifact, like a Factory sleeve code. To its right the headline stacks in bone caps: "One song. Make it yours." Below it the subline reads "Play the track, read the lyrics, then build a match of your own." A thin bottom rule spans the width; inside it sit a catalogue number in caps (e.g. RS-001) and the play control, both in bone text with the play control marked in signal orange. The "Enter the studio" call to action is a sharp-cornered control in the same bottom rule, never a pill. The same square-plate-and-catalogue-number grammar repeats on every song in Songs and Song Details, so the entry page reads as the first sleeve in the catalogue.

Page 20 of 24

8. Interaction Model & Motion Direction

Interaction Model: Static (direction) Motion Tempo: still Hero Dimensionality: flat

Landing Hero Motion Brief

  • Focal subject: the off-center-left square signal-orange colour plate, with the stacked bone-caps headline to its right and the thin bottom rule carrying the catalogue number and play control.
  • Input → transformation → outcome thesis: the visitor's pointer or focus on the play control or the "Enter the studio" control produces a slow precise 400ms fade of the control's state; the outcome is routing into the identity surfaces or the working destinations. No other transformation occurs on the hero.
  • Motion vocabulary: slow precise fades of 400ms; no bounce; no parallax; no marquee.
  • Composed first frame: dark field, orange plate left, stacked headline right, bottom rule with catalogue number and play control — fully composed before any interaction.
  • Reduced-motion state: identical static arrangement; fades are removed and state changes are instantaneous. The track bar advances only with the audio in all modes.
Page 21 of 24

9. Non-Functional Requirements

  • Durable application state (required_inference, from Planning Scope durable_state_required): accounts, created tracks, sharing state, and matched songs persist in MariaDB so a returning user resumes exactly where they left off.
  • AI-backed matching (explicit, from Planning Scope ai_required): the match capability calls a model provider through the LiteLLM gateway; the gateway's PostgreSQL is separate from application-owned storage and holds no application domain data.
  • Application-owned identity (required_inference, from Planning Scope delivery_shape.app_owned_identity): Sign Up and Login are first-party surfaces; protected destinations are unavailable until identity is established.
  • Readable text and controls at every viewport (explicit, creative direction): headlines, wordmarks, labels, numbers, and card text and controls stay entirely inside the viewport and their container at 375px, 768px, and 1280px, wrapping or scaling with clamp(). Imagery and decoration may bleed or crop; readable text and controls may not be covered.
  • Reduced motion (explicit, creative direction): with prefers-reduced-motion, the static arrangement remains fully usable.
  • No photography (explicit, creative direction): imagery is limited to coded colour fields, thin waveform diagrams, and catalogue numbers.
Page 22 of 24

10. Tech Stack

  • Frontend: React application UI.
  • Backend: shared FastAPI process for application APIs and domain modules (songs, lyrics, tracks, sharing, matches, accounts).
  • Application storage: MariaDB for application-owned persistent data.
  • Model gateway: LiteLLM gateway for the backend's model-provider calls, used by the match capability.
  • Gateway storage: PostgreSQL supporting LiteLLM, separate from application-owned storage.
  • Packaging: Docker / docker-compose across the five services above.

11. Assumptions and Constraints

  • A-1 (assumption): The reference AI-generated song is supplied by the Song Creator as the input to Match Song; the product does not generate the reference itself.
  • A-2 (assumption): "Make the same song" is realized as producing a matched song saved to the creator, which the creator may then share; the match is not required to be bit-identical to the reference.
  • A-3 (constraint): The closed persona catalog is Song Creator and Listener; no additional human roles are introduced.
  • A-4 (constraint): The closed page contract is Landing, Songs, Song Details, Create Track, Match Song, Sign Up, Login, with the access states stated in 2a and 2c.
  • A-5 (constraint): No social feed, messaging, payments, or artist verification is in scope.
  • A-6 (constraint): The creative direction is authoritative for section 6 and 7; the generic indigo/blue-on-white SaaS template is forbidden.
Page 23 of 24

12. Glossary

  • Song: A streamable track in the catalogue, identified by title, catalogue number, and colour plate.
  • Catalogue number: A short caps identifier such as RS-001 shown under every song title.
  • Colour plate: The square coded colour field that encodes a song, used in place of photography.
  • Lyrics: The text body of a song, shown in a narrow centered column with a mustard left rule.
  • Track: A song created by a Song Creator in Create Track.
  • Match: The act and result of reproducing an existing AI-generated song in Match Song.
  • Reference song: The AI-generated song submitted by the Song Creator as the input to a match.
  • Shared: The state in which a created or matched song appears in Songs for other users to stream.
  • LiteLLM gateway: The provisioned model-provider gateway the backend calls for matching.
Page 24 of 24
Live
Landing design preview

Landing: Read hero and subline

Landing: Enter the studio

Login: Switch to Sign Up

Sign Up: 1. Submit identity details

Sign Up: 2. Correct invalid details and resubmit

Songs: 1. Browse catalogue grid

Songs: 2. Retry catalogue load

Songs: 3. Play a song

Songs: 4. Retry failed stream

Song Details: 5. Read lyrics column

Song Details: 6. Play song

Song Details: 7. Return to Songs

Login: 1. Submit identity details

Login: 2. Retry verification

Login: Switch to Sign Up

Live
Landing design preview

Landing: Read hero and subline

Landing: Enter the studio

Login: Switch to Sign Up

Sign Up: 1. Submit identity details

Sign Up: 2. Correct invalid details and resubmit

Songs: 1. Browse catalogue grid

Songs: 2. Retry catalogue load

Songs: 3. Play a song

Songs: 4. Retry failed stream

Song Details: 5. Read lyrics column

Song Details: 6. Play song

Song Details: 7. Return to Songs

Login: 1. Submit identity details

Login: 2. Retry verification

Login: Switch to Sign Up