Skip to main content

Configuration

The Admin Portal reads its configuration from environment variables at build time.

File: packages/chartchat-admin/src/config.ts

Environment Variables​

Create a .env file at packages/chartchat-admin/.env:

MEDPLUM_BASE_URL=http://localhost:8103/
MEDPLUM_CLIENT_ID=your-medplum-client-id
MEDPLUM_CALLBACK_URL=http://localhost:3000/smart/medplum/callback
GOOGLE_CLIENT_ID=your-google-client-id
RECAPTCHA_SITE_KEY=your-recaptcha-site-key
MEDPLUM_REGISTER_ENABLED=true
MEDPLUM_AWS_TEXTRACT_ENABLED=false

Variable Reference​

VariableRequiredDescription
MEDPLUM_BASE_URLYesURL of the ChartChat server API. Use http://localhost:8103/ for local dev.
MEDPLUM_CLIENT_IDYesThe Medplum ClientApplication ID used for OAuth. Found in the FHIR browser under ClientApplication.
MEDPLUM_CALLBACK_URLNoOAuth callback URL after SMART auth.
GOOGLE_CLIENT_IDNoGoogle OAuth client ID. Required if Google Sign-In is enabled.
RECAPTCHA_SITE_KEYNoGoogle reCAPTCHA site key. Required for forms with bot protection.
MEDPLUM_REGISTER_ENABLEDNoSet to true to allow new admin user registration. Default: true.
MEDPLUM_AWS_TEXTRACT_ENABLEDNoSet to true to enable AWS Textract for document processing. Default: false.

Notes​

  • Unlike the Member Portal, these variables do not require the VITE_ prefix — the Admin Portal uses a different build configuration.
  • These values are baked into the build at compile time.
  • Never commit .env to version control.