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)
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:
- Landing page: https://localhost:5500
- Application: https://localhost:5400
- API: http://api.localhost:8888
Available Make Commands
The Makefile provides several commands to help with development:Testing
Tests require PostgreSQL with a test database namedsktest 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 undersrc/lib (or other packages), generate testify mocks using mockery:
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: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:src/migrations/structure.sql.
Resetting Development Data
If you need to start fresh:Troubleshooting
Services won’t start
Run dependency checks: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 executingmake dev or make start.
Tests failing
Make sure the test databasesktest exists:
Next Steps
Now that you have your development environment set up:- Explore the codebase structure
- Run the test suite to ensure everything works
- Check out open issues on GitHub
- Start contributing!