Backend-first generation pipeline for turning plain-English prompts into structured iOS app specifications, preview bundles, and project blueprints.
- Prompt normalization and validation
- Domain-aware intent extraction (LLM service with heuristic fallback)
- AppSpec generation (domain blueprints, screens, data models, integrations)
- AppSpec schema validation (versioning + structured errors)
- iOS SwiftUI project blueprint generation (pluggable generator registry)
- Preview bundle generation (screens, components, routes, sample data)
- Export job packaging (gzip artifact with checksum and retry lifecycle)
- Revision persistence (typed revisions: spec, preview_bundle, blueprint)
- Tenant-scoped tracking (plan limits, generation run records, auth middleware)
The repository layer (src/repositories/) and schema (src/repositories/sql/schema.sql) define:
tenants— subscription plan limits and billing tierusers— tenant membersprojects— tenant-scoped app projectsspec_revisions— immutable snapshots of specs and blueprintsgeneration_runs— audit log of every pipeline invocationexports— artifact records tied to generation runs
npm install
npm test # run unit tests
npm run generate:demo # run pipeline demo
npm run start:api # start REST API server (port 3001)
npm run dashboard # start internal builder UI (http://127.0.0.1:4173)| Method | Path | Description |
|---|---|---|
| GET | /projects | List all projects |
| POST | /projects | Create a project |
| POST | /projects/:id/generate | Trigger generation |
| GET | /projects/:id/preview | Fetch preview |
| POST | /projects/:id/export | Create export artifact |
The lightweight builder UI (dashboard/) runs locally with npm run dashboard. It provides a three-panel interface: prompt input + history, live preview, and AppSpec JSON viewer.
src/
├── domain/ — AppSpec types, schemas, export job lifecycle, preview bundle
├── generators/ — Pluggable generator registry (ios_swiftui target)
├── services/ — LLM intent service, spec generator, preview generator, export service, plan limits
├── orchestration/ — GenerationPipeline, demo runner, dashboard server
├── revisions/ — In-memory RevisionStore (for non-tenant mode)
├── repositories/ — Postgres repository layer (tenant-scoped persistence)
├── middleware/ — Auth middleware (bearer token + tenant claim)
└── backend/ — Express REST API server + ProjectStore