Runnable example applications for different ways to use Health AI Stack.
Each example is a small standalone main package that can be run from the
repository root with go run.
Direct package composition with:
pkg/sqlitepkg/registrypkg/fhirpathpkg/searchpkg/core
Creates a local SQLite-backed stack, writes a couple of Patient resources,
runs a FHIR search, and prints the results.
go run ./examples/manual-sqliteRuntime-managed composition with:
pkg/runtimepkg/http
Builds a runtime, starts a managed HTTP server, creates a demo Patient,
queries the FHIR REST endpoints over HTTP, prints the responses, and shuts down.
go run ./examples/runtime-httpEdge/server deployment with:
pkg/runtimepkg/postgres- managed HTTP
- embedded search on Postgres
Uses TEST_POSTGRES_DSN when set, otherwise starts a disposable Postgres
container through testcontainers.
go run ./examples/edge-postgresCloud deployment shape with:
pkg/runtimepkg/postgres- external adapter seams for blob/search/warehouse
This demonstrates the cloud-postgres-plus-external-services runtime mode.
Like the edge example, it uses TEST_POSTGRES_DSN or a disposable Postgres
container.
go run ./examples/cloud-postgresOffline-first replication with:
- two local SQLite nodes
pkg/sync- an in-process example hub
Writes a resource on node A, pushes to the hub, pulls to node B, and verifies the resource is available on node B.
go run ./examples/sync-two-nodesGoverned AI access with:
pkg/authpkg/aipkg/corepkg/search
Builds a local stack, creates demo data, then executes AI read and search tools through an auth-backed policy adapter.
go run ./examples/ai-authz- The examples use temporary SQLite databases and clean them up automatically.
- The SQLite-only examples do not require Docker or Postgres.
- The Postgres deployment examples require either Docker or
TEST_POSTGRES_DSN. - The runtime example loads the local
modules/coremodule from this repository.