Contact
Let's work together
MagicPlaylist

MagicPlaylist

A native Android application that generates music playlists from seed tracks using Shazam similarity data, then exports them directly to Spotify - built with Kotlin, Jetpack Compose, and Material Design 3.

September 2025
2 days (intensive)
Product Owner & Lead Developer
Kotlin 2.0.21Android SDK 36Jetpack ComposeMaterial Design 3Retrofit 2OkHttp 4Kotlin CoroutinesCoilSpotify Auth SDKGradle (Kotlin DSL)Python

Kotlin Lines

5,666

Native Android code

Source Files

46

Kotlin source files

UI Components

22

Reusable Compose components

Mapping Strategies

5

Shazam-to-Spotify fallback chain

Project Overview

What MagicPlaylist is and why it exists

MagicPlaylist is a native Android application written in Kotlin that automatically generates music playlists from tracks chosen by the user. The app uses the unofficial Shazam API to discover similar tracks, then exports the generated playlists directly to the user's Spotify account.

The concept is simple but powerful: the user enters one or more songs they like, and the application builds a complete playlist of similar tracks by recursively exploring musical similarity relationships via Shazam, then saves the result to Spotify.

This project was built within the ESIEA Master in Software Engineering program as a training project. It addresses a real need among music enthusiasts: the difficulty of discovering new tracks matching a specific musical style and building quality thematic playlists without spending hours searching manually.

Target Users

B2C - General public, Spotify users looking to enrich their playlists and discover new artists through an intuitive mobile experience.

Core Capabilities
  • Real-time song search with auto-completion via Shazam API
  • Multi-seed selection (1-50 tracks) with album artwork display
  • Configurable BFS expansion: depth 1-3, up to 10,000 tracks, deduplication
  • Predictive estimation of expected tracks and API calls before generation
  • Audio preview playback with exclusive single-track mode
  • OAuth 2.0 Spotify export with progressive 3-level chunking
  • 5-strategy Shazam-to-Spotify mapping (ISRC, exact, fuzzy Levenshtein)
MVVM Architecture
MagicPlaylist MVVM Architecture - 3 screens, 22 UI components, 4 API services

Objectives, Context & Risks

The strategic vision behind the project

The project was driven by five measurable goals:

Modern Android Stack

SDK 36

Jetpack Compose, Material 3, MVVM, Kotlin 2.0.21

API Integration

2 APIs

Shazam (unofficial) + Spotify (official) with error handling

Mapping Accuracy

95%+

Shazam-to-Spotify track matching via 5-strategy fallback

Playlist Scale

10K tracks

Handle large playlists with max 500 API calls budget

Dev Speed

2 days

Full app delivery with AI-assisted development

Context

This project was built as part of the ESIEA Master in Software Engineering program. The technology choices were intentionally bleeding-edge: Kotlin 2.0.21, Compose BOM 2024.12, Android SDK 36, and AGP 8.13. A key architectural decision was to use Shazam's unofficial web API directly rather than a paid wrapper (RapidAPI), bringing flexibility but also fragility risk.

Stakes

The core value proposition rests on music recommendation quality - the relevance of discovered tracks and the reliability of the Shazam-to-Spotify mapping. The user experience was designed with polished animations, gradient designs, confetti celebrations, and real-time progress feedback during generation.

Stack Modernity Score
Identified Risks

Shazam Unofficial API Changes

High probability, critical impact. No API contract exists. Mitigated by browser header spoofing, but inherently fragile.

Rate Limiting (Shazam + Spotify)

High probability, medium impact. Mitigated by 3-level progressive chunking, exponential backoff, and circuit breaker patterns.

Shazam Response Variability

Medium probability. Some Shazam responses have incomplete data. Mitigated by fallback handling for missing fields.

Mapping Rate Below 95%

Medium probability. Mitigated by 5 fallback strategies (ISRC, exact, fuzzy, duration matching).

Spotify Token Expiration

Low probability. Mitigated by automatic refresh and token persistence.

Risk Assessment Matrix

Implementation Phases

A chronological walkthrough of the development process

Development Timeline
Project timeline: 2 days of active development
Phase 1
Technical Foundation & Base UI
Sept 8, 2025
  • Android project setup with Gradle Kotlin DSL and SDK 36
  • MVVM architecture with Jetpack Compose and StateFlow
  • Material 3 theming with dynamic colors
  • Home screen with real-time search UI
Phase 2
Shazam Integration & Expansion Algorithm
Sept 8-9, 2025
  • Unofficial Shazam API integration (search + similarity endpoints)
  • BFS expansion algorithm with mathematical guardrails
  • Predictive estimation engine (expected tracks + API call budget)
  • Coroutines-based asynchronous API orchestration
