
CleanPlays API
Go/Fiber Backend Powering CleanPlays Streaming, Search & Billing
Overview
The CleanPlays API is the Go backend behind a royalty-free, AI-generated music streaming platform for businesses such as cafes, shops and salons. From a single Fiber service it powers streaming, catalog, search, recommendations and billing for both the web and iOS clients, backed by PostgreSQL, Redis and Elasticsearch. The codebase follows a clean handler/service/repository layering with substantial table-driven test coverage.
What It Does
It transcodes uploaded audio into adaptive HLS renditions, curates the catalog by business sector, and serves radios, daily/weekly mixes and autoplay recommendations. Full-text search runs on Elasticsearch with custom Turkish analyzers, in-venue announcements are synthesized with ElevenLabs TTS, and subscriptions are handled through PayTR recurring billing on web and RevenueCat on mobile. Background workers, schedulers and recovery loops keep transcoding, billing and search indexes healthy without manual intervention.
Tech Stack
Key Features
Adaptive HLS streaming: FFmpeg transcodes each track into 128 and 256 kbps AAC renditions with a generated master playlist
Elasticsearch search across songs, artists, albums, playlists, genres and sectors with custom Turkish analyzers and edge-ngram autocomplete
Sector-based curation, facet-driven radios, and deterministic per-user daily/weekly mixes
Weighted autoplay recommendations blending genre/BPM/mood/energy scoring with collaborative filtering and per-artist diversity caps
ElevenLabs TTS venue announcements (PRO-gated) with monthly quotas and scheduled day/time programs
PayTR recurring subscriptions with 3-D Secure, dunning and grace-period handling; RevenueCat webhooks for mobile
Server-side Meta Conversions API forwarding of purchase events
Google/Apple OAuth and JWT auth, admin bulk import from Excel, and idempotent CLI seeding tools
Technical Highlights
Key Achievements
Designed and shipped the entire backend solo as the engine for the CleanPlays web and iOS apps
Built a resilient media pipeline that survives corrupt files and pod restarts through locking, recovery loops and idempotent workers
Delivered Turkish-first search relevance with ICU folding, edge-ngram typeahead and popularity-weighted function scoring
Implemented end-to-end recurring billing with idempotent PayTR and RevenueCat webhooks plus server-side CAPI purchase attribution
Maintained a clean layered architecture with repository contracts and broad table-driven unit tests
Impact & Results
Serves as the single backend for the CleanPlays platform (web + iOS), built end to end at Group Taiga. Its HLS pipeline, sector curation and TTS announcements give businesses a compliant, on-brand alternative to collecting-society music licensing.