Blueprint OSS runs a FastAPI backend and a Next.js frontend. Supabase is supported for deployment through the Supabase client; the backend falls back to SQLite for local use.
- Python 3.11+
- Node.js 18+
- Supabase project (optional, recommended for deployed persistent storage)
- Docker (optional, for containerized frontend/backend images)
From the repo root:
docker compose up --buildThis builds blueprint-backend:local and blueprint-frontend:local, starts the API on port 8000, starts the UI on port 3000, and keeps SQLite data in the blueprint-data Docker volume.
The Compose backend defaults to:
SQLITE_DATABASE_URL=sqlite:////data/blueprint.db
JOB_METADATA_BACKEND=auto
JOB_METADATA_DB_PATH=/data/blueprint_jobs.db
LLM_PROVIDER=simulationSet the same database and live-provider variables listed below in your shell or repo-root .env before running Compose if you want Supabase or model-backed generation.
If you publish the backend on a different host or port, rebuild the frontend with a matching browser-visible API URL:
BACKEND_PORT=8010 NEXT_PUBLIC_API_URL=http://localhost:8010 docker compose up --buildFrom the repo root:
python3 -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txtRecommended: create a repo-root .env (see .env.example).
# Supabase persistence through the Supabase Python client.
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
# Or, for newer Supabase projects:
# SUPABASE_SECRET_KEY=your_secret_key_here
# Local fallback / explicit SQLite
# DATABASE_BACKEND=sqlite
SQLITE_DATABASE_URL=sqlite:///./blueprint.db
# Deployment-only alpha gate
# BLUEPRINT_DEPLOYMENT=true
# Live LLM generation
LLM_PROVIDER=openai
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4o-mini
STRICT_LLM=true
# Optional first-party OpenAI settings
# OPENAI_RESPONSE_FORMAT=json_schema
# OPENAI_VALIDATE_MODELS=false
# OPENAI_TIMEOUT_SECONDS=300
# OPENAI_REASONING_EFFORT=low
# OPENAI_TEMPERATURE=1
# OPENAI_PROJECT_ID=your_openai_project_id_here
# OPENAI_ORG_ID=your_openai_org_id_here
# Optional generated product image output
IMAGE_OUTPUT_ENABLED=false
IMAGE_PROVIDER=openai
OPENAI_IMAGE_MODEL=gpt-image-2
OPENAI_IMAGE_SIZE=1024x1024
# OPENAI_IMAGE_QUALITY=medium
# OPENAI_IMAGE_OUTPUT_FORMAT=png
# Optional Supabase Storage upload for reference/product images.
# Uses the Supabase client with SUPABASE_URL plus the service-role/secret key.
SUPABASE_S3_ENDPOINT=https://knmuwxhfrgkykyvblzwi.storage.supabase.co/storage/v1/s3
SUPABASE_S3_BUCKET=contents
# SUPABASE_S3_REGION=us-east-1
# Optional fallback for S3-compatible uploads when Supabase client env is absent.
# SUPABASE_S3_ACCESS_KEY_ID=your_supabase_s3_access_key_id
# SUPABASE_S3_SECRET_ACCESS_KEY=your_supabase_s3_secret_access_key
# SUPABASE_IMAGE_SIGNED_URL_SECONDS=86400
# SUPABASE_STORAGE_PUBLIC_BASE_URL=https://knmuwxhfrgkykyvblzwi.supabase.co
# Generic provider aliases
# LLM_API_KEY=your_provider_api_key_here
# LLM_MODEL=gpt-4o-mini
# LLM_FALLBACK_MODEL=your_fallback_model_here
# Optional for OpenAI-compatible providers
# LLM_PROVIDER=openai-compatible
# LLM_BASE_URL=http://localhost:11434/v1
# LLM_ALLOW_NO_API_KEY=true
# LLM_TIMEOUT_SECONDS=90
# LLM_REASONING_EFFORT=low
# LLM_TEMPERATURE=0.2
# Optional TCP JSONL A2A socket
JOB_METADATA_BACKEND=auto
JOB_METADATA_DB_PATH=./blueprint_jobs.db
A2A_SOCKET_ENABLED=false
A2A_SOCKET_HOST=127.0.0.1
A2A_SOCKET_PORT=8766Notes:
- Supabase mode uses
SUPABASE_URLplusSUPABASE_SERVICE_ROLE_KEYorSUPABASE_SECRET_KEY; it does not use a Postgres connection string. - Do not use anon, publishable, or
NEXT_PUBLIC_Supabase keys for the backend. They obey RLS and cannot seed these tables by default. - If Supabase client variables are missing, the backend falls back to
SQLITE_DATABASE_URLorsqlite:///./blueprint.db. DATABASE_BACKENDcan besupabaseorsqlite.BLUEPRINT_DEPLOYMENT=trueenables the deployment-only alpha gate. When live LLM generation is unavailable, the frontend offers generated example projects plus a contact form that stores leads inalpha_signups.LLM_PROVIDERcan begemini,openai,openai-compatible, orsimulation.OPENAI_API_KEYenables first-party OpenAI live structured generation whenLLM_PROVIDER=openai.OPENAI_RESPONSE_FORMATdefaults tojson_schemafor OpenAI. You can set it tojson_objectfor older JSON mode ornoneto omitresponse_format.OPENAI_TIMEOUT_SECONDScontrols the per-request OpenAI read timeout and defaults to300.OPENAI_REASONING_EFFORTcan lower latency for GPT-5/o-series reasoning models, for examplelow.OPENAI_TEMPERATUREis optional and omitted by default for first-party OpenAI so models that only support their default temperature can run.OPENAI_PROJECT_IDandOPENAI_ORG_IDare optional routing headers for accounts that need explicit project or organization selection.IMAGE_OUTPUT_ENABLED=truemakes generated product concept images the default. Leave itfalseand use the UI checkbox orgenerate_image=trueAPI flag to opt in per job.IMAGE_PROVIDERcan beopenai,openai-compatible, ornone.OPENAI_IMAGE_MODELselects the image model. The example default isgpt-image-2.OPENAI_IMAGE_SIZE,OPENAI_IMAGE_QUALITY, andOPENAI_IMAGE_OUTPUT_FORMATtune generated image output.- When
SUPABASE_URLandSUPABASE_SERVICE_ROLE_KEY/SUPABASE_SECRET_KEYare set, uploaded reference images and generated product images are stored in the Supabase Storage bucket fromSUPABASE_S3_BUCKET(defaultcontents) through the Supabase client. S3-compatible credentials are only a fallback. SUPABASE_IMAGE_SIGNED_URL_SECONDScontrols how long refreshed Supabase Storage read URLs live when projects are loaded. It defaults to86400.LLM_API_KEYis a generic provider key alias. Gemini aliases (GEMINI_API_KEYorGOOGLE_API_KEY) are still supported.LLM_TIMEOUT_SECONDScontrols the generic provider read timeout. OpenAI-compatible endpoints default to90.LLM_REASONING_EFFORTpasses reasoning effort to compatible endpoints that support it.LLM_TEMPERATUREcontrols generic provider sampling. OpenAI-compatible endpoints default to0.2; setdefault,none, oromitto omit it.- With
STRICT_LLM=true, generation fails fast when model availability validation is enabled andLLM_MODELis unavailable. - With
STRICT_LLM=false, the backend may fall back toLLM_FALLBACK_MODEL. - OpenAI-compatible endpoints can use
LLM_BASE_URL; local endpoints that do not require auth can setLLM_ALLOW_NO_API_KEY=true. JOB_METADATA_BACKEND=autostores A2A job metadata in Supabase when the main app database is Supabase, otherwise in SQLite.JOB_METADATA_DB_PATHcontrols the SQLite A2A job metadata file.- A2A REST, WebSocket, and MCP routes are always mounted. The TCP JSONL socket starts only when
A2A_SOCKET_ENABLED=true.
The server auto-seeds templates on startup if the component_templates table is empty.
Optional manual seed:
python3 backend/seed_db.pyRun from the repo root so backend.* imports resolve correctly:
uvicorn backend.main:app --reload --port 8000OpenAI one-liner:
LLM_PROVIDER=openai OPENAI_API_KEY=your_openai_api_key_here OPENAI_MODEL=gpt-4o-mini uvicorn backend.main:app --reload --port 8000API docs: http://localhost:8000/api/docs
cd frontend
npm install
npm run devYou can submit a netlist to POST /api/validate to test validation rules without running the full pipeline.