Skip to main content

Local Development

This guide covers everything needed to run the vNext platform on your local machine via docker-compose. The vnext-runtime repo ships with ready-to-use templates for this setup.

tip

For a single-shot start: make dev sets up the environment, creates the network, starts PostgreSQL, then brings up vnext-app + init + component-publisher in healthy order.

Prerequisites

  • Docker Desktop (or equivalent Docker Engine + Compose)
  • Make
  • Git

Environment Configuration

The repo includes template files in vnext/docker/templates/ for generating domain-specific configurations. When you create a domain with make create-domain, these templates are processed and the resulting configuration files are placed in vnext/docker/domains/<domain_name>/.

Template Files:

FileDescription
.envMain environment file with versions and ports
.env.orchestrationOrchestration service configuration
.env.executionExecution service configuration
.env.worker-inboxWorker inbox service configuration
.env.worker-outboxWorker outbox service configuration
appsettings.*.Development.jsonApplication settings

To change defaults for all new domains, customize templates in vnext/docker/templates/. To customize a specific domain, edit files under vnext/docker/domains/<domain_name>/.

The Makefile provides the most comfortable runtime for developers. It checks environment files and starts the dev environment with a single command:

# Check env files and start the dev environment
make dev

# Show help menu
make help

# Network setup and env check
make setup

What does make dev do?

When you run make dev, the following happens automatically:

  1. Environment Setup.env files and Docker network created
  2. PostgreSQL starts → vNext_WorkflowDb database auto-created
  3. vnext-app starts → after postgres is healthy
  4. vnext-init starts → after vnext-app is healthy
  5. vnext-component-publisher runs → after vnext-init is healthy, auto-publishes components
  6. ✅ All other services start

In one command:

  • Database ready with schema
  • Components loaded
  • Full infrastructure running

Manual Setup

If you prefer not to use the Makefile, you can set things up manually.

1. Verify Environment Files

Make sure .env, .env.orchestration and .env.execution are present in vnext/docker/; customize as needed.

2. Create Docker Network

docker network create vnext-development

3. Start Services

cd vnext/docker

# Start all services in the background
docker-compose up -d

# Tail logs
docker-compose logs -f vnext-app

# Restart a specific service
docker-compose restart vnext-app

4. Verify System Status

# Running services
docker-compose ps

# vnext-app health
curl http://localhost:4201/health

VNext Core Runtime Initialization

The vnext-init service runs automatically after vnext-app becomes healthy. It performs:

  1. Downloads the @burgan-tech/vnext-core-runtime npm package (version controlled via .env)
  2. Reads system components from the core folder inside the package:
    • Extensions
    • Functions
    • Schemas
    • Tasks
    • Views
    • Workflows
  3. Replaces all "domain" property values in JSON files with the APP_DOMAIN environment variable
    • Lets each developer work in their own domain locally
    • Default domain is "core"; override via .env with APP_DOMAIN=mydomain

Database Management (Domain-Specific)

Each domain requires its own database. Database names are auto-derived from the domain name:

  • corevNext_Core
  • salesvNext_Sales
  • morph-idmvNext_Morph_idm

Database Commands

# Database status (lists all databases)
make db-status

# List only vNext databases
make db-list

# Create database for a domain
make db-create DOMAIN=core
make db-create DOMAIN=sales

# Drop database (DESTRUCTIVE!)
make db-drop DOMAIN=core

# Reset (drop and recreate)
make db-reset DOMAIN=core

# Connect via psql
make db-connect DOMAIN=core

Automatic Component Publishing

The vnext-component-publisher service runs automatically after vnext-init is healthy:

  1. Waits for vnext-init to be ready
  2. Publishes components with the configured version and domain
  3. Completes and exits

To manually republish components:

# Re-run the component publisher
make republish-component

# Or use the script directly
make publish-component

Makefile Commands Reference

Core

CommandDescription
make helpList all available commands
make devSet up and start the dev environment
make setupCheck env files and create network
make infoShow project info and access URLs

Multi-Domain Management

CommandUsage
make create-domainmake create-domain DOMAIN=mycompany PORT_OFFSET=10
make list-domainsList all configured domains
make up-vnextmake up-vnext DOMAIN=mycompany
make down-vnextmake down-vnext DOMAIN=mycompany
make restart-vnextmake restart-vnext DOMAIN=mycompany
make status-vnextmake status-vnext DOMAIN=mycompany
make logs-vnextmake logs-vnext DOMAIN=mycompany
make status-all-domainsShow all running vNext services
make down-all-vnextStop all domain services (keep infra)
make healthHealth check; optional DOMAIN=

Infrastructure

CommandDescription
make up-infraStart only infrastructure services
make down-infraStop only infrastructure services
make status-infraInfrastructure status
make logs-infraInfrastructure logs

Docker

CommandDescription
make upStart services
make up-buildBuild and start services
make downStop services
make restartRestart services
make buildBuild Docker images

Monitoring & Logs

CommandDescription
make statusService status
make healthService health check
make logsAll service logs
make logs-orchestrationOrchestration logs
make logs-executionExecution logs
make logs-initInit service logs
make logs-daprDAPR service logs
make logs-dbDatabase logs

Database

CommandUsage
make db-statusDB status (all DBs)
make db-listOnly vNext DBs
make db-createmake db-create DOMAIN=core
make db-dropmake db-drop DOMAIN=core (destructive!)
make db-resetmake db-reset DOMAIN=core
make db-connectmake db-connect DOMAIN=core

Custom Components

CommandDescription
make publish-componentPublish component package
make republish-componentRe-run component publisher

Maintenance

CommandDescription
make cleanClean stopped containers
make clean-all⚠️ Deletes ALL domains, infra, images, volumes
make resetReset env (stop, clean, setup)
make updatePull latest images and restart

Common Workflows

# First-time project run
make dev

# Tail logs
make logs-orchestration

# Service status check
make status
make health

# Database operations
make db-status
make db-reset DOMAIN=core

# Restart during dev
make restart

# Republish components
make republish-component

# Cleanup and re-setup
make reset
make dev

# Container access
make shell-orchestration
make shell-postgres

Distilled from vnext-runtime/README.md. For multi-domain details see Multi-Domain Setup.