Phase 3
Spotify Integration & Export
Sept 9, 2025
  • OAuth 2.0 authentication via Spotify Auth SDK 2.1.1
  • Deep linking callback (magicplaylist://callback)
  • 5-strategy Shazam-to-Spotify mapping (ISRC, exact, fuzzy Levenshtein)
  • 3-level progressive chunking (20/10/1 tracks per batch)
Phase 4
Real-World Testing & Documentation
Sept 9, 2025
  • Full scenario test: 2 seeds to 126 discovered tracks to Spotify export
  • 15 screenshots documenting the complete user flow
  • 6 technical documents (PRD, mapping strategy, chunking, expansion)
  • Python beta test scripts for API analysis
BFS Expansion Algorithm
Breadth-First Search expansion: seeds to level 1 to level 2 with deduplication
Shazam-to-Spotify Mapping Pipeline
5-strategy fallback chain targeting 95%+ match rate
Mapping Strategy Success Rates
Data Model
Core data models: Song, Playlist, ExpansionConfig, SpotifyExportState

Team & Interactions

The human and AI collaboration model

Team size: 1 person + AI assistant

The project was developed by Jose DA COSTA as product owner, functional architect, UI designer, and QA lead. Claude Code (Anthropic) was used intensively as a pair-programming assistant throughout the development.

The collaboration model followed an iterative cycle: Jose specified requirements through ~80 detailed prompts (71 KB of CLAUDE_PROMPTS.md), validated results on the emulator, identified bugs, and directed corrections. Claude Code produced the implementation, chose technical patterns, wrote documentation, and fixed reported issues.

Overall Contribution Split
Contribution Breakdown by Activity
Jose DA COSTA - Product Owner & QA
  • Product vision and complete user journey design
  • Shazam API reverse-engineering (captured curl commands with full headers)
  • ~80 detailed functional specifications via structured prompts
  • All UI/UX decisions (gradients, colors, border thickness, spacing)
  • Manual QA on emulator: identified every bug (crashes, empty playlists, auth failures)
  • Non-negotiable standards: English only, zero code comments, Material 3, accessibility
Claude Code - Senior Developer
  • 100% of 5,666 Kotlin lines across 46 files
  • MVVM architecture implementation with StateFlow
  • All 6 technical documents (PRD, strategies, guidelines)
  • Gradle Kotlin DSL and version catalog configuration
  • Bug resolution for every reported issue
  • Application icon design (SVG/XML music note variants)
External Stakeholders

Shazam (Apple)

Music data & similarity - Unofficial API

Spotify

Playlist destination - Official OAuth 2.0 API

ESIEA

Training institution - Master program context

Results & Impact

Concrete outcomes for the developer and the project

Skills Acquired

Hands-on native Android development with the latest Kotlin/Compose stack

API reverse-engineering methodology (unofficial API consumption patterns)

AI-assisted development workflow: specification-driven pair programming

Advanced algorithmic design: BFS exploration with mathematical constraints

OAuth 2.0 flow implementation on mobile with deep linking

Resilient API integration patterns: chunking, backoff, circuit breaker

Project Deliverables

Fully functional Android app with 12 features from search to Spotify export

Demonstrated scenario: 2 seeds -> 126 tracks discovered -> 38 exported to Spotify

5,666 lines of clean, well-structured Kotlin code following MVVM

22 reusable Compose UI components with accessibility support

10 technical documents covering architecture, strategies, and setup

15 screenshots documenting the complete user journey

Demonstrated Scenario: Deep House Playlist

2 seed tracks (Dennis Ferrer) - 126 tracks discovered - 38 exported to Spotify after retry

Technical Metrics

Project Aftermath

What happened after delivery

The project was delivered as a complete, functional Android application demonstrating end-to-end music discovery and playlist generation. As a training project within the ESIEA Master program, it fulfilled its primary objective: proving the ability to build a native Android application from scratch using modern technologies.

The absence of a Git repository means there is no version history. The application remains on the development machine as a standalone APK. No deployment to the Google Play Store was planned or attempted.

The dependency on Shazam's unofficial API represents the biggest long-term risk. Any changes to the API structure or headers would break the core functionality. For a production scenario, a migration to an official music recommendation API (Spotify Recommendations, Last.fm) would be the natural evolution.

Related journey

Professional experience linked to this achievement

Critical Reflection

An honest retrospective on the project

Strengths

Functional end-to-end product demonstrated with real screenshots

Bleeding-edge technology stack (Kotlin 2.0.21, SDK 36, Compose 2024.12)

Clean MVVM architecture with proper separation of concerns

Rich technical documentation far exceeding typical training project standards

Advanced error handling: 3-level chunking, 5-strategy mapping, circuit breaker

Accessibility built-in: dedicated components, 48dp targets, 4.5:1 contrast

Areas for Improvement

No Git Repository

A .gitignore exists but no repository was initialized. Critical for traceability and collaboration.

No Unit Tests

Test dependencies are present (JUnit, Espresso, Compose UI Test) but zero test files written. BFS algorithm and mapper deserve thorough testing.

No Local Persistence

Room is referenced in the version catalog but not activated. Generated playlists do not survive app closure.

Unofficial API Dependency

Shazam's unofficial API is fragile. No fallback to alternative recommendation sources is implemented.

Missing Dependency Injection

Hilt is in the version catalog but not used. Services are likely instantiated manually.

Lasting Lessons
1

AI accelerates but does not replace engineering judgment: the decision not to write tests or initialize git remains the developer's responsibility.

2

Upfront documentation (PRDs, strategy docs) visibly guided coherent, structured development.

3

Rate limiting must be an architectural concern from day one when depending on third-party APIs, not an afterthought.

Skills applied

Technical and soft skills applied

Image gallery

Project screenshots and visuals