7 Commits

Author SHA1 Message Date
Jose Selesan
6830c827d7 feat(voice): split dictations with Groq when it is configured
Gemma through the Gemini API answered 500 or timed out on most calls, so
dictated lists fell back to splitting on commas and "y" ("Azúcar leche y
café" became two items). With GROQ_API_KEY set the API now asks Groq
(openai/gpt-oss-120b by default), which answers in about a second; Gemini
stays as the provider when only its key is set.

The HTTP call, its deadline and the single retry on 5xx move to
lib/text-generator.ts and are shared by both clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 11:04:13 -03:00
Jose Selesan
a814b34036 feat(items): voice dictation with Gemma 4 and a reworked list UI
Dictation: a mic button in the add field uses the Web Speech API (es-AR) and
shows the partial transcript in the input. POST /api/voice/split asks Gemma 4
(Gemini API, plain fetch) to split the sentence into one string per item,
written the way the existing parser reads typed text; each string then goes
through the usual add flow. The endpoint never fails because of the model:
missing key, timeout, 429 or invalid JSON fall back to splitting on commas,
semicolons, " y " and " e ". A toast offers "Deshacer" for the whole dictation;
if the request fails, the transcript is added as a single item.

UI: "+" instead of the search icon, quantity tags ("2 L", "×12", "1 kg"), the
list name with a list switcher and the pending/bought count in the header,
"Comprados (N)" folded by default, and a bottom sheet to edit name, quantity
(− / + and unit), note and delete. PATCH items now accepts a name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 19:25:10 -03:00
Jose Selesan
56853bbdeb fix(deploy): let the API reach Dokploy's database again
Since 815dcc3 the api service only joined the stack-private `internal`
network, so it could no longer resolve the database host on
`dokploy-network` and `prisma migrate deploy` failed with P1001.

api joins `dokploy-network` again, only to reach the database. nginx
still proxies to the `superlist-api` alias, which is declared only on
`internal`, so the shared network never routes our traffic elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:08:19 -03:00
Jose Selesan
815dcc300d fix(deploy): isolate web→api traffic on a private network
nginx proxied to `api:4100` over the shared `dokploy-network`, where the
generic name `api` resolved to more than one container (a stale one from a
previous deploy, or another project's service). nginx pinned those IPs at
startup and round-robined across them, so requests hit a refused upstream
and could reach a foreign container.

- api now lives only on a stack-private `internal` network, aliased as
  `superlist-api`; only web joins `dokploy-network` for Traefik.
- nginx proxies via a variable with Docker's resolver (127.0.0.11,
  valid=10s), so API redeploys never leave it on a stale IP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:05:20 -03:00
Jose Selesan
e0003490b3 Updated healthcheck 2026-10-19 09:32:13 -03:00
Jose Selesan
9e16dc1c81 Remove healthcheck 2026-10-19 09:30:28 -03:00
Jose Selesan
f87d46c975 chore: deploy with Docker Compose on Dokploy
Add the two runtime images and their compose file: `api` (Bun bundle,
runs `prisma migrate deploy` before `bun run start`) and `web` (Vite
build served by nginx, which proxies `/api/*` to the API and keeps the
SSE streams unbuffered with a long read timeout). The database is
external and both services join the `dokploy-network` for Traefik.

Remove the GitHub Actions workflow: there is no hosted CI, so the
verification scripts run locally.
2026-10-16 15:44:26 -03:00