No description
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-20 23:54:52 -04:00
.env.defaults declare encryption-key-rotation vars in workspace schema 2026-05-20 23:41:42 -04:00
.env.local.example remove legacy single-key encryption var from workspace schema 2026-05-20 23:54:52 -04:00
.env.schema remove legacy single-key encryption var from workspace schema 2026-05-20 23:54:52 -04:00
.gitignore migrate env config to varlock schema layout 2026-05-10 18:46:56 -04:00
compose.yml restrict sandbox container privileges 2026-05-19 23:41:54 -04:00
justfile add integration testing commands for event-trigger-system 2026-05-15 23:25:34 -04:00
Procfile.dev migrate env config to varlock schema layout 2026-05-10 18:46:56 -04:00
pyproject.toml.example new development workspace setup 2026-03-14 13:49:41 -04:00
README.md migrate env config to varlock schema layout 2026-05-10 18:46:56 -04:00

Flowire Development Workspace

Development environment for the Flowire workflow automation platform. This repo orchestrates all the individual repos for local development.

Prerequisites

Setup

# 1. Clone the repos you need into repos/
git clone -b develop https://forgejo.gitx.codes/Flowire/flowire-app.git repos/flowire-app
git clone -b develop https://forgejo.gitx.codes/Flowire/flowire-sdk.git repos/flowire-sdk
git clone -b develop https://forgejo.gitx.codes/Flowire/fw-nodes-core.git repos/fw-nodes-core
# ... any other node packages you're working on

# 2. Initialize config files
just init
# Creates pyproject.toml from pyproject.toml.example
# Creates .env.local from .env.local.example

# 3. Fill in the required values in .env.local
# DATABASE_URL, JWT_SECRET_KEY, CREDENTIALS_ENCRYPTION_KEY
# Each blank in .env.local has a comment explaining how to generate it.

# 4. Add your repos to pyproject.toml
# Edit the [tool.uv.workspace] members list to include the repos you cloned

# 5. Install dependencies
just setup

# 6. Start infrastructure (PostgreSQL, Redis, sandboxes)
just docker

# 7. Run database migrations
just migrate

Development

just dev               # Start everything (docker + backend + frontend + worker + beat)
just dev-connect backend   # Attach to a service
just dev-restart backend   # Restart a service

Or run services individually:

just backend           # FastAPI server (http://localhost:8000)
just frontend          # Vite dev server (http://localhost:5173)
just worker            # Celery worker
just beat              # Celery beat scheduler

Configuration

Config lives in the workspace root and is managed with varlock. Values are resolved by walking these sources in order; later sources override earlier ones:

.env.defaults  →  .env.schema.local  →  .env.local
File Tracked Purpose
.env.schema yes Schema: declares every variable, validates types, marks secrets — no values
.env.defaults yes Default values shared by all contributors
.env.local.example yes Template for .env.local — empty placeholders for required keys
.env.schema.local no Optional per-developer overlay for secret backends (gitignored, see below)
.env.local no Your actual values (gitignored) — highest priority, overrides everything
pyproject.toml no uv workspace members

just dev (and most other just recipes) wraps the underlying command with varlock run, which validates the schema and injects resolved env vars into the child. Missing or malformed required values fail fast with a clear message before the backend boots.

Optional: pulling secrets from a backend (Infisical, 1Password, etc.)

If you'd rather have secrets pulled live from a vault on each just dev instead of pasting them into .env.local, create a gitignored .env.schema.local overlay. The committed schema imports it via @import(./.env.schema.local, allowMissing=true), so the overlay is opt-in — contributors who don't have one are unaffected.

Install the Infisical plugin into varlock's plugin cache (works for both Homebrew and standalone-binary installs):

varlock install-plugin @varlock/infisical-plugin@1.1.0

Then create .env.schema.local (example for Infisical Cloud):

# .env.schema.local — gitignored, per-developer
# @plugin(@varlock/infisical-plugin@1.1.0)
# @initInfisical(
#   projectId=YOUR_PROJECT_ID,
#   environment=dev,
#   clientId=$INFISICAL_CLIENT_ID,
#   clientSecret=$INFISICAL_CLIENT_SECRET
# )

# Bootstrap creds — values come from .env.local.
# @type=infisicalClientId
INFISICAL_CLIENT_ID=
# @type=infisicalClientSecret
INFISICAL_CLIENT_SECRET=

DATABASE_URL=infisical()
JWT_SECRET_KEY=infisical()
CREDENTIALS_ENCRYPTION_KEY=infisical()

For self-hosted Infisical, add a siteUrl parameter to @initInfisical(...):

#   clientSecret=$INFISICAL_CLIENT_SECRET,
#   siteUrl=https://your-infisical.example.com
# )

Then put your machine-identity INFISICAL_CLIENT_ID and INFISICAL_CLIENT_SECRET values in .env.local. Each contributor's overlay declares whatever bootstrap items their backend needs — the committed .env.schema stays backend-neutral.

If you ran just init before setting up the overlay, .env.local will already contain empty placeholder lines for DATABASE_URL, JWT_SECRET_KEY, and CREDENTIALS_ENCRYPTION_KEY. Delete those lines — .env.local takes precedence over the overlay, so an empty value will shadow the infisical() resolver.

The overlay only redeclares items whose resolver should change. Non-secrets stay declared once in .env.schema. Note: items declared with a literal default in the committed schema are sealed — only items declared resolver-less (KEY=) can be overridden via overlay.

For other backends (1Password op, AWS Secrets Manager, etc.) see varlock.dev — same pattern: load the plugin in .env.schema.local and redeclare the items you want fetched.

Commands

Run just to see all available commands. Key ones:

Command Description
just init Create config files from examples
just setup Install all dependencies
just dev Start all services
just docker / just docker-stop Manage infrastructure containers
just migrate Run database migrations
just migration "msg" Create a new migration
just test Run backend tests
just lint Run linters
just build Build frontend for production

Structure

Flowire/                          # This repo (dev workspace)
├── .env.schema                   # Config schema: declarations only (committed)
├── .env.defaults                 # Default values shared by all contributors (committed)
├── .env.local.example            # Template for .env.local (committed)
├── .env.local                    # Your local values (gitignored, highest priority)
├── .env.schema.local             # Optional secret-backend overlay (gitignored)
├── pyproject.toml                # uv workspace members (gitignored)
├── justfile                      # Dev commands
├── compose.yml                   # PostgreSQL, Redis, sandboxes
├── Procfile.dev                  # overmind process definitions
└── repos/                        # Individual git repos (gitignored)
    ├── flowire-app/              # Main application (backend + frontend)
    ├── flowire-sdk/              # SDK for building custom nodes
    ├── fw-nodes-core/            # Core workflow nodes
    └── ...                       # Other node packages