原始内容
Spotify Playlist Extractor
"My playlist is too big and I wanna listen to music based on vibe" - this tool solves that.
Overview
A full-stack application that helps users extract and manage subsets of their Spotify playlists based on vibes and preferences. Built with React/TypeScript frontend and FastAPI/Python backend.
Architecture
spotify-playlist-extractor/
├── backend/ # FastAPI service (Python)
│ ├── authentication/ # OAuth & session management
│ ├── spotify/ # Spotify API integration
│ └── config/ # Configuration management
├── frontend/ # React SPA (TypeScript)
│ └── src/
│ ├── views/ # Page components
│ ├── auth/ # OAuth state management
│ └── api/ # Backend connector
Quick Start
Prerequisites
- Python 3.9+
- Node.js 18+
- Spotify Developer Account (for API credentials)
Backend Setup
cd backend
cp .env.example .env
# Edit .env with your Spotify credentials
pip install -r requirements.txt
./start.sh
Backend runs on http://localhost:8000
Frontend Setup
cd frontend
pnpm install
pnpm run dev
Frontend runs on http://localhost:5173
Development
See detailed documentation:
- Backend README - API endpoints, testing, architecture
- Frontend README - Components, state management, build process
Project Standards
- Code Style: Follow AGENTS.md guidelines for Python (snake_case, type hints) and TypeScript (PascalCase components, explicit types)
- Testing: Backend uses pytest, frontend uses Vitest
- Max Method Length: 20 lines of logic
- Error Handling: HTTPException for API errors, try-catch with user-facing alerts in frontend
Testing
# Backend tests
cd backend && pytest
# Frontend tests (if configured)
cd frontend && npx vitest
Scripts
Backend
./start.sh- Start dev serverpytest- Run testsuvicorn main:app --reload- Alternative dev server
Frontend
pnpm run dev- Start dev serverpnpm run build- Production buildpnpm run lint- Run ESLint
License
See LICENSE