Initial commit: RehearsalHub POC

Full-stack self-hosted band rehearsal platform:

Backend (FastAPI + SQLAlchemy 2.0 async):
- Auth with JWT (register, login, /me, settings)
- Band management with Nextcloud folder integration
- Song management with audio version tracking
- Nextcloud scan to auto-import audio files
- Band membership with link-based invite system
- Song comments
- Audio analysis worker (BPM, key, loudness, waveform)
- Nextcloud activity watcher for auto-import
- WebSocket support for real-time annotation updates
- Alembic migrations (0001–0003)
- Repository pattern, Ruff + mypy configured

Frontend (React 18 + Vite + TypeScript strict):
- Login/register page with post-login redirect
- Home page with band list and creation form
- Band page with member panel, invite link, song list, NC scan
- Song page with waveform player, annotations, comment thread
- Settings page for per-user Nextcloud credentials
- Invite acceptance page (/invite/:token)
- ESLint v9 flat config + TypeScript strict mode

Infrastructure:
- Docker Compose: PostgreSQL, Redis, API, worker, watcher, nginx
- nginx reverse proxy for static files + /api/ proxy
- make check runs all linters before docker compose build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Steffen Schuhmann
2026-03-28 21:53:03 +01:00
commit f7be1b994d
139 changed files with 12743 additions and 0 deletions

38
scripts/seed.sh Normal file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -euo pipefail
API="${API_URL:-http://localhost/api/v1}"
echo "→ Running database migrations..."
docker compose exec api alembic upgrade head
echo "→ Seeding admin user..."
REGISTER_RESP=$(curl -sf -X POST "$API/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "admin@rehearsalhub.local",
"password": "changeme123!",
"display_name": "Admin"
}') || echo " Admin user may already exist"
echo "→ Logging in to get token..."
TOKEN_RESP=$(curl -sf -X POST "$API/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "admin@rehearsalhub.local", "password": "changeme123!"}')
TOKEN=$(echo "$TOKEN_RESP" | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
echo "→ Creating demo band..."
curl -sf -X POST "$API/bands" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"name": "Demo Band",
"slug": "demo-band",
"genre_tags": ["rock", "jam"]
}' | python3 -m json.tool
echo ""
echo "✓ Seed complete!"
echo " Admin: admin@rehearsalhub.local / changeme123!"
echo " API docs: https://${DOMAIN:-localhost}/api/docs"