My own SaaS · paying customers since 2025
Milix
Clinic management software: scheduling, patient records, finance and invoicing, with an AI agent that answers patients on WhatsApp. It's my own product. I write the code, sell it and run support, and clinics pay for it.
- Role
- Founder and sole developer
- Stack
- Next.js, TypeScript, Convex, Asaas, WhatsApp Cloud API, OpenAI, Vercel AI SDK, Vitest, Playwright.


Context
Milix covers the patient's whole journey, from the first WhatsApp message to the day's cash close. Each clinic is an isolated tenant and can have several branches. The first version, Smilix, ran on Supabase, Stripe and Docker on a VPS. I rebuilt it on an architecture that is easier to test and to grow.
Decisions
- A clinic must never see another clinic's data, not even by mistake.
- Every table carries the clinic, and every public call goes through a single entry point1 that checks identity, permission and plan, in that order.1 A single door every call goes through. With one door, the checks can't be forgotten in some corner.
- When code grows fast, sooner or later someone takes a shortcut.
- A structural test2 fails the build if a public call shows up outside that entry point.2 A test that looks at the shape of the code, not the result: it fails if someone opens a path outside the rule.
- Plans, add-ons and trials have to bill on their own.
- Recurring billing on Asaas, with monthly and yearly plans, add-ons, trials and webhooks3.3 Messages one system sends another on its own when something happens, like a confirmed payment.
- Patients send voice notes and spell procedures their own way.
- An agent on Meta's official Cloud API, with audio transcription, semantic search over embeddings4 and my own LLM gateway5.4 Text turned into numbers that keep its meaning, so the system finds a procedure even when it's spelled another way.5 A layer of mine between the system and the AI models: I can switch providers and control cost without touching the rest.
- Moving fast alone without breaking what's already live.
- Vitest and Playwright tests across the product, and every architecture decision written down as an ADR6.6 A short document recording an architecture decision: what was chosen, why, and what was left out.
Results
- Paying clinics using it every day.
- The full product cycle: building, selling, onboarding with patient data import, and support.