01
Challenge
Läkare is a Swedish telemedicine platform connecting patients with doctors for remote care — drop-in consultations, prescription renewals, medical certificates, and specialist referrals — rebuilt full-stack from a Spring Boot monolith onto Bun, Hono, oRPC, Drizzle, and PostgreSQL, with a from-scratch BankID implementation and an idempotent Webdoc EHR integration. The main delivery challenge was to give users sensitive health information presented calmly, clearly, and without adding cognitive load, while keeping Backend rewrite, BankID from scratch, and Webdoc EHR integration consistent across the complete journey. We framed the engagement around the smallest production-worthy flow first, then expanded the scope without weakening the underlying component and data model.
02
How we built it
We began with a domain and dependency audit of the existing Java backend, then defined bounded contexts and a ports-and-adapters composition root for the TypeScript rewrite. Migration proceeded flow by flow: typed oRPC contracts and PostgreSQL persistence first, then patient and clinician interfaces, followed by the high-risk integrations. BankID was implemented with mutual TLS, encrypted transaction state, and same-device/cross-device QR flows. Webdoc writes were made resumable and idempotent, while the queue, chat, and shared clinical signing rules were hardened across web and React Native clients.
03
Delivery
The featured phase replaced the backend bottleneck with a modular TypeScript system and brought authentication, clinical records, realtime care delivery, and EHR synchronisation under one coherent architecture. Doctors receive the same validation rules across platforms, interrupted external workflows can resume safely, and new self-triage checks can be added through configuration instead of another bespoke feature cycle.