DL
Back to Blog
TechFebruary 1, 2026·5 min read

Building FhirHub: A Modern Healthcare Data Platform

An open-source FHIR R4 clinical data platform with SMART on FHIR auth, role-based access, and bulk export.

D

David Le

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 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*

Related Projects

Featured

FhirHub

A healthcare data management platform built on the HL7 FHIR R4 standard, providing a comprehensive web interface for managing patient clinical data including vitals, conditions, medications, lab orders, and bulk data exports with role-based access control and full audit logging.

Next.js 16
React 19
Typescript
Tailwind CSS 4
+8