Skip to content
Case study · 04 / 09← All work

HPC

Four products for Hospital Privado de Comunidad in Mar del Plata, on web and mobile, sharing one design system.

Role
Architecture and full build
Stack
Next.js 16, Expo / React Native, TypeScript, TanStack Query, Turborepo, Go
Ecosystem index
Ecosystem indexOne token package for web and native
(01) The problem

The hospital had a design for four products: a patient app, a doctor's office, a front desk and a management panel. That meant 60 screens across desktop web and mobile. The design's palette also failed WCAG 2.1 AA, which the proposal had promised.

My roleI turned the design into five working apps and one shared foundation for web and native.
(02) ResultsCounted in the code
61screens checked pixel by pixel against a baseline
53color pairs passing WCAG 2.1 AA, checked in CI
10shared packages across five apps
(03) Architecture

Three decisions that shaped it.

  1. 01

    One token package for web and native

    Why. Color, type, spacing and icons live in TypeScript in @hpc/tokens. The web primitives and the React Native primitives both read them. The patient app looks like the desktop apps without copying values.

    Trade-off. Only tokens and logic are shared, not components. There are two primitive libraries to keep in step: CSS Modules on web and React Native on mobile.

  2. 02

    The API contract is generated, not written

    Why. The Go API publishes OpenAPI 3.1 from its own types. A package turns that into the TypeScript types the API client imports. A satisfies check breaks the build when the backend adds an enum value nobody mapped.

    Trade-off. There is a generation step, and the backend owns the shape of the data. A golden test catches a stale contract, but only when it runs.

  3. 03

    Realtime says what changed, not the new state

    Why. Each app opens one WebSocket and subscribes to topics like an agenda or a waiting room. An event only invalidates the cache, and the screen refetches through the normal path. A booking in the patient app shows up at the front desk by itself.

    Trade-off. Every event costs one extra request. Bursts would trigger several server renders in Next.js, so the channel can batch events.

(04) GalleryKeep scrolling →
Ecosystem index
Ecosystem index · The entry point to the four products, built on the shared tokens.
Mi HPC, patient app
Mi HPC, patient app · One Expo codebase for iOS, Android and web. On the device, data loads with TanStack Query.
Front desk agenda
Front desk agenda · The day's appointments, with check-in, coverage status and the waiting room.
Management summary
Management summary · Key indicators, bed occupancy and alerts. Alerts come from thresholds, not fixed text.
(05) What I'd do next
01Add real sign-in with Keycloak over OIDC and PKCE, so each role sees only its own data.
02Wire the 17 patient screens that still read literals, like the image viewer and video visits.
03Run the pixel comparison and the database integration tests in CI. Today they only run locally.
Next project · 05 / 09
Posta →Delivery network: landing, admin and live maps
Case study · 04 / 09

HPC

Four products for Hospital Privado de Comunidad in Mar del Plata, on web and mobile, sharing one design system.

Role
Architecture and full build
Stack
Next.js 16, Expo / React Native, TypeScript, TanStack Query, Turborepo, Go
HPC
(01) The problem

The hospital had a design for four products: a patient app, a doctor's office, a front desk and a management panel. That meant 60 screens across desktop web and mobile. The design's palette also failed WCAG 2.1 AA, which the proposal had promised.

My roleI turned the design into five working apps and one shared foundation for web and native.
(02) Results
61screens checked pixel by pixel against a baseline
53color pairs passing WCAG 2.1 AA, checked in CI
10shared packages across five apps
(03) Architecture

Three decisions that shaped it.

01

One token package for web and native

Why. Color, type, spacing and icons live in TypeScript in @hpc/tokens. The web primitives and the React Native primitives both read them. The patient app looks like the desktop apps without copying values.

Trade-off. Only tokens and logic are shared, not components. There are two primitive libraries to keep in step: CSS Modules on web and React Native on mobile.

02

The API contract is generated, not written

Why. The Go API publishes OpenAPI 3.1 from its own types. A package turns that into the TypeScript types the API client imports. A satisfies check breaks the build when the backend adds an enum value nobody mapped.

Trade-off. There is a generation step, and the backend owns the shape of the data. A golden test catches a stale contract, but only when it runs.

03

Realtime says what changed, not the new state

Why. Each app opens one WebSocket and subscribes to topics like an agenda or a waiting room. An event only invalidates the cache, and the screen refetches through the normal path. A booking in the patient app shows up at the front desk by itself.

Trade-off. Every event costs one extra request. Bursts would trigger several server renders in Next.js, so the channel can batch events.

(04) Gallery
Ecosystem index
Ecosystem index · The entry point to the four products, built on the shared tokens.
Mi HPC, patient app
Mi HPC, patient app · One Expo codebase for iOS, Android and web. On the device, data loads with TanStack Query.
Front desk agenda
Front desk agenda · The day's appointments, with check-in, coverage status and the waiting room.
Management summary
Management summary · Key indicators, bed occupancy and alerts. Alerts come from thresholds, not fixed text.
(05) What I'd do next
01Add real sign-in with Keycloak over OIDC and PKCE, so each role sees only its own data.
02Wire the 17 patient screens that still read literals, like the image viewer and video visits.
03Run the pixel comparison and the database integration tests in CI. Today they only run locally.
Next projectPosta →
Nahuel SantillánEN