Spotify Clone (Bopbox)

Spotify clone · Music app · from our videos on X

Bopbox is a Spotify-style music app built in SwiftUI. Browse Home's shortcut grid and Made For You mixes, open a playlist and hit the green play button, then slide up Now Playing to scrub, like a song and follow the lyrics line by line. Open Unboxed, its own Wrapped: the minutes you listened roll up, your top artist drops in, your top songs slide past and a share card sums up your year. Everything runs on fictional artists and simulated playback, ready to wire to your own catalog.

  • iPhone · Swift
  • Built in 1 prompt
  • Free to remix
Spotify Clone (Bopbox), music app built with Vibecode
Remix this template

Remix copies the working app into your account for free, exactly as we built it. It runs in Vibecode's cloud iOS simulator, in your browser.

Watch the video on X@vibecodeapp · Dec 2, 2026

The prompt that builds it

We built Spotify Clone (Bopbox) in one prompt. Paste it into a new app to build your own copy, or change it first.

Prompt · 3,514 words

Build Bopbox, a polished native iPhone app in SwiftUI: a Spotify-style music app with its own brand (Bopbox, a code-drawn green tile with three black equalizer bars). The hero is Unboxed, Bopbox's own Wrapped-style year in review: full-screen story cards in loud colours with giant type, the minutes count rolling up, "Your top artist was…" and the photo dropping in, your top songs, a share card. Plus Home, Search, Your Library, album and playlist pages, the mini player and Now Playing with lyrics. Simulated playback only: no audio, network, accounts or permissions. The user is Alex Rivera. Today is Wednesday, December 2, 2026: Unboxed day.

ASSETS
curl -L once and unzip flat: https://bopbox-66ef.beacon.host/media.zip (bopbox-icon.png: the app icon; 800x800 .jpg: alex-avatar; artist-mara, artist-velvet, artist-theo, artist-cass, artist-juniper; cover-golden-hour, cover-neon-laundromat, cover-saltwater-radio, cover-cherry-cola-sky, cover-paper-moons, cover-night-shift, cover-slow-motion-summer, cover-static-hearts, cover-chill, cover-focus, cover-workout, cover-throwback). Add them all to the asset catalog; set bopbox-icon.png as the app icon. Covers have no text: every title on a cover is drawn in code. No image generation is needed.

SHELL
Opens on Home: no splash, onboarding, sign-in or permission prompts. Dark everywhere (force .dark). The status bar stays visible and white on every screen. Root = one ZStack: the current tab's NavigationStack, the mini player, the tab bar, the overlay layer (Now Playing and Unboxed: full-screen views in this same ZStack, never sheets or fullScreenCovers), the toast, and the demo window (TouchDot + HOOK/TOUR strips) on top. When an overlay leaves, the screen under it is already rendered: never a black or blank frame.

FORMAT
One number formatter with Locale(identifier: "en_US"): "84,213", "$4,212", "18,204,331 monthly listeners", times "3:24" and "-2:42". The simulator's region is not en_US: never use the device locale.

