Skip to content

Getting Started

Prerequisites

  • Docker 20.10+
  • Docker Compose (optional, for multi-container setups)

Installation

Pull the official Backflow Docker image:

bash
docker pull backflow/backflow:latest

Configuration

1. Create Configuration Directory

bash
mkdir -p backflow-config
cd backflow-config

2. Create config.json

Create a config.json file in your configuration directory:

json
{
  "supabase": {
    "url": "{{env.SUPABASE_URL}}",
    "anonKey": "{{env.SUPABASE_ANON_KEY}}"
  },
  "jwt": {
    "secret": "{{env.JWT_SECRET}}"
  },
  "routes": [
    {
      "path": "/health",
      "method": "get",
      "description": "Health check"
    }
  ]
}

3. Create Environment File

Create a .env file with your configuration:

bash
# Database (choose one)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key

# Authentication
JWT_SECRET=your-secure-secret-key

# Optional: Redis for caching
REDIS_URL=redis://localhost:6379

# Optional: AI features
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...

Start Backflow

Using Docker Run

bash
docker run -d \
  --name backflow \
  -p 3000:3000 \
  -v $(pwd)/config.json:/app/config.json \
  --env-file .env \
  backflow/backflow:latest

Using Docker Compose

Create a docker-compose.yml:

yaml
version: '3.8'
services:
  backflow:
    image: backflow/backflow:latest
    ports:
      - "3000:3000"
    volumes:
      - ./config.json:/app/config.json
      - ./workflows:/app/workflows
      - ./integrations:/app/integrations
    env_file:
      - .env
    restart: unless-stopped

Then run:

bash
docker compose up -d

Open:

Configuration Structure

backflow-config/
├── config.json              # Main API configuration
├── .env                     # Environment variables
├── docker-compose.yml       # Docker Compose config (optional)
├── integrations/            # Custom integration configs
└── workflows/               # Workflow definitions

Next Steps

Backflow - Configuration-driven API framework