Age Medical =========== Freelance · 2026 · Team From booked appointment to issued invoice. A connected clinic platform — patient portal plus doctor and admin apps for scheduling, invoicing, reports and chat — built with a team of six. I built the scheduling API client, the paid booking → invoice bridge with an idempotent per-booking ledger, the session, role and ownership guard layer in front of the API, unified notifications, and doctor–patient chat with read receipts and attachments. How it works ------------ Booking → invoice: booking (scheduling platform) → [signed webhook | reconcile poll (missed-webhook fallback)] → appointment upsert (Postgres) → [notify patient + doctor | mark paid] → invoice ledger (pending → created / failed) → invoice + PDF Care-team chat: doctor / patient → route guard (session · role · ownership) → participant check → message store (cursor paging) → unread counts (one SQL aggregate) Outcomes -------- - 78 / 83 API routes behind one guard - N+1 → 1 query for unread counts Stack: Next.js 16, TypeScript, Neon Postgres, Drizzle, better-auth, TanStack Query https://godnik.in/projects/age-medical