David Le
Back to Blog
UncategorizedFebruary 5, 2026·5 min read

Building FhirHub: A Modern Healthcare Data Platform

Introducing FhirHub, an open-source clinical data platform built on FHIR R4 that unifies patient data into a single interface. This post kicks off a 19-part series covering the full stack from Docker to k3s deployment.

D

David Le

Building FhirHub: A Modern Healthcare Data Platform

By David Le

Healthcare data is fragmented. Patient records live across disconnected EHRs, labs send results via fax, and clinicians toggle between a dozen systems during a single encounter. The promise of interoperability has been around for decades, but the tooling to actually build standards-compliant healthcare applications remains inaccessible to most developers.

FhirHub is my answer to that problem. It's an open-source clinical data platform built on FHIR R4 that unifies patient demographics, vitals, labs, medications, and conditions into a single interface -- with proper authentication, role-based access, and bulk data export baked in from the start.

This post kicks off a 19-part series covering every layer of the system, from Docker infrastructure to single-machine k3s deployment.

Why I Built This

I wanted to prove that a single developer could build a production-grade healthcare application using modern open-source tools. No proprietary middleware. No vendor lock-in. Just FHIR, Docker, and widely-adopted frameworks.

The goals were:

  1. Standards-first: Every clinical data point flows through FHIR R4 resources
  2. Secure by default: SMART on FHIR authentication with fine-grained RBAC
  3. Developer-friendly: One docker-compose up to run the entire stack
  4. Real clinical logic: AHA blood pressure guidelines, lab reference ranges, clinical alerts

Tech Stack

Frontend

TechnologyVersionPurpose
Next.js16.1.5React framework with App Router
React19.2.3UI library
TypeScript^5Type safety
Tailwind CSS^4Utility-first CSS
DaisyUI^5.5.14Component library
Recharts^3.7.0Vitals charting
Keycloak-JS^26.0.0OIDC authentication
Zod^3.24.0Runtime validation
Vitest^4.0.18Testing framework

Backend

TechnologyVersionPurpose
.NET8.0API framework
Hl7.Fhir.R46.0.2FHIR client library
FluentValidation11.3.0Request validation
JWT Bearer8.0.23Token authentication
Serilog8.0.3Structured logging
Swashbuckle6.4.0OpenAPI/Swagger

Infrastructure

ServiceImagePurpose
HAPI FHIRhapiproject/hapi:latestFHIR R4 server
Keycloakkeycloak:26.0Identity provider
PostgreSQL (HAPI)postgres:18-alpineFHIR data store
PostgreSQL (Keycloak)postgres:18-alpineAuth data store
FhirHub APICustom .NET 8API gateway

Architecture Overview

FhirHub Full Stack Architecture

Feature Overview

FhirHub covers the full spectrum of a clinical data platform:

  • Patient Management -- Search, create, and view patient demographics with FHIR Patient resources
  • Vitals Tracking -- Record and chart blood pressure, heart rate, temperature, O2 saturation, respiratory rate, and weight with interactive Recharts visualizations
  • Clinical Reference Ranges -- AHA blood pressure guidelines, 21+ lab reference ranges with FHIR interpretation codes
  • Conditions & Medications -- View and create Condition and MedicationRequest resources
  • Lab Results -- Lab panels with reference range highlighting
  • Bulk Data Export -- 4-step wizard supporting NDJSON, JSON Bundle, and CSV formats with job lifecycle management
  • SMART on FHIR -- Keycloak OIDC with PKCE, launch context simulator, token inspector, scope visualizer
  • Role-Based Access -- 17 authorization policies across 6 roles (admin, practitioner, nurse, front_desk, patient)
  • Dashboard -- Metrics, recent patients, activity feed, alerts panel, system status
  • Admin Panel -- User management, audit logs
  • Clinical Alerts -- Automated alerts for abnormal values
  • Patient Timeline -- Chronological view of all clinical events

Series Roadmap

#PostTopic
1This postIntroduction and overview
2Architecture Deep DiveDocker Compose, data flow, auth flow
3Getting StartedSetup and first run
4SMART on FHIR AuthKeycloak OIDC + PKCE
5FHIR ResourcesPatient, Observation, Condition
6Vitals ChartingRecharts line charts
7Clinical RangesAHA guidelines, lab ranges
8Bulk ExportExport wizard and job lifecycle
9.NET API GatewayMiddleware pipeline
10Docker ComposeInfrastructure setup
11Next.js FrontendApp Router, components
12Keycloak ConfigRealm and role setup
13HAPI FHIR SetupFHIR server configuration
14Docker Multi-Stage BuildsDockerfiles, Compose strategy
15CI/CD with GitHub ActionsReusable workflows, pipelines
16Helm ChartsKubernetes packaging
17GitOps with ArgoCDMulti-environment deployment
18MonitoringPrometheus, Grafana, Loki
19Single-Node k3sk3s deployment on one machine

What's Next

In Part 2, we'll break down the Docker Compose architecture, trace a request from the browser through the API to HAPI FHIR, and examine how authentication flows through the system.


Find the source code on GitHub Connect on LinkedIn

Building FhirHub — Part 1 of 19

Related Projects

Featured

FhirHub

An open-source clinical data platform built on FHIR R4 that unifies patient demographics, vitals, labs, medications, and conditions into a single interface with SMART on FHIR authentication and role-based access.

Next.js
React
TypeScript
.NET 8
+9
Featured

InteropNimbus

A healthcare interoperability monitoring dashboard for Mirth Connect and HAPI FHIR. Provides real-time channel health, message tracing, and FHIR gateway visibility with enterprise SSO via Keycloak.

React 19
TypeScript
Vite 7
Tailwind CSS v4
+6