A modern, fully open-source, AI-powered education platform for classical music built around three pillars:
| Pillar | Description |
|---|---|
| π Theory | Moodle-powered video courses with quizzes and progress tracking |
| πΈ Practice | Online lessons (Zoom) + in-person bookings (LibreBooking) with Stripe/Yapeal payments |
| πͺ Performance | Discover and publish concerts, masterclasses and workshops β ticketed via pretix |
My Music Coach is a hub-and-spoke platform with five core systems:
| System | Role | Domain (local) |
|---|---|---|
| my-music-coach | User profiles, orchestration, public event discovery | app.mymusic-coach.test / api.mymusic-coach.test |
| Keycloak | Central identity provider (OIDC + SAML) | auth.mymusic-coach.test |
| Moodle | Online learning core (courses, lessons, quizzes) | learn.mymusic-coach.test |
| LibreBooking | Physical lesson scheduling (rooms, resources) | booking.mymusic-coach.test |
| pretix | Event ticketing core (orders, check-in, refunds) | tickets.mymusic-coach.test |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Caddy Gateway (:80) β
β app. β api. β auth. β learn. β booking. β tickets. β
βββββ¬βββββ΄ββββ¬βββββ΄βββββ¬βββββ΄βββββ¬ββββββ΄ββββββ¬βββββββ΄ββββββ¬βββββββ
β β β β β β
βΌ βΌ βΌ βΌ βΌ βΌ
[web] [api] [keycloak] [moodle] [librebooking] [pretix]
β β β² β β β
β β OIDC/SAML β β β
β β ββββββ΄ββββββββββ€ β β
β β β βββββββββββΌβββββββββββββ€ β
β β β β ββββββΌβββββββββββββΌβββββββββββββ€
β β β β β β β β
β βΌ β βΌ β βΌ βΌ βΌ
β [postgres] β [moodle-db] β [librebooking-db] [pretix-db]
β [redis] β β [pretix-redis]
β [minio] β β
β [mcp-svc] β β
ββββββββββββββββ β
βββββββββ All DBs/Redis internal only
- Databases β
postgres-main,moodle-db,librebooking-db,pretix-db - Caches β
redis-main,pretix-redis - Identity β
keycloak - External services β
moodle,librebooking,pretix - Platform β
apiβweb - AI / Storage β
mcp-server,minio - Gateway β
gateway(last β waits for all upstreams)
- Docker & Docker Compose v2
- Node.js β₯ 20 + npm β₯ 10
# Add to /etc/hosts (or run: make hosts)
127.0.0.1 app.mymusic-coach.test
127.0.0.1 api.mymusic-coach.test
127.0.0.1 auth.mymusic-coach.test
127.0.0.1 learn.mymusic-coach.test
127.0.0.1 booking.mymusic-coach.test
127.0.0.1 tickets.mymusic-coach.testcp .env.example .env
# Edit .env with your secrets/API keys
make up # or: docker compose up -d --build
make migrate # Run DB migrations| Service | URL |
|---|---|
| π Web App | http://app.mymusic-coach.test |
| π GraphQL API | http://api.mymusic-coach.test/graphql |
| π Keycloak Admin | http://auth.mymusic-coach.test |
| π Moodle LMS | http://learn.mymusic-coach.test |
| π LibreBooking | http://booking.mymusic-coach.test |
| π« pretix Ticketing | http://tickets.mymusic-coach.test |
npm install
npm run devThe live deployment runs on a Linux (Ubuntu) host. TLS terminates at
Cloudflare, and a cloudflared tunnel connects
outbound only to the internal Caddy gateway β nothing is exposed on the
host's public IP. All services are reachable on the real domain:
| Service | URL |
|---|---|
| π Web App | https://app.mymusic.coach |
| π GraphQL API | https://api.mymusic.coach/graphql |
| π Keycloak | https://auth.mymusic.coach |
| π Moodle LMS | https://learn.mymusic.coach |
| π LibreBooking | https://booking.mymusic.coach |
| π« pretix Ticketing | https://tickets.mymusic.coach |
# 1. Generate a production .env with fresh, URL-safe secrets
bash scripts/gen-prod-env.sh
# then add CLOUDFLARE_TUNNEL_TOKEN=... (from the Cloudflare Zero Trust dashboard)
# 2. Bring up the stack with the production overrides + tunnel
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
make migrateThe override file (docker-compose.prod.yml) flips
the services that bake a hostname into their own config (Keycloak, Moodle,
LibreBooking, pretix) to the https://*.mymusic.coach hosts and adds the
cloudflared tunnel. The base docker-compose.yml stays the dev source of
truth (*.mymusic-coach.test).
Configure your Cloudflare tunnel ingress so every public hostname routes to
the gateway service (http://gateway:80), and point each *.mymusic.coach
hostname's DNS at the tunnel. See
docs/production-runbook.md for the full
deployment checklist and a diagnostic runbook for the external containers.
- Backend: Node.js Β· TypeScript Β· Apollo Server 4 (GraphQL) Β· Prisma Β· PostgreSQL 16 Β· Redis
- Frontend: Next.js 14 Β· TypeScript Β· Tailwind CSS Β· Apollo Client
- Auth: Keycloak 24 (OpenID Connect + SAML) β central SSO for all systems
- Learning: Moodle 4.4 β online course delivery
- Scheduling: LibreBooking 2.8 β physical room/resource booking
- Ticketing: pretix 2024.7 β event ticketing and check-in
- AI: MCP Server + DeepSeek V4
- Payments: Stripe + Yapeal (Swiss)
- Video: Zoom API
- Storage: MinIO (S3-compatible)
- Gateway: Caddy 2.8 (reverse proxy)
- Infrastructure: Docker Compose + Kubernetes
- AI-powered onboarding assessment (15β20 min) β theory, performance recording, musical culture + preferences β personalised skill level + learning path
- Duolingo-style gamification β XP, levels, streaks, badges, achievements
- Moodle-powered courses β sections, lessons (video/audio/text/quiz), enrollments, progress
- Teacher marketplace β certifications, availability, ratings, Zoom/LibreBooking scheduling
- pretix-powered event ticketing β geo-search for nearby concerts, full ticket lifecycle
- Social feed β posts, likes, comments, follows
- AI recommendations β courses, teachers and events matched to your profile
- Central SSO β one Keycloak account logs into all systems
apps/api/ GraphQL API (Apollo Server + Express)
src/integrations/ Integration layer (adapters, webhooks, sync)
adapters/ LibreBooking, Moodle, pretix adapters
webhooks/ Webhook handlers
provisioning/ User provisioning flows
sync/ Periodic sync jobs
apps/web/ Next.js 14 frontend
packages/database/ Prisma schema (PostgreSQL)
packages/graphql-schema/ Shared GraphQL SDL
packages/mcp-server/ MCP server (AI tools via DeepSeek)
docker/
gateway/ Caddy reverse proxy config
keycloak/ Keycloak realm export
moodle/ Moodle Dockerfile
librebooking/ LibreBooking Dockerfile + entrypoint
pretix/ pretix Dockerfile + entrypoint
k8s/ Kubernetes manifests
docs/
integration-architecture.md Full integration design
local-domains.md /etc/hosts setup guide
pretix-integration.md pretix integration details
security-baseline.md Security controls and checklist
make up Start the full stack
make down Stop all services
make logs Tail all service logs
make migrate Run Prisma migrations
make seed Seed the database
make realm-import Re-import Keycloak realm
make hosts Print required /etc/hosts entries
make dev Start local dev servers (no Docker)
make help Show all available targets
docs/integration-architecture.mdβ system design, service map, data flowsdocs/local-domains.mdβ local domain setup guidedocs/pretix-integration.mdβ pretix ticketing integrationdocs/security-baseline.mdβ security controls and secrets managementdocs/architecture.mdβ original architecture reference