Building a Music Archive with Next.js, Prisma, and D3
How a 20-year-old Microsoft Access database became a full-stack web application with real-time enrichment from 6 external APIs.
The Origin
It started as a simple Access .mdb file — 3,706 recordings tracked since the early 2000s. Artist, album, year, format, rating. Functional but isolated. The question was: what happens when you connect this data to the broader music knowledge graph?
The Stack
- Next.js 16 — App Router with server components, API routes, and static generation where possible.
- PostgreSQL on AWS RDS — The production database, accessed via Prisma ORM.
- Prisma — Type-safe database client with migrations. The schema preserves all original Access fields while adding enrichment columns.
- Tailwind CSS 4 — Utility-first styling with custom components for the newspaper layout, mixing console, and network graph.
- D3.js — Force-directed graph visualization for the musician network.
- Recharts — Radar charts, bar charts, and pie charts for analytics dashboards.
The Enrichment Pipeline
The real transformation came from connecting each recording to external data sources:
- MusicBrainz — Track listings, release IDs, band member credits. 2,300+ albums enriched.
- Wikipedia — Album summaries and context. 1,600+ articles linked.
- YouTube — Per-track video matching using 10 API keys with quota rotation. Album-level video discovery with normalized artist name handling.
- Discogs — Marketplace pricing for both CD and vinyl pressings. Collection value analytics.
- Last.fm — Listener counts, genre tags, similar artists. Powers the recommendation engine.
- RSS Feeds — Aggregated from 8 prog/metal sources for the daily news page.
The Recommendation Engine
Rather than simple "you might like" suggestions, the engine performs gap analysis across multiple dimensions: adjacent artists (via Last.fm similarity data), catalog completeness, genre underrepresentation, format upgrades, and audiophile pressing opportunities. Each recommendation carries a composite score with a curator-style explanation.
The Musician Network Graph
By parsing MusicBrainz credits across 2,300 albums, we built a graph of musicians and their band connections. D3's force simulation arranges 120+ nodes into a navigable constellation. Click a musician to see their full history; hover to highlight connections. It reveals relationships invisible in a flat database.
Infrastructure
Hosted on AWS: EC2 t3.small running the Next.js app behind nginx with Let's Encrypt SSL, RDS PostgreSQL for the database, and PM2 for process management. Enrichment scripts run as cron jobs. The entire deployment fits on a single instance with room to spare.
What's Next
The archive continues to grow. Daily YouTube enrichment adds album videos, the recommendation engine evolves with each new data point, and the collection itself expands as new acquisitions are cataloged. The goal was never just to list albums — it was to make a collection that thinks about itself.