sonda/sonda.example.toml
tgiachi 3a739dc3ae feat: add sondad server with config, storage, auth and listening API
- feat(config): TOML config with env overrides, strict parsing and validation
- feat(storage): SQLite (modernc) and PostgreSQL (pgx) backends through bun,
  embedded per-driver SQL migrations with a transactional runner
- feat(schema): catalog tables (artists, albums, tracks, audio_files with
  per-root paths), users and listening events with idempotency keys
- feat(auth): Argon2id password hashing, HS256 JWT tokens, first-user-only
  registration and login
- feat(api): gin REST API under /api/v1 (health, register, login, listens)
  with a consistent error envelope, body limit and request logging
- feat(sondad): zap logger, graceful shutdown, composition root in main
- chore: example config, .gitignore for secrets, DB files, IDE and agent files
2026-11-11 12:06:15 +01:00

25 lines
800 B
TOML

# Copy to sonda.toml and adjust. sonda.toml is git-ignored.
# Precedence: defaults < this file < environment variables
# (SONDA_ENV, SONDA_LISTEN, SONDA_DB_DRIVER, SONDA_DB_PATH, SONDA_DB_DSN,
# SONDA_JWT_SECRET, SONDA_LASTFM_API_KEY).
[server]
listen = "127.0.0.1:8080" # localhost by default
[library]
roots = ["/path/to/music"] # read-only, at least one required
[database]
driver = "sqlite" # "sqlite" or "postgres"
path = "sonda.db" # sqlite only
dsn = "" # postgres only, e.g. "postgres://user:pass@localhost:5432/sonda?sslmode=disable"
[log]
env = "production" # "dev" or "production"
[auth]
jwt_secret = "" # required, 32+ chars: openssl rand -hex 32
token_ttl_hours = 168 # one week
[providers.lastfm]
api_key = ""