FIXTURES (Data/Fixtures.swift: ONE list per kind; a new artist, album, playlist or card is one entry)
Artists (id · name · photo · monthly listeners · genre): mara · Mara Solis · artist-mara · 18,204,331 · Bedroom Pop; velvet · Velvet Arcade · artist-velvet · 9,812,004 · Synth-Pop; theo · Theo Kestrel · artist-theo · 6,240,118 · Indie Folk; cass · Cass Delray · artist-cass · 12,733,560 · Alt R&B; juniper · Juniper Vale · artist-juniper · 4,105,992 · Dream Pop.
Albums (id · title · artist · cover · year · tint · tracks with durations):
golden · Golden Hour Again · mara · cover-golden-hour · 2026 · #E8893A · Golden Hour Again 3:24, Passenger Seat 2:58, Polaroid Weather 3:41, Tangerine 3:05, Drive Slow, Love 4:02
laundromat · Neon Laundromat · velvet · cover-neon-laundromat · 2026 · #D6449B · Neon Laundromat 3:36, Spin Cycle 3:12, Quarters 2:49, After Hours 4:10
saltwater · Saltwater Radio · theo · cover-saltwater-radio · 2025 · #3E7C86 · Saltwater Radio 3:58, Lighthouse Keeper 4:21, Driftwood 3:33, Low Tide 3:47
cherry · Cherry Cola Sky · cass · cover-cherry-cola-sky · 2026 · #B3122E · Cherry Cola Sky 3:19, Velvet Rope 3:44, Sugar Rush Hour 3:02, Last Call 3:51
moons · Paper Moons · juniper · cover-paper-moons · 2025 · #A98BC9 · Paper Moons 3:29, Constellation Prize 3:55, Glow in the Dark 3:14
nightshift · Night Shift · velvet · cover-night-shift · 2024 · #3A47C9 · Night Shift 4:05, Exit 22 3:30, Tail Lights 3:48
summer · Slow Motion Summer (Single) · mara · cover-slow-motion-summer · 2026 · #2BB5C4 · Slow Motion Summer 3:16
hearts · Static Hearts · cass · cover-static-hearts · 2025 · #C8102E · Static Hearts 3:09, Dial Tone 2:54, Rerun 3:37
Playlists (id · title · subtitle · cover · tint · tracks): liked · "Liked Songs" · "Playlist · 1,212 songs" · LikedTile (code: a #450AF5 → #C4EFD9 diagonal gradient with a white heart.fill) · #5038A0 · the first track of every album; onloop · "On Loop" · "The songs you can't stop playing" · cover-slow-motion-summer · #2BB5C4 · Golden Hour Again, Neon Laundromat, Cherry Cola Sky, Saltwater Radio, Paper Moons, Static Hearts; mix1 · "Bop Mix 1" · "Mara Solis, Juniper Vale and more" · artist-mara · #E8893A; mix2 · "Bop Mix 2" · "Cass Delray, Velvet Arcade and more" · artist-cass · #B3122E; mix3 · "Bop Mix 3" · "Theo Kestrel, Mara Solis and more" · artist-theo · #3E7C86; fresh · "Fresh Finds Friday" · "New music from artists you love" · cover-night-shift · #3A47C9; chill · "Chill Box" · cover-chill · #8A5A2B; focus · "Focus Box" · cover-focus · #6B5A3A; workout · "Workout Box" · cover-workout · #C0392B; throwback · "Throwback Box" · cover-throwback · #E5B800 (mixes take 6 tracks from the albums).
PlaylistCover (Components/PlaylistCover.swift): the photo, plus for playlists the title drawn in code at the bottom-left (white, heavy, 18% of the cover's width, 2 lines max, a soft dark shadow) and a 6% tall band of the tint along the bottom.
Lyrics for "Golden Hour Again" (time · line): 0:12 Windows down on the interstate · 0:17 Your hand out chasing the sun · 0:22 We said we'd never be late · 0:27 But we're late for everyone · 0:33 Tangerine light on your face · 0:38 Like the summer never ends · 0:43 Play it back, play it back · 0:47 It's golden hour again · 0:52 Golden hour again · 0:57 Oh, it's golden hour again · 1:03 Windows down on the interstate. Other songs show "♪ Lyrics coming soon".

SCREENS
1. Home: a row under the status bar: alex-avatar (32 pt circle) then chips "All" (selected: #1ED760 fill, black 13 pt semibold), "Music", "Podcasts", "Audiobooks" (#2A2A2A fill, white). Then:
- The Unboxed card: full width (16 pt margins), 150 pt, 14 pt corners, a slowly moving gradient (#FF4FA3, #8B5CF6, #3D5AFE), "Your 2026 Unboxed is here" (24 pt black weight, white), "Your year in music, opened." (14 pt white 85%), the BoxMark (70 pt) at the right whose lid hops every 2 s, a white "Open it" capsule (black 13 pt bold). Tap → Unboxed.
- The shortcut grid: 2 columns × 4 rows, 8 pt gaps, 56 pt tall tiles, #2A2A2A, 6 pt corners, the cover 56x56 flush left, the title 13 pt bold (2 lines): Liked Songs, Bop Mix 1, Golden Hour Again, On Loop, Neon Laundromat, Chill Box, Cherry Cola Sky, Fresh Finds Friday. The tile of the playing list shows a small green equalizer at its right edge.
- Shelves (header 22 pt bold, 150 pt items, 12 pt gaps, horizontal scroll): "Made For You" (Bop Mix 1, 2, 3, Fresh Finds Friday, On Loop: PlaylistCover + subtitle 13 pt #B3B3B3, 2 lines); "Jump back in" (Saltwater Radio, Paper Moons, Night Shift, Static Hearts: cover + title 14 pt + "Album · <artist>"); "Your favorite artists" (the five artists: 150 pt circles + name 14 pt bold + "Artist").
- 150 pt bottom padding.
2. Search: alex-avatar + "Search" (24 pt bold), a camera icon at the right; a white search field (48 pt, 6 pt corners, magnifyingglass, "What do you want to listen to?" in black 55%). "Start browsing": 2-column 64 pt tiles: Music #DC148C, Podcasts #006450, Audiobooks #1E3264, Live Events #8400E7. "Browse all": 2-column 100 pt tiles, title 16 pt bold top-left, a cover (64 pt) rotated 25° clipped at the bottom-right: Pop #8D67AB, Bedroom Pop #E8893A, Indie Folk #477D95, Synth-Pop #D6449B, Alt R&B #B3122E, Dream Pop #A98BC9, Chill #8A5A2B, Workout #777777. Typing filters artists, albums and songs live into rows.
3. Your Library: alex-avatar + "Your Library" (24 pt bold), magnifyingglass and plus at the right; chips Playlists, Artists, Albums (filters); a "Recents" row (arrow.up.arrow.down) with a grid icon; 64 pt rows: Liked Songs (LikedTile, "Playlist · 1,212 songs" with a green pin.fill), On Loop, Bop Mix 1-3, the albums (square, "Album · <artist>"), the artists (circles, "Artist"). Tap → the page.
4. Album / playlist page (pushed): a gradient from the tint (top) to #121212 at 380 pt; the cover 240 pt centred with a shadow, shrinking to 0.6 and fading as you scroll 0-200 pt; title 24 pt bold; the artist (18 pt photo circle + name 13 pt bold) or the subtitle; "Album · 2026"; an action row: plus.circle, arrow.down.circle, ellipsis; at the right shuffle and a 56 pt #1ED760 circle with a black play.fill (pause.fill while this list plays). Track rows 56 pt: title 16 pt (#1ED760 while playing, after a 12 pt three-bar equalizer that bounces as a pure function of time), artist 14 pt #B3B3B3, ellipsis. Past 240 pt of scroll a top bar fades in (tint, title 16 pt bold, a 40 pt play button). Back chevron top-left.
5. Mini player: 8 pt above the tab bar, 8 pt side margins, 56 pt, 8 pt corners, the track's tint mixed 55% with black; cover 40 pt (4 pt corners), title 13 pt bold + artist 13 pt white 70% (one line each), hifispeaker and a play/pause at the right; a 2 pt progress line along the bottom (white 30% track, white fill). Swipe left/right changes track. Tap → Now Playing. Visible from launch: Golden Hour Again, paused at 0:42.
6. Now Playing (full-screen overlay; slides up from the mini player, spring 0.4 s; drag down closes): background a vertical gradient from the track's tint to the tint at 25% brightness, crossfading 0.4 s on track change. Top bar: chevron.down, "PLAYING FROM PLAYLIST" (11 pt caps, white 70%) over the list name (13 pt bold), ellipsis. The cover: full width minus 24 pt margins, square, 8 pt corners, shadow; on track change the new cover slides in from the side (0.3 s). Title 22 pt bold + artist 16 pt white 70%; at the right plus.circle that becomes #1ED760 checkmark.circle.fill with a burst of 6 green dots (0.35 s) and the toast "Added to Liked Songs". The scrubber: 4 pt track (white 30%), white fill, a 12 pt white knob (16 pt while dragging); elapsed and remaining 11 pt below; dragging seeks. Controls: shuffle (green + dot when on), backward.end.fill, a 64 pt white circle with black play/pause, forward.end.fill, repeat. A bottom row: hifispeaker.fill, square.and.arrow.up, list.bullet. Scroll down: the Lyrics card (12 pt corners, filled with the tint, "Lyrics" 16 pt bold, lines 22 pt bold: past lines white 70%, the current line white, upcoming black 55%; the current line changes on its timestamp and the card scrolls to keep it third from the top, 0.3 s).
7. Tab bar: a black gradient (#121212 at 0% to 95%, 110 pt), Home (house.fill), Search (magnifyingglass), Your Library (books.vertical.fill), icon over label (10 pt); selected white, others #B3B3B3. Hidden under overlays.

PLAYER (Data/PlayerStore.swift)
@Observable: queue (track ids), index, list id, isPlaying, elapsed (seconds), shuffle, repeat, liked ids. While playing, elapsed advances in real time (a 30 Hz clock); at the end the next track starts. Silent: no audio. Every view (row, equalizer, mini player, Now Playing, lyrics) reads the same store on the same frame.

UNBOXED (Features/Unboxed/: the signature)
- A full-screen overlay above everything but the demo window. Top: segmented progress bars (one per card, 3 pt, 4 pt gaps, 12 pt margins, white 35% track, white fill; the current one fills over the card's seconds (6), paused while a finger holds), under them the BopboxMark (20 pt) + "Unboxed" (13 pt bold) at the left and an xmark at the right. Tap the right two thirds → next card ("story-next"), the left third → previous, hold → pause, swipe down → close. The last card's tap closes.
- Card change: the new card's background wipes in from the right edge over the old card (a full-height rect, 0.25 s ease-out); then its elements enter at the template's offsets below, measured from the tap. Elements are never visible before their offset, and the old card's elements stay put under the wipe. Never a black, blank or faded frame.
- ShapeField (one Canvas): 12 shapes per card in its two accents (style .circles, .stars, .squiggles, .stripes or .blobs), positions and rotations as pure functions of the card's seed and time (slow drift), so they are already mid-motion on any first frame.
- Type: the giant numbers and names use .system(weight: .black) with .fontWidth(.condensed), monospaced digits; leads 26 pt bold; foot lines 17 pt semibold.
- Templates (StoryCard.kind), offsets from the card's tap:
 intro(title, subtitle): the BoxMark (180 pt) centred; +0.20 its lid pops up and away with a spin while 12 shapes burst out; +0.50 the title (44 pt) slams in (scale 1.4 → 1, 0.2 s); +0.80 the subtitle.
 counter(lead, from, to, prefix, suffix, foot): the lead at +0.00; the number (96 pt, scaled down to fit one line) rolls from `from` to `to` from +0.15 over 0.60 s, ease-out, digits rolling (.contentTransition(.numericText()) on every frame's value), prefix before it ("$"), the suffix (32 pt bold) under it; the foot pops (scale 0.8 → 1, 0.2 s) as the roll ends.
 reveal(lead, art, name, foot): the lead at +0.00; +0.25 the art (240 pt square, 12 pt corners) drops in from scale 1.3, 40 pt up and 3° tilt to rest (spring 0.35 s); +0.45 the name (52 pt) slams in (scale 1.4 → 1, 0.2 s); +0.70 the foot.
 ranked(title, rows): the title (30 pt) at +0.00; five rows (rank 34 pt, art 64 pt square, title 19 pt bold, subtitle 15 pt 70%) slide in from the right from +0.20, 0.08 s apart.
 badge(lead, emoji, title, foot): the lead at +0.00; +0.20 the emoji (150 pt) spins in (180° → 0, scale 0.2 → 1, spring); +0.45 the title (48 pt); +0.70 the foot.
 summary: a 330x520 share card in the accent: the top artist photo (140 pt), "Top Artists" 1-5 and "Top Songs" 1-5 in two columns (15 pt), "Minutes Listened" 84,213 and "Top Genre" Bedroom Pop (26 pt), the BopboxMark; a white "Share" capsule under it → toast "Saved to Photos". Elements cascade in 0.06 s apart.
- Art: .photo(asset), .cover(albumId) or .emoji(String, tint hex): a tile filled with the tint, the emoji 140 pt centred, the same size and corners as a photo.
- StoryCard: id, kind, palette (background, text, accent1, accent2 hex), shapes, seconds.
- StoryCatalog.unboxed (in order):
 intro · intro "Your 2026 Unboxed" / "Let's open it." · #1ED760, text #000000, #FF4FA3, #3D5AFE · .blobs
 minutes · counter "You listened to" 0 → 84,213, suffix "minutes", foot "That's more than 98% of listeners in the US." · #3D5AFE, #FFFFFF, #C6F94A, #FF4FA3 · .circles
 topArtist · reveal "Your top artist was" .photo(artist-mara) "Mara Solis", foot "You're in her top 0.5% of listeners." · #FF4FA3, #000000, #C6F94A, #3D5AFE · .circles
 topSongs · ranked "Your top songs": Golden Hour Again · Mara Solis; Neon Laundromat · Velvet Arcade; Saltwater Radio · Theo Kestrel; Cherry Cola Sky · Cass Delray; Paper Moons · Juniper Vale (their covers) · #121212, #FFFFFF, #1ED760, #FF4FA3 · .stripes
 genre · reveal "Your top genre was" .emoji("🌙", #2B1B5A) "Bedroom Pop", foot "Then Indie Folk, Synth-Pop, Alt R&B and Dream Pop." · #C6F94A, #000000, #3D5AFE, #FF7A1A · .stars
 personality · badge "Your listening personality" "🦉" "The Night Owl", foot "Most of your listening happened after 11 PM." · #8B5CF6, #FFFFFF, #C6F94A, #FF7A1A · .stars
 summary · #1ED760, #000000, #FF4FA3, #3D5AFE · .blobs
- Chapters (the seam a remix uses): StoryChapter: id, insertAfter (a card id), cards [StoryCard]. StoryCatalog.chapters: [StoryChapter] = [] here. The played list = unboxed with each chapter's cards inserted after its card; the bars count that list.

LOGOS (Components/Marks.swift)
BopboxMark: a #1ED760 rounded square (22% corners) with three black capsules centred side by side (width 12%, gaps 7%, heights 34%, 56%, 42% of the side). BoxMark: a gift box: a square body (#FF4FA3), a lid 8% wider (#FF4FA3, darker 10%), a #C6F94A ribbon cross and a bow of two ellipses; the lid is its own view so it can pop.

DEMO ENGINE (Data/DemoScript.swift, Demo/)
- Every element a script touches registers its frame by id with .demoTarget("…") (an anchor preference): "tab-<name>", "shortcut-<id>", "unboxed-card", "play-big", "row-<n>", "miniplayer", "close", "back", "like", "next-track", "scrubber", "story-next", "share".
- DemoStep (absolute seconds from the start): reset (no animation), openStory(cardId, counterAt: Int?) (Unboxed open on that card with its elements in place and no animation; a counter card shows counterAt and waits), roll(duration) (the open counter card rolls from counterAt to its `to`, then its foot pops), dot(target, glide), press (the TouchDot presses where it is, then that target's real action runs), scrub(to seconds, duration) (through the real scrubber), scrollTo(y, duration), hideDot. ScriptPlayer runs a [DemoStep] on the main actor against its start time (absolute times, so drift never builds). In scripts the story's auto-advance is off.
- Helpers a remix reuses: DemoScript.storyOpener (HOOK's 0.00-0.95 below) and DemoScript.next(at:) (a press on story-next).
- TouchDot: above everything (44 pt, white 30%, a 3 pt white ring, soft shadow); scales in as it lands, glides between targets (0.25 s ease), presses (scale 0.85, 0.1 s); hideDot fades it (0.25 s).

HOOK (the video's first 3 seconds)
- HOOK MODE: tapping an invisible 24x60 pt strip at the RIGHT edge (x 378-402, y 300-360 pt), in its own window above everything (a tap there closes whatever is open), resets everything and plays DemoScript.hook through the real ScriptPlayer, store and views, identical every time (seconds from the tap):
 0.00 with no animation: Unboxed open on the minutes card, its lead and suffix in place, the counter showing 52,140, its bar half full; fully drawn (never a fade-in or slide-in).
 0.00-0.25 hold exactly that. 0.25 roll(0.60): 52,140 → 84,213; 0.85 the foot pops.
 0.95 the dot lands on story-next (x 300, y 560); 1.00 press → topArtist (wipe 1.00-1.25, photo 1.25, name 1.45, foot 1.70).
 2.30 press → topSongs. 3.40 press → genre. 4.20 hideDot.
- Every wait uses the hook's own times, never the app's normal delays.
- What the eye must see: frame 0 fully drawn; something moves every half second; no flash longer than 0.1 s.

TOUR MODE (for filming the app's other moves)
Tapping an invisible 24x60 pt strip at the LEFT edge (x 0-24, y 300-360 pt), same window, resets and plays DemoScript.tour (seconds from the tap): 0.0 Home at the top; 0.8 press shortcut-onloop (the page pushes); 2.0 press play-big (row 1 turns green, the equalizer bounces, the mini player shows it playing); 3.0 scrollTo 260 (0.6 s: the cover shrinks, the top bar fades in); 4.2 press miniplayer → Now Playing; 5.4 scrub(to 44, 0.8 s); 6.6 press like; 7.6 scrollTo the Lyrics card (0.6 s: "It's golden hour again" lights up at 0:47); 10.6 scrollTo 0 (0.5 s); 11.4 press next-track (Neon Laundromat slides in, the pink crossfades in); 12.6 press close; 13.4 press back; 14.2 press tab-search; 15.4 press tab-library; 16.6 press tab-home; 17.4 press unboxed-card (intro: the lid pops); 19.0 press story-next (minutes roll from 0); 20.6 next (topArtist); 22.2 next (topSongs); 23.8 next (genre); 25.2 next (personality); 26.6 next (summary); 28.0 press share; 29.0 hideDot. Every press runs the real button action.

LOOK
Background #121212, raised #1F1F1F and #2A2A2A, text white, secondary #B3B3B3, accent #1ED760. SF Pro everywhere; numbers .monospacedDigit(). Springs under 450 ms, light haptics on taps, pressed states (scale 0.96). Images decoded at launch, off the main thread.

RULES
- Native SwiftUI, iOS 26 (keep the template's target), iPhone portrait.
- Deterministic fixtures. No backend, login, permissions, audio, network calls at runtime, notifications or analytics. No persistence: delete the SwiftData starter, no UserDefaults or files.
- Files under 300 lines, big bodies split into subviews, no long chained expressions; every animation smooth at 60 fps.
- Keep every file inside /home/user/workspace (/tmp is denied).

REMIX-READY
Theme/Theme.swift (colours, fonts, metrics; no colour literals elsewhere), Theme/Copy.swift (every word), Data/Fixtures.swift, Data/StoryCatalog.swift, Data/DemoScript.swift (HOOK MODE and TOUR MODE as [DemoStep]). Codable models with String ids (Artist, Album, Track, Playlist, LyricLine, StoryCard, StoryChapter, Art, Palette) behind one MusicDataSource protocol (FixtureSource) feeding @Observable LibraryStore and PlayerStore. PlaylistCover, the story templates, StoryCatalog and ScriptPlayer are the seams. Components/ (one file per component above) and Features/<Screen>/. README.md under 80 lines: the file map; how to rename the app and add an artist, album, playlist or story card; 3 one-prompt remixes (a podcast app with chapters and a sleep timer; a DJ set tracker for a club night; an Unboxed year in review for any app, like your gym, your reading or your coffee, built from StoryCatalog). "Read README.md first." atop CLAUDE.md and ios/AGENTS.md; replace ios/CLAUDE.md's structure block with this app's files. No scratch folders.

FILMING
Long-press the avatar on Home for 1 s to reset everything to launch (Home at the top, no overlay, the player paused at 0:42 on Golden Hour Again, likes and toasts reset).

BUILD
Theme, Copy, Fixtures and Format, then Home with the tab bar and the mini player (launch and look first), PlaylistCover and the album page, the PlayerStore, Now Playing and lyrics, Search and Library, then Unboxed (the templates, ShapeField, the wipe, the bars), then ScriptPlayer, TouchDot and HOOK MODE, then TOUR MODE; a one-line status per screen; launch in the simulator every two or three files. Fetch media.zip as soon as the shell runs; check the files exist, never view them. Walk each flow once and fix what breaks; no pixel measuring or debug modes. Deliver the whole app, not a plan. Do not publish.
All templates