Back to projects
Case Study · 2026 · Design and engineering, end to end
Mehfil
An evening gathering for music and poetry.

Overview
Overview
Saregama publish the Carvaan Gold songlist as a public PDF. Mehfil turns that document into a browsable, playable catalogue, and replaces a one-axis dial with composable filters across six credit roles.
The problem
Why this exists
The device is a dial: 66 fixed positions, one at a time. The same catalogue as a query engine answers questions the dial cannot, but only if the data supports it, and the source is a PDF that credits singers and nothing else.
Constraints
Constraints
- The only source of truth is a marketing PDF, not an API
- Song entries credit singers only. Composer, lyricist and actor are absent
- No audio may be hosted or redistributed, so playback has to be someone else's embed
- A matched YouTube id is worthless if the video will not actually embed
Architecture
How it's built
- songlist.pdf to parse to enrich to resolve to verify to export to web app, six stages over one SQLite file
- Column-aware PDF extraction: naive text extraction bleeds adjacent columns into each other and corrupts titles
- The station trick: the 66 station names imply the roles the per-song rows omit. A song filed under GULZAR was written by him, under R.D. BURMAN composed by him, under REKHA picturised on her
- Every write is an UPSERT and no stage deletes resolved rows, so an interrupted run only loses the in-flight batch
- Song ids live in an append-only ledger keyed by title and film. Ingest and export both refuse to run if the ids in hand disagree with it
Tradeoffs
Tradeoffs
- Precision over recall on matching. An early matcher that accepted title-only matches produced roughly 380 wrong songs and was scrapped rather than tuned
- Ids are append-only rather than recomputed. Resolutions map song id to video and nothing rewrites them, so a shifted id would silently serve the previous song's video under the next song's name
- Failed embeds are demoted back to the queue rather than deleted, and dead ids are remembered so later runs never rediscover them
Lessons
Lessons learned
- Matched is not playable. Community data from 2017-18 matched 1,871 songs and only 52 percent still embedded, so verification against YouTube's oEmbed endpoint had to become its own pipeline stage rather than an afterthought.
- The parsed catalogue holds 4,310 songs against a marketing figure of 5,000. The PDF is Songlist 1.0 and the shipped device likely carries more, which is worth stating rather than rounding up to the nicer number.
- Region restrictions are still invisible. A video can pass the embeddable check and fail to play in a given country, and nothing in this pipeline detects that.
Results
Impact
3,916
songs playable, across 66 stations
2,671
songs given a composer the source omitted
52%
of a 2017 community dataset still embeddable, which is why verification exists