A music discovery league platform where users can join leagues, submit songs based on themes, vote on submissions, and compete on leaderboards.
- Backend: FastAPI + SQLAlchemy + MySQL
- Frontend: React + TypeScript + Vite (coming soon)
- Infrastructure: Docker + Docker Compose
- Auth: JWT tokens with email/password
- Music API: Songlink/Odesli
- Email: SendGrid
MysteryMixClub/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/v1/ # API routes
│ │ ├── core/ # Core functionality (security, database)
│ │ ├── models/ # SQLAlchemy models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ ├── utils/ # Utilities
│ │ └── main.py # FastAPI app entry
│ ├── alembic/ # Database migrations
│ ├── tests/ # Tests
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/ # React frontend (coming soon)
├── terraform/ # Infrastructure as Code (coming soon)
├── docker-compose.yml # Local development
└── Makefile # Common commands
-
Initialize the project:
make init
This will:
- Create
.envfile from.env.example - Build Docker containers
- Start services (backend + MySQL)
- Run database migrations
- Create
-
Access the API:
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
# Start services
make up
# Stop services
make down
# View logs
make logs
# Run database migrations
make migrate
# Create a new migration
make migrate-create
# Access backend shell
make shell-backend
# Access MySQL shell
make shell-db
# Run tests
make test-backend
# Clean everything (including volumes)
make clean
# See all available commands
make helpPOST /api/v1/auth/signup- Create new user accountPOST /api/v1/auth/login- Login and get JWT tokensGET /api/v1/auth/me- Get current user info (requires authentication)
curl -X POST http://localhost:8000/api/v1/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"name": "John Doe",
"password": "securepassword123"
}'curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "securepassword123"
}'curl -X GET http://localhost:8000/api/v1/auth/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Copy backend/.env.example to backend/.env and update:
SECRET_KEY: Use a secure random key (generate withopenssl rand -hex 32)DATABASE_URL: MySQL connection stringSENDGRID_API_KEY: Your SendGrid API key (optional for development)
Create a new migration after modifying models:
make migrate-create
# Enter migration name when promptedRun migrations:
make migrateRollback last migration:
make migrate-downgrademake test-backendWith coverage report:
make test-backend-cov- Project structure
- Docker Compose setup
- FastAPI backend with authentication
- JWT token system
- User model and database migrations
- Auth API endpoints (signup, login, me)
- Makefile for common commands
- React frontend with TypeScript
- Frontend authentication flow
- End-to-end testing
- Phase 2: League Management
- Phase 3: Rounds & Submissions
- Phase 4: Voting System
- Phase 5: Results & Leaderboard
- Phase 6: Playlist Features
- Phase 7: Email Notifications & Production Deployment
-
Test the backend:
# Start services make up # Check if backend is running curl http://localhost:8000/health # Try creating a user curl -X POST http://localhost:8000/api/v1/auth/signup \ -H "Content-Type: application/json" \ -d '{"email":"test@test.com","name":"Test User","password":"password123"}'
-
Proceed to React frontend setup (Phase 1 continuation)
-
Move to Phase 2 (League Management)
- Ensure MySQL container is healthy:
docker-compose ps - Check logs:
make logs - Wait a few seconds after starting for MySQL to initialize
- Try running migrations manually:
make migrate - Check if
.envfile exists inbackend/directory
- Stop conflicting services on ports 8000 (backend) or 3306 (MySQL)
- Or modify ports in
docker-compose.yml
This is a personal project. Refer to the implementation plan in .claude/plans/ for detailed roadmap.
Private project - All rights reserved