Skip to content

Development Guide

  • crates/octofhir-core: core types (ResourceEnvelope/meta, FhirVersion/DateTime, errors)
  • crates/octofhir-storage: the FhirStorage trait
  • crates/octofhir-db-postgres: PostgreSQL storage, query filters, transactions
  • crates/octofhir-search: query parsing/validation, engine
  • crates/octofhir-api: OperationOutcome, CapabilityStatement, Bundle helpers
  • crates/octofhir-server: HTTP server (Axum), routes, middleware, config, observability
  • crates/octofhir-auth: OAuth 2.0 / SMART on FHIR authentication
  • crates/octofhir-auth-postgres: PostgreSQL storage for auth entities
  • crates/octofhir-config: configuration management with hot reload
  • crates/octofhir-graphql: GraphQL API
  • crates/octofhir-notifications: notification service and providers
  • crates/octofhir-cql-service: CQL evaluation
  • crates/octofhir-notebook: .fhirnb notebook model and converters
  • crates/octofhir-cli: CLI tool for interacting with FHIR servers
Terminal window
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install just (command runner)
brew install just
Terminal window
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install build dependencies
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
libssl-dev
# Install just (command runner)
cargo install just
Terminal window
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install build dependencies
sudo dnf install -y \
gcc \
gcc-c++ \
pkg-config \
openssl-devel
# Install just (command runner)
cargo install just
Terminal window
just build # cargo build
just test # cargo test --all --all-features
just lint # cargo clippy --all-targets --all-features -- -D warnings
just fmt # cargo fmt --all
just dev # cargo watch -x run (auto-reload on changes)
Terminal window
# Start dependencies (PostgreSQL, Redis)
docker compose up -d
# Build and run
cargo run
Terminal window
# Build release binary (takes 5-10 minutes)
cargo build --release
# Run release binary
./target/release/octofhir-server
Terminal window
# Build Docker image
docker build -t octofhir-server .
# Run container
docker run -p 8888:8888 octofhir-server
  • Unit tests inside crates
  • Integration tests in crates/octofhir-server/tests cover HTTP flows
  • Keep PRs small and focused; follow Conventional Commits
  • Fix all clippy warnings; run just lint