Files
vynl/backend/app/schemas/playlist.py
root 155cbd1bbf Initial MVP: full-stack music discovery app
Backend (FastAPI):
- User auth with email/password and Spotify OAuth
- Spotify playlist import with audio feature extraction
- AI recommendation engine using Claude API with taste profiling
- Save/bookmark recommendations
- Rate limiting for free tier (10 recs/day, 1 playlist)
- PostgreSQL models with Alembic migrations
- Redis-ready configuration

Frontend (React 19 + TypeScript + Vite + Tailwind):
- Landing page, auth flows (email + Spotify OAuth)
- Dashboard with stats and quick discover
- Playlist management and import from Spotify
- Discover page with custom query support
- Recommendation cards with explanations and save toggle
- Taste profile visualization
- Responsive layout with mobile navigation
- PWA-ready configuration

Infrastructure:
- Docker Compose with PostgreSQL, Redis, backend, frontend
- Environment-based configuration
2026-03-30 15:53:39 -05:00

47 lines
969 B
Python

from datetime import datetime
from pydantic import BaseModel
class TrackResponse(BaseModel):
id: int
title: str
artist: str
album: str | None = None
spotify_id: str | None = None
preview_url: str | None = None
image_url: str | None = None
tempo: float | None = None
energy: float | None = None
danceability: float | None = None
valence: float | None = None
genres: list | None = None
model_config = {"from_attributes": True}
class PlaylistResponse(BaseModel):
id: int
name: str
platform_source: str
track_count: int
taste_profile: dict | None = None
imported_at: datetime
model_config = {"from_attributes": True}
class PlaylistDetailResponse(PlaylistResponse):
tracks: list[TrackResponse] = []
class SpotifyPlaylistItem(BaseModel):
id: str
name: str
track_count: int
image_url: str | None = None
class ImportSpotifyRequest(BaseModel):
playlist_id: str