Deploying MotionCommons
Understand the services, configuration and review needed to operate an installation.
Current deployment scope
MotionCommons does not yet provide a turnkey production deployment. This guide describes the build boundary and proposed service topology. Local synthetic checks and selected hosted database components do not establish an operational clinical installation.
The current application supports local development. AWS hosting and general managed scientific compute remain target choices. Confirm the actual target, migration history and enabled components before deploying.
Service topology
| Component | Responsibility | Target |
|---|---|---|
| Web | Static public documents and authenticated SPA | Proposed S3 / CloudFront |
| API | Caller-scoped authorization and coordination | Proposed ECS / Fargate |
| Database, Auth and private files | Study boundaries, identity and storage policies | Configured Supabase target |
| Scientific workers | Pinned isolated CPU/GPU analysis | Proposed AWS Batch; fixed local worker exists |
| Media and monitor | Live transport and permission-based removal | Reviewed LiveKit Cloud and separate monitor |
Build the web application
Use Node 24. The web build writes apps/web/build/client. Public routes, including documentation, are prerendered into readable HTML. Authenticated routes use __spa-fallback.html.
Configure hosting to serve real static documents first, serve the SPA fallback for application routes and proxy /api to the intended authorized backend. Preserve query strings and fragments. Do not rewrite missing static assets into successful HTML responses.
No production host or domain is configured by running the build. TLS, domain routing, environment-specific settings and operational supervision must be established for the chosen target.
npm ci
npm run typecheck
npm run buildConfigure services and migrations
- Verify the exact development or deployment target and its existing migration history.
- Configure matching public browser/API Supabase settings. Keep elevated worker credentials server-only.
- Review forward migrations and their prerequisites. Some execution and telehealth work remains local-only; do not blindly apply every migration to a hosted target.
- Validate anonymous denial, actual-role access, private storage and the complete synthetic workflow on the intended staging setup.
Live media is a separate boundary
Synthetic mode uses a loopback LiveKit server. Current clinical configuration only accepts a reviewed wss://*.livekit.cloud endpoint. A general self-hosted clinical media deployment is not supported by that configuration.
Supervise the dedicated admission monitor, alert on stale health and provider removal failures, and establish outage containment. Drain calls before rotating the media project or keys.
Before operational use
These are operator requirements. This documentation does not claim that those procedures or a clinical deployment have been validated.
- Establish service health checks, bounded logs without sensitive content, monitoring and incident ownership.
- Define backup, restore, retention, export and deletion procedures; exercise recovery in an isolated environment.
- Review dependency/runtime versions, capacity, network boundaries, secret rotation and a concrete rollback plan.
- Before clinical data, obtain responsible privacy/security review and applicable agreements for the exact projects and features in use.