Developer Documentation & Internal Systems Guide

System Architecture

StackPilot is built on three core pillars that work in sequence to move from a project description to a production-ready monorepo.

01 AI Engine

Uses LLMs (Gemini, Claude, GPT) to parse intent signals like "fast", "marketplace", or "real-time" into structured stack selections.

02 Validator

A deterministic rule engine that ensures selected components (e.g., Supabase + Prisma) are technically compatible before scaffolding.

03 Scaffolder

The execution layer that copies templates, injects variables via Handlebars, and orchestrates dependency installation.

CLI Command Reference

The CLI is distributed via NPM as stack-pilot-architect.

# Initialize your AI provider (Stored in local config)
stack-pilot-architect init

# Start the interactive AI scaffolding flow
stack-pilot-architect create

# Manually override or update specific stack configurations
stack-pilot-architect override

Global Configuration

Config is stored in the CLI installation directory. The init command manages these keys, but they can be bypassed using environment variables:

Scaffolder Logic & Workspace

StackPilot maintains a strict project organization policy to keep your development machine head-clean.

Deployment Assets & Scripts

Beyond core stack templates, StackPilot uses shared assets to handle platform-specific configurations.

Adding New Templates

Templates live in the /templates directory. To add a new stack:

  1. Create a new folder in /templates/[stack-name].
  2. Add a manifest.json defining the stack capabilities.
  3. Place boilerplates in a /root subfolder using .hbs extension for dynamic files.
  4. Update config/stacks.config.json to register the new valid options.