Installation
Prerequisites
FireFlow requires:
- Node.js: Version 22.14.0
- Package Manager: pnpm 10.16.1 or higher
Quick Installation
Clone the repository and install dependencies:
git clone https://github.com/Persistent-AI/fireflow.git
cd fireflow
pnpm installRunning in Development Mode
Start the complete development environment (frontend and backend):
pnpm run devThis command launches:
- Frontend development server with hot reloading
- Backend development process in watch mode
Running Components Individually
You can also run each component separately:
Backend only:
pnpm run dev:backFrontend only:
pnpm run dev:frontExecution worker:
pnpm run dev:execution-workerPostgreSQL Database Storage (Optional)
FireFlow can use PostgreSQL for persistent storage instead of in-memory storage.
1. Start PostgreSQL Database
Use the included Docker Compose configuration:
docker compose up -d postgresThis starts a PostgreSQL instance on port 5432.
2. Configure Database Connection
Create a .env file in the project root:
DATABASE_URL=postgres://postgres:[email protected]:5432/postgres?sslmode=disable3. Run Database Migrations
Before starting FireFlow with PostgreSQL storage, run migrations:
pnpm run migrateThis creates all required tables and indexes in your PostgreSQL database.
4. Start FireFlow
Once migrations are complete, start FireFlow normally:
pnpm run devYour flows, nodes, and execution data will now be stored persistently in PostgreSQL.
Building for Production
Build the entire project:
pnpm run buildBuild specific packages:
# Build frontend only
pnpm run build:front
# Build backend only
pnpm run build:backPreview the production build:
pnpm run previewDocker Deployment
Building Docker Images
Build Docker images using the Makefile:
# Build backend image
make docker-build-backend
# Build frontend image
make docker-build-frontend
# Build both images
make docker-build-allOr manually:
# Backend
docker build -t fireflow-backend -f apps/fireflow-backend/Dockerfile .
# Frontend
docker build -t fireflow-frontend -f apps/fireflow-frontend/Dockerfile .Running with Docker Compose
Launch both containers:
make docker-compose-upOr manually:
docker-compose up -d # Start containers
docker-compose down # Stop and remove containersThis starts:
- Backend on port 3001
- Frontend on port 5173
Debugging Setup
WebStorm
- Open Run/Debug Configurations
- Create a new Bun configuration:
- File:
apps/fireflow-backend/src/index.ts - Bun parameters:
--conditions=development
- File:
- Set breakpoints in TypeScript files and start debugging
VS Code
Add to .vscode/launch.json:
{
"type": "node",
"request": "launch",
"name": "Debug Backend",
"runtimeExecutable": "bun",
"runtimeArgs": ["--conditions=development", "--watch", "run", "src/index.ts"],
"cwd": "${workspaceFolder}/apps/fireflow-backend"
}Frontend Debugging (Browser)
- Start dev server:
pnpm run dev:front - Open Chrome/Firefox and navigate to
http://localhost:3004 - Open DevTools (F12) → Sources tab
- Press
Cmd+P(orCtrl+P) to quick-open files - Set breakpoints in
.tsx/.tsfiles
Authentication for GitHub Packages
To use published FireFlow packages, configure npm authentication:
- Create a personal access token (PAT) with the
read:packagesscope on GitHub - Add to your
.npmrcfile:
@persistentai:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PATReplace YOUR_GITHUB_PAT with your actual GitHub personal access token.
Verification
After installation, verify everything works:
# Run tests
pnpm test
# Check types
pnpm typecheck
# Lint code
pnpm lintNext Steps
- Quick Start Guide - Build your first flow
- Architecture Overview - Understand the system design
- API Reference - Explore the API documentation
Troubleshooting
Issue: pnpm install fails with peer dependency errors
Solution: These warnings are expected and don't prevent the application from running. They're related to React type versions in the monorepo.
Issue: Database migrations fail
Solution: Ensure PostgreSQL is running and the DATABASE_URL in .env is correct. Check the connection with:
psql "postgres://postgres:[email protected]:5432/postgres?sslmode=disable"Issue: Port already in use
Solution: Check if another process is using the port:
lsof -i :3001 # Backend
lsof -i :3004 # FrontendKill the process or configure a different port in the respective app's configuration.