Deployment
SideDoc runs entirely in the browser. @sidedoc/backend is a TypeScript library that is bundled into the web app, not a server. Deploying SideDoc therefore means serving a set of static files over HTTPS.
What gets deployed
One directory of static files:
| Path | Content |
|---|---|
/ (index.html, /assets/*) | The standalone datasheet editor. Bundles are content-hashed. |
/schemas/<version>/*.json | The JSON Schemas (profiles and type library) of each bundled datamodel version, plus /schemas/versions.json. |
/vocab/*.jsonld | SKOS vocabularies used by the profiles. /vocab/<scheme> redirects to <scheme>.jsonld. |
/config.js | Deployment settings for the browser (window.__SIDEDOC_CONFIG__). |
Schemas and vocabularies are public resources that other tools may fetch, so they are served with Access-Control-Allow-Origin: *.
Architecture
text
browser ──HTTPS──> reverse proxy / ingress (TLS) ──HTTP──> SideDoc container (nginx, :8080)
│ static files, read-only
│
├── documents stay in the browser (IndexedDB); users import and export files
└── optional: the browser writes backups to the user's Drive, bucket or local folder- No server-side state. The container has no database and no volumes. It can be replaced, scaled or moved at any time. Users' work never reaches the server.
- Documents live with the user. The standalone editor stores the workspace in the browser's IndexedDB and exports documents as files. Its Settings window can also write backups of the workspace to the user's Google Drive, an S3-compatible bucket or a local folder, directly from the browser; see Persistence for what each needs and its current status.
- Settings at run time. The container renders
/config.js, the security headers and a few nginx directives fromSIDEDOC_*environment variables when it starts. The same image works for every deployment. - No third-party traffic by default. Error reporting to Sentry is off unless you enable it, and then goes through a same-origin tunnel.
Ways to deploy
- Docker: the recommended route. A hardened nginx image that runs as non-root on a read-only filesystem. Works with Docker, Compose, Podman and Kubernetes.
- Static hosting: build the files yourself and serve them with any web server. You then have to replicate the headers and routes the container sets.
Reference
- Configuration: every setting, generated from
docker/settings.json. - Schemas: which datamodel versions are served and how to update them.
- Persistence: the browser workspace and backups to Google Drive, S3 or a local folder.
- Upgrading: what to check when moving to a new release.
- Troubleshooting: start-up errors and common problems.
- Docs site: how this documentation is built and published.