- Teacher picks a day of the month in Settings; an hourly job creates the
fees of all monthly groups on that day in the teacher's time zone
(one run per teacher and month, partial unique index per attendee/period).
- One Mercado Pago link per payer (PaymentCheckout): the adult in charge
bundles their kids and their own fees; external_reference chk_<id>,
dedicated webhook and reconciliation mark every fee PAID at once.
- Person.payWithMercadoPago toggle (default on): off creates the fee
without a link so the student pays by transfer.
- A fee paid some other way supersedes its combined link and expires the
preference; renewing rebuilds the combined link or a single one.
- Optional WhatsApp delivery (PAYMENT_LINK kind, new Kapso template);
weekly reminders now go once per combined link.
- Web: auto charge settings card, per-student toggle, combined link label
in Cobros and "Pay all" in the student app, in the four locales.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add the `kidsGroups` plan feature (Pro) and `Group.audience` (ADULTS | KIDS);
creating or switching a group to KIDS requires the feature, existing KIDS
groups keep working after a downgrade.
- Model the adult in charge as a Person linked through `person_guardians`;
migrate the old guardian_name/guardian_phone columns and drop them.
- Kids quick add: kid + guardian form, guardian lookup by phone to pick an
existing kid or add a sibling; backend rejects KIDS adds without guardian.
- Attendee page: "Adulto a cargo" section with siblings, editable via
PATCH /groups/:gid/attendees/:aid/guardian.
- Contact phone (WhatsApp jobs, attention, student access invite, students at
risk, attendee actions) prefers the guardian's phone.
- Edit group screen (PATCH /groups/:gid, owner only); switching back to ADULTS
is blocked while kids have no phone of their own.
- Hide bulk import in KIDS groups until it carries guardian data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Nuevo modelo `Person` (`people`): contacto y notas por profe, con
teléfono único (índice parcial `people_owner_phone_key`). `Attendee`
pasa a ser la membresía (`group_id` + `person_id`, único por grupo).
- La cuenta de la app de alumnos se vincula a la persona
(`student_account_people`): una sola cuenta ve todos sus grupos.
- Migración unifica attendees del mismo profe y teléfono, y fusiona sus
cuentas de alumno (conserva la usada más recientemente).
- `POST /groups/:gid/attendees/:aid/add-to-group` y
`GET /people/lookup` para detectar personas existentes al cargar;
el alta responde `409 person_exists` y acepta `personId`. Bulk, lista
de espera y preinscripciones vinculan solas.
- El límite del plan cuenta personas con al menos un grupo activo.
- Web: "Agregar a otro grupo", sección "También está en" en la ficha y
aviso "Ya tenés a esta persona" en el alta individual.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Estadísticas ("Alumnos en riesgo") y el job de reenganche usan la misma
regla de dominio que la lista de grupos e Inicio
(summarizeMemberAttendance). El armado del historial por alumno vive en
analytics/lib/member-attendance.ts y se borra el clasificador viejo
(racha o asistencia mensual < 50%).
- El badge de alumnos en riesgo muestra el motivo real (faltas seguidas,
días sin venir o asistencia en baja).
- GET /home devuelve pendingPreRegistrations por grupo (en la misma
consulta de grupos) y "Para atender" las lista con link a la ficha en
la pestaña Pendientes (?section=pending).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Puerto MessagingProvider con adaptadores OpenWA (MVP, QR) y Kapso
(setup link de Meta + templates), elegido con WHATSAPP_PROVIDER.
- Vinculación del WhatsApp del profesor en el onboarding y en Ajustes.
- Job semanal (lunes 10:00 AR): recordatorio de pago y reenganche a
alumnos en riesgo (cooldown 14 días), con switches por grupo.
- Idempotencia por (kind, attendee, semana ISO), webhooks firmados con
HMAC y deduplicados, normalización de teléfonos a E.164.
- Servicio openwa en docker-compose y guía en docs/whatsapp.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>