Skip to content

Repository files navigation

Harbor

  • a healthcare clinical event platform
  • in English: code that lets hospital computers talk to each other so they can get patient data
  • named after the seventh track on Clairo's 2021 album Sling

Tech stack

  • Java to write the backend services
    • Patient Service knows about patients
    • Device Service knows about medical devices
    • Observation Service knows about blood pressure, heart rate, temperature, etc.
    • Notification Service sends alerts
  • Spring Boot to make those Java services easy to build
  • Apache Kafka to let those services talk to each other
  • PostgreSQL to permanently remember healthcare data, which is important
  • Redis to temporarily remember things that are needed often, so the programs respond faster
  • Docker to pakcage each service so it runs the same everywhere
  • Kubernetes to keep all those Docker containers running together
  • GitHub Actions to automatically test and deploy new code

Harbor (Healthcare Clinical Event Platform) | Java, Spring Boot, Apache Kafka, PostgreSQL, Redis, Docker, Kubernetes, GitHub Actions • Designed an event-driven platform using Apache Kafka to exchange HL7 FHIR resources between patient, device, and clinical services • Engineered idempotent consumers with retry and dead-letter handling to preserve consistency during downstream service interruptions • Modeled normalized PostgreSQL schemas and REST APIs balancing efficient clinical event retrieval with healthcare data integrity • Automated Kubernetes deployments with Docker and GitHub Actions while securing services using OAuth2, JWT, and audit logging

Mental model

Java
  ↓
Spring Boot
  ↓
Backend Services
  ↓
        Kafka
      ↙   ↓   ↘
Patient  Device  Notification
   │        │         │
   └────────┴─────────┘
          │
     PostgreSQL
          ▲
        Redis

Docker packages everything
Kubernetes runs everything
GitHub Actions ships everything

Getting started

Requires JDK 21, Maven, and Docker.

mvn -q verify          # build every module, run the full test suite
                        # (Testcontainers spins up real Postgres instances
                        # for the repository tests - Docker must be running)

docker compose up --build   # Postgres, Redis, Kafka, and all four services

Once the stack is up:

  • patient-servicelocalhost:8081
  • device-servicelocalhost:8082
  • observation-servicelocalhost:8083
  • notification-servicelocalhost:8084

Every endpoint except /actuator/health/** requires a bearer JWT (see common/security/ResourceServerConfig). docker-compose.yml doesn't run an identity provider, so authenticated requests need OAUTH_JWK_SET_URI pointed at a real one (Keycloak, Auth0, etc.); each service's own *ControllerSecurityTest exercises the authorization rules without needing one running.

k8s/ has the same topology as Kubernetes manifests (kubectl apply -k k8s/ after supplying k8s/config/secrets.yaml - see secrets.example.yaml).

About

Harbor is an event-driven platform using Spring Boot and Apache Kafka for exchanging HL7 FHIR messages between healthcare services.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages