Skip to content

Getting Started

Shinren Pan edited this page Jun 12, 2026 · 1 revision

Getting Started

Prerequisites

That's it. No Swift, no PostgreSQL, no additional tools required.

One-Command Setup

git clone https://github.com/shinrenpan/Siming.git
cd Siming
bash scripts/setup.sh

The setup script will:

  1. Check Docker is installed and running
  2. Download FHIR packages (one-time, ~50 MB)
  3. Create .env from .env.example
  4. Build the Docker image and start the full stack
  5. Wait until the server is ready

When complete:

Siming is running at http://localhost:8080
  CapabilityStatement: http://localhost:8080/metadata
  Metrics:             http://localhost:8080/metrics

Verify

curl http://localhost:8080/health
# → OK

curl http://localhost:8080/metadata | python3 -m json.tool | grep '"status"'
# → "status": "active"

Open the FHIR Browser: http://localhost:8080/ui

Manage

# Stop
docker compose down

# Start again (no rebuild)
docker compose up -d

# View logs
docker compose logs -f app

# Rebuild after git pull
docker compose up --build -d

macOS (native, for development)

Faster builds and no VM overhead. Requires Swift 6.2+ and Docker (for Postgres only).

bash scripts/fetch-packages.sh   # one-time
bash scripts/run-macOS.sh        # starts Postgres in Docker, server natively

Enable TW Core Profile Validation

Optionally run the HL7 FHIR Validator sidecar for deep StructureDefinition validation:

  1. Uncomment the validator block in docker-compose.yml
  2. Add VALIDATOR_URL=http://validator:4567 to your .env
  3. Restart: docker compose up -d
# Test
curl -X POST "http://localhost:8080/Patient/\$validate?profile=https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore" \
  -H "Content-Type: application/fhir+json" \
  -d '{"resourceType":"Patient","identifier":[{"value":"A123"}],"gender":"male","birthDate":"1990-01-01"}'

Next Steps

Clone this wiki locally