feat: scaffold FastAPI backend with ports-and-adapters layout

This commit is contained in:
Justin Visser 2026-08-09 20:58:10 +02:00
parent adcf4b9df6
commit 1f40d064ad
25 changed files with 973 additions and 22 deletions

View file

@ -0,0 +1,30 @@
"""Core domain models — pure data, no app-level imports."""
from pydantic import BaseModel
class Track(BaseModel):
"""A resolved, verified track from the catalog."""
spotify_id: str
title: str
artists: list[str]
album: str
album_art_url: str | None = None
class TasteProfile(BaseModel):
"""Compressed listening profile feeding both LLM calls."""
top_artists_long_term: list[str]
top_artists_short_term: list[str]
top_tracks_short_term: list[str]
saved_track_ids: set[str]
class Recommendation(BaseModel):
"""A ranked track with its one-line justification."""
track: Track
justification: str
rank: int