12 Commits

Author SHA1 Message Date
Rodrigo Verdiani
2eead05c34 feat: expirar jobs stuck com status timeout
Adiciona mecanismo de expiração periódica para jobs que ficam presos
nos status received ou processing além de um threshold configurável.

- models: novo status StatusTimeout
- store: migration v2 com índice em jobs(status); método ExpireStuck
  que faz UPDATE atômico para os status alvo anteriores ao threshold
- expirer: novo pacote com goroutine periódica que chama ExpireStuck
  e loga WARN quando algum job é expirado
- config: campos JobTimeoutMinutes (default 120) e
  ExpirerIntervalMinutes (default 10), lidos via env vars
  JOB_TIMEOUT_MINUTES e EXPIRER_INTERVAL_MINUTES
- main: instancia e inicia o Expirer no startup
- dashboard: card Timeout com contagem; badge neutral na tabela de jobs
2026-07-07 08:43:33 -03:00
Rodrigo Verdiani
2fd56d0f36 fix(webhook): rename route from /webhook/lidarr to /webhook
Simplify the webhook endpoint path to match the URL documented
in the Lidarr integration guide.

Also add a Lidarr integration section to README covering Coda
environment variables, Lidarr webhook configuration, and the
full end-to-end flow.
2026-07-06 22:50:30 -03:00
Rodrigo Verdiani
b7e6b288cd feat: implement BP-10 ntfy notifications 2026-07-06 22:07:43 -03:00
Rodrigo Verdiani
63919dd6c3 feat: implement BP-09 web interface 2026-07-06 21:51:12 -03:00
Rodrigo Verdiani
213f16bdbf feat: implement BP-08 library scan and convert 2026-07-06 21:27:06 -03:00
Rodrigo Verdiani
0915c689fe feat: implement BP-07 webhook trigger 2026-07-06 21:18:02 -03:00
Rodrigo Verdiani
27abb91ff3 feat: implement BP-06 lidarr integration 2026-07-06 21:10:12 -03:00
Rodrigo Verdiani
6cf1058107 feat: implement BP-05 job pipeline 2026-07-06 21:04:30 -03:00
Rodrigo Verdiani
a856850451 feat: implement BP-03 runtime configuration 2026-07-06 20:41:20 -03:00
Rodrigo Verdiani
2dbb0b54a0 feat: implement BP-02 structured logging to SQLite 2026-07-06 20:34:42 -03:00
Rodrigo Verdiani
6ffa161d5f feat: implement BP-01 persistence and models
Add SQLite persistence layer with domain types for jobs, logs, and config.
- internal/models: Job, LogEntry, JobStatus, JobSource types
- internal/store: Store with WAL pragmas, idempotent migrations
- JobRepository, LogRepository, ConfigRepository with full CRUD
- Wire store.New into main.go server startup
- 15 passing tests covering all repositories
2026-07-06 20:27:48 -03:00
Rodrigo Verdiani
e1a262fec0 feat: scaffold Coda transcoder with docs, dev tooling and web base
Add the initial foundation for Coda, a Go/Docker service that converts
FLAC albums to MP3 320 kbps CBR, triggered by Lidarr webhooks or manually
from the web UI.

- docs: requirements and architecture (SQLite persistence, media volume,
  work window, manual FLAC search, env + web config)
- config: .env loader with env precedence
- web: embed/dev asset split, chi server, index template (DaisyUI + htmx)
- build: Makefile (setup/css/run/build/test/lint), Dockerfile (Tailwind
  standalone CLI + DaisyUI, no Node), .env.example, ignore rules
- docs: AGENTS.md and README for the project
2026-07-06 20:06:25 -03:00