Skip to main content
This guide will help you set up a local development environment for Stormkit.

Prerequisites

Before you begin, ensure you have the following installed:
  • Go 1.25+
  • Node.js 24+
  • PostgreSQL 14+
  • Redis 6+
  • Docker
  • Mise (polyglot tool version manager)
You can install Go and Node.js using Mise:

Project Structure

Understanding the project structure will help you navigate the codebase:

Component Overview

  • Community Edition (src/ce/): Open source components under AGPL-3.0
  • Enterprise Edition (src/ee/): Commercial features requiring a license
  • Shared Libraries (src/lib/): Common utilities used by both editions
  • Frontend (src/ui/): React-based web interface
  • Landing Page (src/www/): Marketing website

Setting Up Development Environment

1

Clone the repository

2

Start all services

This command starts the database, Redis, and all Stormkit services:
This will:
  • Check all dependencies
  • Start Docker services (PostgreSQL and Redis)
  • Run database migrations
  • Build the runner binary
  • Start all Stormkit services
3

Access the application

After the services start, you can access:

Available Make Commands

The Makefile provides several commands to help with development:

Testing

Tests require PostgreSQL with a test database named sktest and Redis to be running.

Setting Up Test Database

1

Start services

2

Create test database

Running Tests

Generating Mocks

When adding or changing interfaces under src/lib (or other packages), generate testify mocks using mockery:
Or using go run without installing mockery globally:
After regenerating mocks, run gofmt, go vet, and go test ./..., then commit the updated files under src/mocks.

Environment Configuration

The .env file is automatically created from .env.example when you run make dev. Key environment variables include:
  • Redis: REDIS_ADDR=localhost:6379
  • PostgreSQL: POSTGRES_HOST=localhost, POSTGRES_PORT=5432
  • API URL: STORMKIT_API_URL=http://api.localhost:8888
  • App URL: STORMKIT_APP_URL=https://localhost:5400
  • Runner Concurrency: STORMKIT_RUNNER_CONCURRENCY=4

Database Migrations

Creating a New Migration

To create a new migration file:
This creates a new file in src/migrations/ with the next numeric prefix and today’s date, e.g., 0021_2026-03-02.up.sql.

Dumping Schema

To dump the current database schema:
This saves the schema to src/migrations/structure.sql.

Resetting Development Data

If you need to start fresh:
This will delete all Docker volumes, remove the build directory, and reset your local database and Redis data.

Troubleshooting

Services won’t start

Run dependency checks:
This verifies that Docker, Mise, and other dependencies are installed and running.

Port conflicts

If you have services running on the default ports, you may need to modify the .env file to use different ports.

Docker not running

Ensure Docker Desktop is running before executing make dev or make start.

Tests failing

Make sure the test database sktest exists:

Next Steps

Now that you have your development environment set up:
  1. Explore the codebase structure
  2. Run the test suite to ensure everything works
  3. Check out open issues on GitHub
  4. Start contributing!
For contribution guidelines, see the Contributing Overview.