medOS ultra

Market Packs

Region-specific seed data, insurance rates, and locale config for each country deployment.

1 min read diagramsUpdated 2026-04-15docs-site/docs/deployment/market-packs.md

Each country deployment is configured via a market pack — a directory under infrastructure/market-packs/ containing region-specific seed data, insurance rate tables, and configuration. The application code itself is identical across regions.

Available packs

Layout

infrastructure/market-packs/
├── medos-japan/
│   ├── manifest.json
│   ├── seed-blood-donors.ts
│   ├── seed-hospital-facility.sql
│   ├── seed-ipd-wards.sql
│   ├── seed-kaigo-rates.sql
│   └── seed-pathology-japanese.sql
├── medos-philippines/
│   ├── manifest.json
│   ├── seed-blood-donors.ts
│   ├── seed-hospital-facility.sql
│   ├── seed-ipd-wards.sql
│   ├── seed-philhealth-rates.sql
│   └── seed-pathology-filipino.sql
├── medos-thailand/
│   └── manifest.json
└── bizbox-thailand/

What differs per region

  1. Seed data — patient names, addresses, facility names, insurance rates
  2. LocaleVITE_DEFAULT_LOCALE (ja, fil, th, en)
  3. TimezoneTZ env var on backend services
  4. Insurance/billing tableskaigo_* (JP), philhealth_* (PH), Thai tables

Deploying a new region

# 1. Provision infrastructure
./infrastructure/deploy.sh japan terraform apply

# 2. Configure env files
#    - infrastructure/.env.japan   (backend: DB, secrets)
#    - web/.env.japan              (frontend: API URL, locale)

# 3. Deploy frontend
./infrastructure/deploy.sh japan frontend

# 4. Run seeds
./infrastructure/deploy.sh japan seed

Switching a region’s seeds

Seed scripts are idempotent (ON CONFLICT DO NOTHING / WHERE NOT EXISTS) so you can safely run any market pack’s seeds against any Supabase instance.

cd infrastructure/market-packs/medos-japan
psql "$SUPABASE_DB_URL" -f seed-hospital-facility.sql
psql "$SUPABASE_DB_URL" -f seed-ipd-wards.sql
psql "$SUPABASE_DB_URL" -f seed-kaigo-rates.sql
psql "$SUPABASE_DB_URL" -f seed-pathology-japanese.sql

cd /path/to/web
cp .env.japan .env
npx tsx ../infrastructure/market-packs/medos-japan/seed-blood-donors.ts
Ask Anything