8 Commits

Author SHA1 Message Date
Jose Selesan
7ed4d27844 feat(auth): add passkey sign-in and management
Sign in with Face ID, Touch ID, Windows Hello or a security key, keeping
email + password as the primary method.

- API: BetterAuth passkey plugin deriving rpID/origin from WEB_APP_URL
  (the browser origin), with residentKey "required" because sign-in is
  username-less. New Passkey model mapped to the passkeys table.
- Web: conditional UI in the email field plus an explicit "Entrar con
  passkey" button; cancelled ceremonies are ignored.
- Settings: create, rename and delete passkeys with TanStack Query.
- Pin @better-auth/passkey to 1.7.7: its peers lock better-call, so
  newer versions break the API.
2026-10-29 11:37:38 -03:00
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
2117188bf9 feat(auth): recover a password with a code sent by email
Enable BetterAuth's emailOTP plugin for password resets: a 6-digit code,
valid for 10 minutes with 3 attempts, stored hashed in `verifications`
(no migration). The code goes out through the existing Resend mailer with
a new Spanish template, and other sessions are revoked after the reset.

The web app gets a two-step /forgot-password route (request the code,
then set the new password) linked from sign-in. Unknown emails get the
same responses as known ones so the form doesn't reveal accounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 10:13:15 -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
6aa86a3b68 feat: add collaborative shopping lists with items and invitations
Some checks failed
CI / Verify (push) Has been cancelled
API: lists, items and invitations modules (list, create, get, update,
set-primary, items create/list, invitation create/accept/list-pending),
BetterAuth session helper, list membership, mailer and Prisma schema plus
migrations.

Web: lists overview, list detail (items) and list management (settings)
views, item and invitation forms/hooks, sign-up and invitation accept pages.

Shared: shopping list DTOs.

Tooling: ignore the generated TanStack Router cache (apps/web/.tanstack).
2026-10-16 10:12:11 -03:00
Jose Selesan
964a3c7217 docs: refresh agents.md to match the current scaffold 2026-10-15 16:08:14 -03:00
Jose Selesan
a95d14688a chore: move api dev port to 4100 and web dev port to 7153 2026-10-15 15:39:17 -03:00
Jose Selesan
2b1d2152c4 chore: scaffold turbo monorepo with hono api and react admin web 2026-10-15 15:24:34 -03:00