Getting Started
This guide is the fastest way to get a working DPG instance on your machine.
Prerequisites
Section titled “Prerequisites”- Node.js
>=24 pnpm11.1.2- Docker Desktop or Docker Engine
What You Will Run
Section titled “What You Will Run”For a normal local setup you run:
- PostgreSQL
- Redis
- the API app
- optionally the UI app
- optionally the docs site
1. Install Dependencies
Section titled “1. Install Dependencies”pnpm install2. Copy Environment
Section titled “2. Copy Environment”cp .env.example .envUse this minimum local setup:
INSTANCE_NAME="dpg-local"INSTANCE_ENV="development"API_DOMAIN="http://localhost"API_PORT="2742"SERVED_DOMAINS="yellow_dot/student"NETWORK_CONFIG_SOURCE="local"NETWORK_CONFIG_LOCAL_FILE="examples/schemas/yellow_dot/network.json"AUTH_SECRET="replace-this"REDIS_PASSWORD="replace-this"3. Start PostgreSQL And Redis
Section titled “3. Start PostgreSQL And Redis”docker compose up -d db redis4. Run The API
Section titled “4. Run The API”pnpm dev:apiTo run the API itself as a Docker container against the Compose PostgreSQL and Redis services:
docker compose up -d db redisDOCKER_NETWORK=dpg_internal pnpm docker:apiThe API should be available at:
http://localhost:2742http://localhost:2742/api/reference
5. Optional: Run The UI App
Section titled “5. Optional: Run The UI App”pnpm dev:uiThe UI reads schemas and network items from the API. Set VITE_API_URL in the
UI environment when the API is not available at the default local URL.
6. Optional: Run The Docs Site
Section titled “6. Optional: Run The Docs Site”pnpm dev:docs7. Create Test Data
Section titled “7. Create Test Data”Use one of the payloads from:
examples/api/yellow_dot.mdexamples/api/blue_dot.mdexamples/postman/dpg.postman_collection.jsonfor a generic single-domain collectionexamples/schemas/*/postman/*.postman_collection.jsonfor schema-specific collections
Remember:
POST /api/v1/item/createdoes not acceptitem_instance_urlPOST /api/v1/item/createdoes not acceptitem_schema_url- those are generated by the backend
Common Local Modes
Section titled “Common Local Modes”One instance, one domain
Section titled “One instance, one domain”SERVED_DOMAINS="yellow_dot/student"NETWORK_CONFIG_SOURCE="local"NETWORK_CONFIG_LOCAL_FILE="examples/schemas/yellow_dot/network.json"One instance, many domains
Section titled “One instance, many domains”SERVED_DOMAINS="yellow_dot/student,yellow_dot/tutor"NETWORK_CONFIG_SOURCE="local"NETWORK_CONFIG_LOCAL_FILE="examples/schemas/yellow_dot/network.json"Multi-network instance
Section titled “Multi-network instance”For multiple networks in one process, prefer remote config loading:
SERVED_DOMAINS="yellow_dot/student,blue_dot/seeker"NETWORK_CONFIG_SOURCE="remote"NETWORK_CONFIG_URLS="yellow_dot=https://registry.example.com/schemas/yellow_dot/network.json,blue_dot=https://registry.example.com/schemas/blue_dot/network.json"Useful Commands
Section titled “Useful Commands”pnpm dev:apipnpm dev:uipnpm build:apipnpm build:uipnpm preview:apipnpm preview:uipnpm start:apipnpm db:generate:apipnpm db:migrate:apipnpm db:studio:apipnpm dev:docspnpm build:docs
Recommended Learning Path
Section titled “Recommended Learning Path”- Vocabulary
- Architecture
- Environment
- Network Schema Authoring Guide
- API Overview
- one of the hosting guides