Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4727687
Migrate research provider to SongStats
sidneyswift Jun 3, 2026
5174544
fix: address SongStats migration review feedback
sidneyswift Jun 3, 2026
71eb067
fix: use uppercase SongStats API key env
sidneyswift Jun 3, 2026
02ae4c7
fix: use SongStats API host
sidneyswift Jun 3, 2026
5752953
fix: map SongStats metric sources
sidneyswift Jun 3, 2026
0a9df31
fix: allow SongStats radio metric sources
sidneyswift Jun 3, 2026
ab3c2ec
fix: map SongStats related artists
sidneyswift Jun 3, 2026
73925ae
fix: use SongStats stats source ids
sidneyswift Jun 3, 2026
d6f808e
fix: allow slow SongStats stats responses
sidneyswift Jun 3, 2026
d76098f
fix: cache research metrics refreshes
sidneyswift Jun 3, 2026
5436658
refactor: drop research metrics cache, fetch SongStats directly (KISS)
sweetmantech Jun 4, 2026
3212c9e
fix(research): return real placements from /research/playlists
sweetmantech Jun 4, 2026
8c8bc15
perf(research): raise slow SongStats timeout 35s->50s to cut prematur…
sweetmantech Jun 4, 2026
5566a9d
refactor(research): extract mapEntitySearch to its own file (SRP)
sweetmantech Jun 4, 2026
e238885
refactor(research): one exported function per file (SRP); drop legacy…
sweetmantech Jun 4, 2026
b604f4b
refactor: remove Chartmetric integration and related files
ahmednahima0-beep Jun 5, 2026
45ee3d5
refactor: remove research API routes and handlers
ahmednahima0-beep Jun 5, 2026
20f3856
refactor: simplify research search handler and validation
ahmednahima0-beep Jun 5, 2026
e5e89f1
Merge branch 'test' into migrate-chartmetric-to-songstats
ahmednahima0-beep Jun 4, 2026
3d7ba81
refactor: streamline track ID extraction logic
ahmednahima0-beep Jun 5, 2026
4fb8760
refactor: replace fetchResearchProvider with fetchSongstatsResearch
ahmednahima0-beep Jun 5, 2026
a88ad2e
refactor(research): remove unsupported /research/rank endpoint (YAGNI)
sweetmantech Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RESEND_API_KEY=
PERPLEXITY_API_KEY=
SERPAPI_API_KEY=
ANTHROPIC_API_KEY=
SONGSTATS_API_KEY=

# Spotify
SPOTIFY_CLIENT_ID=
Expand Down
4 changes: 2 additions & 2 deletions app/api/research/albums/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export async function OPTIONS() {
}

/**
* GET /api/research/albums — Album discography for a Chartmetric artist id.
* GET /api/research/albums — Album discography for a provider artist id.
* Discovery by name is the caller's job via `GET /api/research`.
*
* @param request - must include numeric `artist_id` query param
* @param request - must include provider `artist_id` query param
* @returns JSON album list or error
*/
export async function GET(request: NextRequest) {
Expand Down
22 changes: 0 additions & 22 deletions app/api/research/charts/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/cities/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/curator/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/discover/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/festivals/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/genres/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/instagram-posts/route.ts

This file was deleted.

2 changes: 2 additions & 0 deletions app/api/research/metrics/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { NextRequest, NextResponse } from "next/server";
import { getCorsHeaders } from "@/lib/networking/getCorsHeaders";
import { getResearchMetricsHandler } from "@/lib/research/getResearchMetricsHandler";

export const maxDuration = 60;

/**
* OPTIONS /api/research/metrics — CORS preflight.
*
Expand Down
22 changes: 0 additions & 22 deletions app/api/research/playlist/route.ts

This file was deleted.

3 changes: 3 additions & 0 deletions app/api/research/playlists/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { NextRequest, NextResponse } from "next/server";
import { getCorsHeaders } from "@/lib/networking/getCorsHeaders";
import { getResearchPlaylistsHandler } from "@/lib/research/getResearchPlaylistsHandler";

// SongStats top_playlists (scope=current) is a slow stat call; allow up to 60s.
export const maxDuration = 60;

/**
* OPTIONS /api/research/playlists — CORS preflight.
*
Expand Down
22 changes: 0 additions & 22 deletions app/api/research/radio/route.ts

This file was deleted.

22 changes: 0 additions & 22 deletions app/api/research/rank/route.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/api/research/track/playlists/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function OPTIONS() {
/**
* GET /api/research/track/playlists — Playlists featuring a specific track. Requires `?id=` or `?q=` query param.
*
* @param request - must include `id` (Chartmetric track ID) or `q` (track name) query param
* @param request - must include `id` (provider track ID) or `q` (track name) query param
* @returns JSON playlist placements for the track or error
*/
export async function GET(request: NextRequest) {
Expand Down
4 changes: 2 additions & 2 deletions app/api/research/track/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export async function OPTIONS() {
}

/**
* GET /api/research/track — Full Chartmetric track details by numeric `id`.
* GET /api/research/track — Full provider track details by `id`.
* Discovery (search by name) is the caller's job via `GET /api/research`.
*
* @param request - must include numeric `id` query param
* @param request - must include provider `id` query param
* @returns JSON track details or error
*/
export async function GET(request: NextRequest) {
Expand Down
22 changes: 0 additions & 22 deletions app/api/research/venues/route.ts

This file was deleted.

Loading
Loading