Alliomed
Practice management for doctors and psychologists, with AI in the medical record and paying clinics.
My role
Co-founder and lead engineer. 350+ of my PRs merged.
- 350+
- PRs merged
- 17
- ADRs
- RLS
- enforced per clinic in PostgreSQL
Problem
Health professionals juggle one tool for scheduling, another for billing, WhatsApp for patients and paper for prescriptions. On top of that they have to comply with LGPD (Brazil's GDPR) and their professional council's rules.
Solution
A multi-tenant SaaS on Next.js with Drizzle and PostgreSQL. Each clinic gets a subdomain, and isolation is enforced in the database with forced Row-Level Security. With consent, a visit can be recorded, transcribed and turned into a draft record in the format of the profession, which the professional reviews and signs.
Highlights
- Prescriptions and receipts signed with the professional's own ICP-Brasil certificate, publicly verifiable through a QR code.
- Mercado Pago payments (OAuth on the professional's account and checkout), health insurance with TUSS and SIGTAP tables, authorizations and reimbursement receipts.
- AI usage with a per-cycle allowance, a predictive gate that reserves balance, and extra usage capped by the clinic.
- Telehealth, a patient portal, a waitlist, pre-visit forms and LGPD consent whose revocation blocks reads in the APIs.
- CI that builds images on the PR and deploys only what changed, with staging validation done by agents.
Result
Live, with paying clinics.