Case study · Reactive SpA
Chronus.cl
A SaaS for healthcare professionals that brings scheduling, reminders, payments, tax receipts and an AI assistant into one application.
- Role
- Founder and full stack developer
- Stack
- Next.js 16, React 19, Convex, NestJS, Clerk, Cloudflare R2
- Site
- chronus.cl
- ~70Convex tables across 12 domain modules
- 25AI agent tools
- 117Vitest test files
- 7external integrations
The problem
An independent healthcare professional often keeps their schedule in Google Calendar, confirms appointments over WhatsApp, tracks payments in a spreadsheet and issues every tax receipt by hand on the Chilean tax authority's (SII) portal. Chronus brings those tasks together and automates the repetitive ones.
Architecture
- Reactive queries
- Mutations and actions
- Cron and scheduler
- Issuing queues
- AI agent
- ClerkAuthentication · webhook
- Google CalendarOAuth · Calendar API v3
- WhatsAppMeta's official API · webhook
- ResendTransactional email
- Cloudflare R2Files · signed URLs
- OpenAIVercel AI SDK · 25 tools
- NestJS → SIIPlaywright · tax receipts
Technical decisions
Convex as the backend
Database, server functions and real-time updates in one place: the schedule updates on every device without reloading. The schema is split into 12 domain modules (scheduling, billing, WhatsApp, patients and others) with about 70 tables.
Receipts in a separate service
Tax receipts are issued by a NestJS service that operates the SII portal with Playwright. Convex calls it from work queues, so issuing never blocks the interface and is retried if the portal fails.
Google Calendar sync
OAuth connection with encrypted tokens. Changes made in Chronus are pushed to Google, and Google events are imported on demand.
AI agent with defined tools
The assistant uses Convex's agent component and the Vercel AI SDK. It works with 25 tools, 16 in the app and 9 on WhatsApp, to search patients, check the schedule, view the financial summary, list receipts and propose actions.
WhatsApp and email
Meta's official WhatsApp API with templates, an inbox and scheduled payment reminders. Transactional email goes through Resend, with attachments from Cloudflare R2.
Quality and deployment
- 117 test files with Vitest and convex-test.
- The NestJS service deploys with GitHub Actions on a self-hosted runner and runs under PM2. It also has a Docker image based on Playwright's.
- Ongoing migration to TanStack Start, keeping the same Convex backend.




