Full self-hosted click track generator for cover bands. Core technical pieces implemented: - CTP (Click Track Protocol) TypeScript schema, Zod validator, and WAV renderer (44.1 kHz, 16-bit PCM, accented downbeats, ramp sections) - MusicBrainz API client with 1 req/s rate limiting - PostgreSQL schema (songs, tempo_maps, registry_sync_log) with triggers - Git registry sync logic (clone/pull → validate CTP → upsert DB) - Next.js 14 App Router: search page, track page, API routes (/api/songs, /api/tracks, /api/generate) - UI components: SearchBar, SongResult, TempoMapEditor, ClickTrackPlayer (Web Audio API in-browser playback + WAV download) - Docker Compose stack: app + postgres + redis + nginx + registry-sync - Multi-stage Dockerfile with standalone Next.js output - .env.example documenting all configuration variables - README with setup instructions, CTP format spec, and API reference Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
2.8 KiB
Plaintext
45 lines
2.8 KiB
Plaintext
# ─────────────────────────────────────────────────────────────────────────────
|
|
# ClickTrack — environment configuration
|
|
# Copy this file to .env and fill in your values.
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
# ── Database ─────────────────────────────────────────────────────────────────
|
|
# PostgreSQL connection string.
|
|
# When using docker compose the default works out of the box.
|
|
DATABASE_URL=postgres://clicktrack:clicktrack@localhost:5432/clicktrack
|
|
|
|
# Password used by the postgres service in docker-compose.yml.
|
|
# Change this before deploying to production.
|
|
POSTGRES_PASSWORD=clicktrack
|
|
|
|
# ── Redis ────────────────────────────────────────────────────────────────────
|
|
# Redis connection URL.
|
|
REDIS_URL=redis://localhost:6379
|
|
|
|
# ── Community registry ───────────────────────────────────────────────────────
|
|
# Public GitHub repository containing community CTP files.
|
|
# Example: https://github.com/your-org/clicktrack-registry
|
|
# Leave blank to disable registry sync.
|
|
REGISTRY_REPO=
|
|
|
|
# Branch to pull from (default: main).
|
|
REGISTRY_BRANCH=main
|
|
|
|
# Interval in seconds between registry syncs (default: 3600 = 1 hour).
|
|
REGISTRY_SYNC_INTERVAL=3600
|
|
|
|
# ── App ──────────────────────────────────────────────────────────────────────
|
|
# Display name shown in the UI and page title.
|
|
NEXT_PUBLIC_APP_NAME=ClickTrack
|
|
|
|
# ── MusicBrainz ──────────────────────────────────────────────────────────────
|
|
# User-Agent string sent to MusicBrainz. Must identify your application and
|
|
# provide a contact URL or email per their usage policy:
|
|
# https://musicbrainz.org/doc/MusicBrainz_API/Rate_Limiting
|
|
MUSICBRAINZ_USER_AGENT=ClickTrack/0.1 (https://your-instance-url)
|
|
|
|
# ── Ports (docker-compose.yml) ───────────────────────────────────────────────
|
|
# Host ports for the nginx reverse proxy.
|
|
HTTP_PORT=80
|
|
HTTPS_PORT=443
|