Environment Setup
This page describes how to configure a full local development environment for all Med-SEAL Suite services.
Prerequisites
Tool |
Minimum Version |
Notes |
|---|---|---|
Docker Desktop |
4.25 |
Enable Docker Compose v2 |
Node.js |
18 LTS |
Use |
npm |
9 |
Bundled with Node 18 |
Git |
2.40 |
Any modern version |
Python |
3.10 |
For docs only |
Xcode |
15 (macOS) |
iOS simulator for mobile dev |
Android Studio |
Latest |
Android emulator for mobile dev |
Repository Clone
git clone https://github.com/IgoyAI/Med-SEAL-Suite.git
cd Med-SEAL-Suite
Docker Compose Stack
Start the full backend:
docker compose up -d
This starts all infrastructure services. Wait for all containers to show healthy:
docker compose ps
Expected healthy services after first boot (5-10 minutes):
medseal-openemrmedseal-openemr-dbmedseal-medplum-servermedseal-medplum-appmedseal-medplum-dbmedseal-medplum-redismedseal-ai-servicemedseal-ai-frontendmedseal-sso-db
AI Service (Local Development)
For hot-reload development of the AI backend:
cd apps/ai-service
npm install
npm run dev
The service starts on port 4003. Environment variables are loaded from .env in the project root. Copy the example:
cp .env.example .env
Key variables to configure:
LLM_API_URL=https://your-llm-endpoint/v1/chat/completions
LLM_MODEL=med-r1
MEDPLUM_BASE_URL=http://localhost:8103
MEDPLUM_CLIENT_ID=your-client-id
MEDPLUM_CLIENT_SECRET=your-client-secret
SSO_DB_URL=postgres://sso:sso_secret@localhost:5434/medseal_sso
Patient Portal Native (Mobile Dev)
cd apps/patient-portal-native
npm install
Run on iOS simulator:
npx expo run:ios
Run on Android emulator:
npx expo run:android
Start the CORS proxy for local API calls:
node cors-proxy.js
The proxy forwards requests from the mobile app to avoid browser CORS restrictions in the development Expo environment.
AI Frontend (Admin Dashboard)
cd apps/ai-frontend
npm install
npm run dev
Dashboard is available at http://localhost:3001.
Seeding Data
After the stack is healthy, load sample data:
# Load Synthea-generated patients into Medplum FHIR store
node scripts/load-synthea.js
# Seed a single patient with full clinical data
node scripts/seed-medplum-patient.js
# Sync Medplum patients to OpenEMR
node scripts/sync-medplum-openemr.js
See Scripts Reference for all available utility scripts.
Connecting to Services
Service |
Internal URL (Docker) |
External URL (Dev) |
|---|---|---|
Medplum FHIR API |
|
|
Medplum Admin App |
– |
|
OpenEMR |
|
|
AI Service |
|
|
SSO DB |
|
|
Rebuilding Custom Images
After making changes to ai-service or ai-frontend Dockerfiles:
docker compose up -d --build ai-service ai-frontend