Setup & Deployment
Usage with Live-reload
For a quick start with a pre-configured environment, you can use the XeoContext Template (opens in a new tab).
-
Clone the template:
git clone https://github.com/xeost/xeocontext-template my-system-design cd my-system-design -
Run with Docker Compose: The template includes a
docker-compose.ymlconfigured to use thexeost/xeocontext-live-reload:latestimage.docker compose up -d -
Edit Content: Modify the files in the
contentdirectory. The viewer will automatically reload to reflect your changes. See Configuration and Structure & Organization for more details.
AI Support:
The template includes .agent/rules/content.md, which provides instructions for LLMs on how to structure the design content (DDD, OpenAPI, AsyncAPI).
Note: The template provides a minimal starting point. For comprehensive examples of directory structures and configurations, please refer to the
examples(opens in a new tab) directory in this repository.
Production Usage (without Live-reload)
If your content is static and will not be edited, you can switch to the production-optimized image for better performance.
-
Follow the steps in the Usage with Live-reload section to set up your repository.
-
Edit the
docker-compose.ymlfile and change the image name:services: xeocontext: image: xeost/xeocontext:latest # Change from xeocontext-live-reload # ... rest of the configuration
Deployment on Vercel
This workflow allows you to deploy a customized version of XeoContext (with your embedded content) to Vercel.
-
Clone the XeoContext Viewer: Start by cloning the base viewer repository.
git clone https://github.com/xeost/xeocontext.git my-viewer cd my-viewer pnpm install -
Check Available Versions: See which versions of XeoContext are available to pin your deployment to.
pnpm list-releases -
Create Deployment Repository: Create a new empty repository on GitHub (e.g.,
github-user/system-design-example) where your customized viewer will live. -
Configure Environment: Copy
.env.exampleto.envand set the following variables:cp .env.example .envXEOCONTEXT_CONTENT_TYPE: Set to'local'(if content is on your machine) or'git'(if content is in a remote repo).XEOCONTEXT_CONTENT_SOURCE: Path to local directory (relative or absolute) or Git URL of your content repository.XEOCONTEXT_TAG: The XeoContext version tag you want to use (e.g.,v0.1.0).XEOCONTEXT_DEPLOY_REPO: The URL of the GitHub repository you created in step 3.
-
Sync & Setup: Run the setup script. This will reset the code to the specified tag, copy your content into the
contentdirectory, and configure the git remotes (upstreamfor updates,originfor your deployment).pnpm setup-content -
Push to GitHub: Commit the changes and push to your deployment repository.
git add . git commit -m "Initial deployment" git push -u origin mainNote: Connect this repository to Vercel for automatic deployments.
Maintaining Your Deployment
Updating XeoContext Version: If a new version of XeoContext is released:
- Update
XEOCONTEXT_TAGin your.envfile. - Run
pnpm setup-content. - Commit and push.
Updating Content: If you change your design content (in your local folder or external content repo):
- Run
pnpm setup-content. - Commit and push.
Development (Contributing)
-
Install dependencies:
pnpm install -
Configure Environment: Copy
.env.exampleto.envand configureXEOCONTEXT_CONTENT_DIRto point to a sample content directory.cp .env.example .envOpen
.envand uncomment/set:XEOCONTEXT_CONTENT_DIR=./examples/markdown-openapi-asyncapi -
Run development server:
pnpm dev -
Open Application: Navigate to http://localhost:12051 (opens in a new tab).