Architecture
Layout
The Admin Portal uses Medplum's built-in AppShell component, which provides the full layout including the top header, left sidebar navigation, and main content area. This is different from the Member Portal which uses a custom Mantine AppShell.
┌─────────────────────────────────────────────┐
│ Header (logo + user menu) │
├──────────────┬──────────────────────────────┤
│ │ │
│ Sidebar │ Main Content │
│ Navigation │ (AppRoutes renders │
│ │ the active page) │
│ │ │
└──────────────┴──────────────────────────────┘
Authentication
App.tsx uses useMedplum() to check login state:
medplum.isLoading()→ shows a loading spinner while the session is checked.- Once loaded, the
AppShellitself handles redirecting unauthenticated users to/signin.
Public routes (no login required):
/signin/register/resetpassword/setpassword/:id/:secret/verifyemail/:id/:secret/oauth
Navigation menu
The sidebar navigation is assembled in App.tsx inside the userConfigToMenu() function. It combines two sources:
- User configuration — shortcuts loaded from the logged-in user's
UserConfigurationFHIR resource (e.g., quick links to Patient, Practitioner, etc.) - Hardcoded menu groups — fixed sections for Reports, Support, Integrations, and Settings
Sidebar menu groups
| Group | Links |
|---|---|
| (User shortcuts) | Patient, Practitioner, Organization, etc. |
| Patients | Invite Patient |
| Reports | Patient Engagement, AI Chat Analytics, EHR Integration Health |
| Support | Support Tickets |
| Integrations | Hospital Integrations, SSO Integrations, SSO Configuration |
| (Admin groups) | Project, Users, Bots, Clients, Secrets, Sites (from UserConfiguration) |
| Settings | Audit Log, Security |
Generic FHIR Resource Browser
A large portion of the Admin Portal is a generic FHIR resource browser — any FHIR resource type can be viewed, created, edited, and deleted through a standard set of pages:
| Path pattern | What it does |
|---|---|
/:resourceType | List all resources of that type |
/:resourceType/new | Create a new resource |
/:resourceType/:id | View resource timeline |
/:resourceType/:id/details | View resource fields |
/:resourceType/:id/edit | Edit the resource |
/:resourceType/:id/json | View/edit raw JSON |
/:resourceType/:id/history | View version history |
/:resourceType/:id/delete | Delete the resource |
This is inherited from Medplum's open-source admin app and works for any FHIR resource type (Patient, Observation, Condition, etc.).