StackForge turns a plain-English product idea into a structured full-stack project blueprint: stack, folder layout, data model, API routes, frontend pages, infra plan, review notes, and optional generated source files. Specialized LLM stages each produce one part, and the web dashboard streams their progress live over Server-Sent Events.
- Web app: https://stackforge-web.vercel.app (it runs in demo mode when no API is configured)
- Architecture: see ARCHITECTURE.md
apps/web ──/api──▶ apps/api ──▶ packages/agents ──▶ LLMProvider (OpenRouter | NVIDIA | mock)
(Vite/React) (Express, runOrchestrator
job store, └ WorkflowEngine (ordering, state)
SSE) └ AgentStepExecutor (one stage)
packages/shared: zod schemas + types used everywhere
- Pipeline:
planner→schema→api→frontend→devops→reviewer→codegen. Feature-add prompts run the first five stages, and settingenableCodeGeneration: falsedropscodegen. AgentStepExecutor: the interface for running one stage. The defaultProviderStepExecutorcalls the LLM. Tests can pass their own executor torunOrchestrator.- Job store: jobs live in memory with a TTL (200 jobs max, evicted 1 hour after finishing). Each job records
currentStageand, when a stage fails, a structuredfailure(stage,stepId,message). Jobs do not survive a restart.
- Bun 1.3+ (runtime, package manager, test runner)
- Git
The stack is TypeScript (strict mode), Express, React + Vite, Zod, and Turborepo.
git clone https://github.com/7vignesh/stackforge.git
cd stackforge
bun install
cp apps/api/.env.example apps/api/.env # optional: add OpenRouter keysWith no API keys set, the API uses the deterministic mock provider (STACKFORGE_PROVIDER=auto).
bun run api:dev # API on http://localhost:3001
cd apps/web && bun run dev # web on http://localhost:5173 (proxies /api to :3001)
bun run dev # or start every package's dev task through TurboTo stream a run in the terminal, start the API and then run:
bun run scripts/demo.ts
bun run scripts/demo.ts --prompt "Build a CRM for real estate agents with PostgreSQL"bun run typecheck # tsc --noEmit in every package
bun run test # bun test in apps/api and packages/agents
bun run build # tsc for packages and api, vite build for webCI (.github/workflows/ci.yml) runs these three commands on every push to main and on every pull request. No API keys are needed for any of them.
apps/
api/ Express API: generate, jobs, SSE stream, download, GitHub push, add-feature
web/ Vite + React dashboard (deployed to Vercel)
packages/
agents/ Pipeline, WorkflowEngine, AgentStepExecutor, providers, cache, skills
shared/ Zod schemas and types (requests, jobs, SSE events, blueprint)
ui/ Shared React UI primitives
scripts/
demo.ts Terminal SSE demo client
Set these variables in apps/api/.env:
STACKFORGE_PROVIDER=openrouter
OPENROUTER_API_KEY=your_key_here # or OPENROUTER_API_KEY_1/_2/_3 for key rotation
OPENROUTER_ENDPOINT=https://openrouter.ai/api/v1/chat/completions
OPENROUTER_APP_NAME=stackforge-api
OPENROUTER_APP_URL=http://localhost:3001STACKFORGE_PROVIDER supports:
openrouter: forces real LLM execution (requiresOPENROUTER_API_KEY)mock: forces deterministic offline agent responses- omitted/
auto: usesopenrouterwhen API key is present, otherwisemock
Runtime/provider health is exposed at:
GET /api/runtime
Per-agent tuning lives in packages/agents/src/config/agent.configs.ts.
maxInputTokens: hard input cap used by optimizer compression.maxOutputTokens: maximum completion tokens requested from provider.minOutputTokens: minimum output budget required after compression.tokenBudget: total budget target used to derive dynamic output caps.compressionLevel: default compression aggressiveness (low/medium/high).budgetOverflowRetries: number of extra compression passes before fail-fast.
Suggested workflow:
- Run 3–5 representative prompts.
- Inspect per-agent SSE
agent_completedtelemetry. - Lower
maxInputTokensor raisecompressionLevelfor agents with highinputTokens. - Lower
maxOutputTokensfor agents with consistently lowoutputTokens. - Raise
minOutputTokensonly if quality drops from over-compression. - Adjust
tokenBudgetto set overall cost/quality tradeoff for the entire orchestration.
- v1 (this release): a 7-stage blueprint pipeline, the
AgentStepExecutorboundary, step-level failure reporting, and an in-memory job store. - Phase 2: the loop engine (
packages/loop-coreandapps/mcpon thefeat/loop-enginebranch) is intentionally kept out of v1. It will be extracted into its own repository.mainhas no dependency on it.