diff --git a/docs/advanced-docs/compile-guarantee.md b/docs/advanced-docs/compile-guarantee.md index b4eb7ba2..1d97677f 100644 --- a/docs/advanced-docs/compile-guarantee.md +++ b/docs/advanced-docs/compile-guarantee.md @@ -147,17 +147,17 @@ BUILD FAILURE — Attempt 1 ======================== Error 1: - File: api/YourProject.Api/Controllers/ProjectController.cs + File: dotnet/Controllers/ProjectEndpoints.cs Line: 47 - Error: CS0161 — 'ProjectController.GetByWorkspace': not all code paths return a value + Error: CS0161 — 'ProjectEndpoints.GetByWorkspace': not all code paths return a value Error 2: - File: api/YourProject.Data/Repositories/ProjectRepository.cs + File: dotnet/Repositories/ProjectRepository.cs Line: 89 - Error: CS1061 — 'DapperConnection' does not contain a definition for 'QuerySingleAsync' + Error: CS1061 — 'IDbConnection' does not contain a definition for 'QuerySingleAsync' AFFECTED FILES (full content): -[ProjectController.cs — full file content] +[ProjectEndpoints.cs — full file content] [ProjectRepository.cs — full file content] TASK: Fix only the specific errors listed above. Do not modify other files. diff --git a/docs/user/faq.md b/docs/user/faq.md index 1d79b1e1..32a331c3 100644 --- a/docs/user/faq.md +++ b/docs/user/faq.md @@ -15,16 +15,20 @@ No. StackAlchemist generates real source code that you own and modify. It's a ** ### What stack does StackAlchemist generate? V1 generates: -- **Backend:** .NET 10 Web API with Dapper ORM and PostgreSQL -- **Frontend:** Next.js 15 (App Router, TypeScript, Tailwind CSS) -- **Database:** PostgreSQL with Supabase auth -- **Dev Environment:** Docker Compose +- **Backend:** .NET 10 minimal API with Dapper and PostgreSQL (one project, not a solution) +- **Frontend:** Next.js 15 (App Router, TypeScript, Tailwind CSS) with a typed API client +- **Database:** PostgreSQL migration with UUID keys and row-level security enabled +- **Dev Environment:** Docker Compose + a multi-stage Dockerfile -Additional stacks are planned for V2. +No authentication flow is generated — the Supabase client and env slots ship preinstalled, the +wiring is yours. Additional stacks are planned for V2. ### Do I need an account to try it? -You can explore the interface and define your schema without an account. An account is required at the point of purchase and download. +Yes, for anything past reading. The marketing pages, this FAQ, and the docs are public, but both +build modes are gated: `/simple` and `/advanced` redirect a signed-out visitor to sign-in, so the +account comes before the schema wizard, not after it. Starting a build needs one too — including +a free Spark build, which is limited to 5 per calendar month. --- @@ -42,11 +46,13 @@ You'll see real-time progress updates throughout. Every Boilerplate and Infrastructure package is run through the actual .NET and Next.js compilers before delivery: -1. `dotnet build` is executed against the .NET API -2. `npm run build` is executed against the Next.js frontend +1. `dotnet restore` and `dotnet build --no-restore` are executed against the .NET API +2. `npm ci`, `npm run typecheck` and `next build` are executed against the Next.js frontend 3. If either fails, the error output is fed back to the LLM and the failing files are regenerated 4. This retry loop runs up to **3 times** 5. If the build is still failing after 3 attempts: **a full refund is initiated automatically, no questions asked** +6. On success the archive gets a `build-report.json` naming every command, its exit code, and + the verdict per half — the same verdict your delivery page shows This is a hard technical constraint in the delivery pipeline — not a marketing claim. @@ -74,9 +80,10 @@ Yes. The generated code has no licensing restrictions. Use it, sell it, scale it | Tier | What you get | |------|-------------| -| Blueprint ($299) | Architecture documents: schema, OpenAPI spec, SQL, data flow diagram | -| Boilerplate ($599) | Full compiled source code + Docker Compose | -| Infrastructure ($999) | Everything + AWS CDK, Helm charts, CI/CD pipeline, deployment runbook | +| Spark (free) | A fixed demo app running in your browser. Not built from your description, not downloadable. | +| Blueprint ($299) | Architecture documents: `schema.json` and `api-docs.md` (the CRUD contract) | +| Boilerplate ($599) | The generated source built from your schema, both halves compiled, + Docker Compose | +| Infrastructure ($999) | Everything + AWS CDK, Terraform, Helm chart, deployment runbook | See [Tiers and Pricing](./tiers-and-pricing) for full details. @@ -114,7 +121,7 @@ Yes. The Boilerplate tier generates a Docker Compose setup that runs on any mach ### What database does it use? -PostgreSQL for the primary data store. Supabase provides auth, real-time subscriptions, and storage on top of PostgreSQL. The generated code uses raw SQL via Dapper — not Entity Framework — so the database layer is lightweight and explicit. +PostgreSQL for the primary data store, reached with raw SQL via Dapper — not Entity Framework — so the database layer is lightweight and explicit. Supabase is the intended home for auth, real-time, and storage on top of that PostgreSQL: the client library and the env slots ship in the archive, but no auth code is generated for you. --- diff --git a/docs/user/getting-started.md b/docs/user/getting-started.md index 0a4d8dd8..bcb0b1cf 100644 --- a/docs/user/getting-started.md +++ b/docs/user/getting-started.md @@ -59,40 +59,67 @@ Use the entity wizard to define your schema step by step: | Tier | Name | Price | What You Receive | |------|------|-------|-----------------| -| **Tier 0** | Spark | Free | Live preview only, with schema canvas and no download | -| **Tier 1** | Blueprint | $299 | Architecture documents: ER schema, OpenAPI spec, SQL migration scripts, data flow diagram | -| **Tier 2** | Boilerplate | $599 | Everything in Blueprint + compiled .NET 10 API, Next.js 15 frontend, PostgreSQL schema, Docker Compose | -| **Tier 3** | Infrastructure | $999 | Everything in Boilerplate + AWS CDK stack, Helm charts, CI/CD pipeline, deployment runbook | +| **Tier 0** | Spark | Free | A fixed demo app that boots in your browser. Not built from your description, and not downloadable. | +| **Tier 1** | Blueprint | $299 | Architecture documents: `schema.json` and `api-docs.md` (the CRUD contract per entity) | +| **Tier 2** | Boilerplate | $599 | The generated source: .NET 10 minimal API, Next.js 15 frontend, PostgreSQL migration, Docker Compose — both halves compiled before delivery | +| **Tier 3** | Infrastructure | $999 | Everything in Boilerplate + AWS CDK stack, Terraform baseline, Helm chart, deployment runbook | > **All prices are one-time.** No subscriptions, no recurring fees. The generated code is entirely yours. +### About the free tier + +Spark exists so you can watch the machine run before paying for it. It renders one fixed +template — a small task tracker — with your project name substituted in, and makes **no AI +call at all**. That is why it is instant, free, and always boots. It is not a preview of the +code a paid tier would produce for you, it contains no .NET half, and it cannot be +downloaded. + +What Spark is genuinely good for: + +- Proving the end-to-end flow works in your browser before you pay (the in-browser runtime + needs a Chromium-based browser — Chrome, Edge, Arc) +- Seeing the delivery page and the embedded editor exactly as a paid run presents them +- Reading a real Next.js 15 App Router project file by file, and editing it live +- Modelling your entities on the Advanced Mode ER canvas — that schema is saved with the + build, so you can come back and buy a paid run against it + +You get **5 free builds per calendar month** per account. + --- ## Step 4: Generate Click **Synthesize** (or press `Ctrl + Enter` in Simple Mode). Watch real-time progress as StackAlchemist: -1. Parses and validates your schema -2. Applies Handlebars templates to the structure -3. Injects LLM-generated business logic into the holes -4. Runs the output through the compiler -5. Auto-corrects any build errors (up to 3 retries) -6. Packages everything into a ZIP archive +1. Renders the template tree for your stack and substitutes your project name +2. Sends your description or schema to the model and reconstructs the returned files into that tree +3. Runs `dotnet restore` and `dotnet build` against the API half +4. Runs `npm ci`, `npm run typecheck`, and `next build` against the frontend half +5. Auto-corrects any build errors and retries (up to 3 retries) +6. Writes `build-report.json` and packages everything into a ZIP archive Generation typically takes **30–90 seconds** depending on schema complexity. +A free Spark build skips all of that: it renders the fixed demo template and hands it to the +in-browser runtime, which is why it returns almost immediately. + --- ## Step 5: Download and Run -Extract the ZIP archive. Every Boilerplate and Infrastructure package includes a `README.md` with specific setup instructions, but the general pattern is: +Extract the ZIP archive. The root of a Boilerplate or Infrastructure package holds +`docker-compose.yml`, a multi-stage `Dockerfile`, `.env.example`, and `build-report.json` +(the record of the builds that were run against your code). The two halves live in +`dotnet/` and `nextjs/`. > **Prerequisite — configure `.env` before starting the stack.** The API will not > boot with an empty `.env`: after copying `.env.example`, open `.env` and fill in -> the required values (database credentials and, if your package uses Supabase -> auth, the keys from your Supabase dashboard). Every required key is documented -> in the generated `README.md`. Skipping this is the #1 cause of "the frontend -> loads but every API call fails" on a fresh download. +> the required values — at minimum `DATABASE_URL` / +> `ConnectionStrings__DefaultConnection`. The Supabase entries are placeholders for +> the client library that ships preinstalled in the frontend; no auth flow is +> generated, so leave them alone until you wire one up. Skipping the database +> values is the #1 cause of "the frontend loads but every API call fails" on a +> fresh download. ```bash # 1. Unzip and navigate @@ -114,10 +141,13 @@ Your dev environment will be running at: ## Common First Steps After Download -- Review `README.md` in the root — it has all env variable documentation +- Read `build-report.json` in the root — it names every command that was run against your + code, its exit code, and the per-half verdict - The `.env.example` file lists all required configuration keys -- Database migrations are in `/migrations` — they run automatically on first `docker compose up` -- Supabase auth keys need to be populated from your Supabase project dashboard +- Database migrations are in `dotnet/Migrations/` — `docker compose up` mounts that directory + into the Postgres init hook, so they run automatically on first boot +- API endpoints are mapped under `/api/v1/{entity}` and the OpenAPI document is served in + Development at `/openapi/v1.json` --- diff --git a/docs/user/simple-mode.md b/docs/user/simple-mode.md index f5344d1d..668563e8 100644 --- a/docs/user/simple-mode.md +++ b/docs/user/simple-mode.md @@ -20,10 +20,18 @@ Use [Advanced Mode](./advanced-mode) instead when you have a precise data model 1. Enter your application description in the prompt field on the home page 2. Click **Synthesize** or press `Ctrl + Enter` -3. StackAlchemist's LLM layer parses your description and produces a structured entity schema -4. You review the generated schema before committing to purchase -5. Select your tier and complete checkout -6. The generation pipeline runs and packages your output +3. A free Spark build starts immediately and lands you on the delivery page with a demo app + running in your browser. Spark is a fixed template, so nothing is interpreted at this step. +4. Choose a paid tier from that page and complete checkout +5. The generation pipeline reruns against your description — for Boilerplate and + Infrastructure the model reads your prose directly and emits the entities, repositories, + endpoints, migration, and typed frontend client in one pass +6. Both halves are compiled, then your archive is packed and made available + +> **There is no schema-review step in Simple Mode.** Your description goes to the model as +> written. If you want to see and edit the entity model before you buy, use +> [Advanced Mode](./advanced-mode) — its wizard is where the ER canvas lives, and the schema +> you build there is what the paid run generates from. --- diff --git a/docs/user/tiers-and-pricing.md b/docs/user/tiers-and-pricing.md index 582e8a0f..e5865832 100644 --- a/docs/user/tiers-and-pricing.md +++ b/docs/user/tiers-and-pricing.md @@ -1,18 +1,41 @@ # Tiers and Pricing -StackAlchemist uses a three-tier model. Each tier builds on the one before it. All prices are **one-time payments** — there are no subscriptions, seat licenses, or recurring fees. +StackAlchemist has three paid tiers plus a free one. All prices are **one-time payments** — there are no subscriptions, seat licenses, or recurring fees. --- ## Tier Overview -| | **Tier 1 — Blueprint** | **Tier 2 — Boilerplate** | **Tier 3 — Infrastructure** | -|---|---|---|---| -| **Price** | $299 | $599 | $999 | -| **Best For** | Planning, RFPs, architecture review | Developers starting a new product | Teams ready to deploy to production | -| **Compile Guarantee** | — | ✅ Yes | ✅ Yes | -| **Source Code** | — | ✅ Yes | ✅ Yes | -| **Cloud IaC** | — | — | ✅ Yes | +| | **Tier 0 — Spark** | **Tier 1 — Blueprint** | **Tier 2 — Boilerplate** | **Tier 3 — Infrastructure** | +|---|---|---|---|---| +| **Price** | Free | $299 | $599 | $999 | +| **Best For** | Seeing the workflow run | Planning, RFPs, architecture review | Developers starting a new product | Teams ready to deploy to production | +| **Built from your schema** | — | ✅ Yes | ✅ Yes | ✅ Yes | +| **Compile Guarantee** | — | — | ✅ Yes | ✅ Yes | +| **Source Code** | — | — | ✅ Yes | ✅ Yes | +| **Cloud IaC** | — | — | — | ✅ Yes | + +--- + +## Tier 0 — Spark + +**Free · 5 builds per calendar month** + +Spark runs the whole workflow so you can watch it work before paying. It renders one fixed +template — a small task tracker — with your project name substituted in, and makes **no AI +call**. That is why it is instant, costs nothing, and always boots. + +Be clear about what it is not: the app you see is **not generated from your description**, it +has no .NET half, and it cannot be downloaded. Code built from your own schema starts at +Blueprint. + +### What's included + +- A working Next.js 15 app running in your browser via StackBlitz WebContainers (Chromium-based browsers only) +- Every file open in the embedded editor — read it, edit it, re-run it +- The same delivery page and flow that a paid run uses +- In Advanced Mode: the entity wizard and live ER canvas, with your schema saved on the build + so you can return and buy a paid run against it --- @@ -24,11 +47,16 @@ The Blueprint tier delivers the architecture and planning artifacts for your sys ### What's included -- **Entity-Relationship Schema** (JSON) — The normalized data model derived from your description -- **OpenAPI 3.0 Specification** — Full API surface in machine-readable format, importable into Postman, Insomnia, or any API tooling -- **SQL Migration Scripts** — PostgreSQL DDL to create all tables, indexes, foreign keys, and constraints -- **Data Flow Diagram** — Visual representation of how data moves through the system -- **Architecture Decision Records (ADRs)** — Documented reasoning behind key technical choices +Two files, and they are the whole deliverable: + +- **`schema.json`** — the normalized entity-relationship model: every entity, every field with + its type, primary key, nullability and default, and the relationships between them +- **`api-docs.md`** — the CRUD contract in Markdown: a field table per entity and the five REST + endpoints it implies (`GET` list, `GET` by id, `POST`, `PUT`, `DELETE`), plus the + relationship list + +No code is generated at this tier, and no SQL — the migration is produced at Boilerplate. What +you get is the model, in a form you can hand to a person or paste into a design doc. ### Who it's for @@ -47,14 +75,24 @@ The Boilerplate tier delivers a complete, compilable source repository. This is ### What's included -**Everything in Blueprint, plus:** - -- **.NET 10 Web API** — Controllers, repositories, models, and service layer with Dapper ORM and PostgreSQL. Clean architecture with proper project separation. -- **Next.js 15 Frontend** — App Router, TypeScript strict mode, Tailwind CSS, and a type-safe API client generated from your schema. Authentication UI wired up. -- **PostgreSQL Schema + Migrations** — Ready to run via Docker or against any Postgres instance -- **Supabase Auth Integration** — Row Level Security policies scaffolded for your entities. Auth flows wired into the frontend (sign up, sign in, session management). -- **Docker Compose Dev Environment** — One command spins up the database, API, and frontend together -- **Compile Guarantee** — The 3-retry auto-correction loop. If the code doesn't compile, it doesn't ship. If it still fails after 3 retries, you get a full refund. +- **.NET 10 minimal API** — a single ASP.NET Core project: a record and DTO per entity, + an interface plus Dapper implementation per entity, and a CRUD endpoint group per entity, + all wired into `Program.cs`. Not a multi-project clean-architecture solution — one project, + organized by folder. +- **Next.js 15 frontend** — App Router, TypeScript strict mode, Tailwind CSS, a typed API + client and generated interfaces. A home page linking your entities; the screens are yours + to build. +- **PostgreSQL migration** — `001_initial_schema.sql` with UUID primary keys, foreign keys, + and row-level security enabled per table. Runs automatically on first `docker compose up`. +- **Docker Compose dev environment** — one command spins up Postgres, the API, and the + frontend, from a multi-stage Dockerfile with `web` and `engine` targets. +- **Compile Guarantee** — both halves are put through their real toolchains before the archive + is packed, with up to 3 correction attempts; if it still fails, the charge is refunded + automatically. The archive carries `build-report.json`, the record of every command. + +Not included, so you can plan for it: no authentication flow, no RLS policies (RLS is enabled +but unpolicied), no payments integration, and no README. See +[Understanding your output](./your-output) for the exact file tree. ### Who it's for @@ -73,14 +111,16 @@ The Infrastructure tier is everything in Boilerplate plus a complete cloud deplo ### What's included -**Everything in Boilerplate, plus:** +**Everything in Boilerplate, plus an `infra/` tree and a runbook:** -- **AWS CDK Stack (TypeScript)** — Lambda functions, RDS Aurora (PostgreSQL-compatible), S3, CloudFront distribution, IAM roles and policies — all as code. -- **Helm Charts** — Kubernetes deployment manifests for teams running container orchestration. -- **GitHub Actions CI/CD Pipeline** — Test, build, and deploy workflow that runs on every push to `main`. -- **Deployment Runbook** — Step-by-step instructions: account setup, secrets configuration, first deploy, monitoring setup, rollback procedure. -- **Environment Configuration Guide** — Every environment variable documented, with instructions for dev, staging, and production environments. -- **Cost Estimation Report** — AWS cost projections at 1k, 10k, and 100k monthly active users. +- **AWS CDK stack (TypeScript)** — VPC, ECS Fargate service behind an Application Load + Balancer, and an RDS PostgreSQL instance, deployed with an image URI you supply. +- **Terraform AWS baseline** — the same shape as HCL for teams that live in Terraform: ECS, + ALB, RDS, networking, and service logs. +- **Helm chart** — deployment, service, ingress, HPA, ConfigMap and Secret templates for + teams running Kubernetes. +- **`DEPLOYMENT.md` runbook** — preflight checklist, the exact CDK / Terraform / Helm command + sequences, secret handling, migration ordering, and rollback. ### Who it's for @@ -96,11 +136,13 @@ The Infrastructure tier is everything in Boilerplate plus a complete cloud deplo For Tier 2 and Tier 3, every generated package goes through the following before delivery: 1. Generated code is written to a temporary container -2. `dotnet build` is executed against the API project -3. `npm run build` is executed against the frontend -4. If either build fails, the LLM receives the error output and regenerates the failing files +2. `dotnet restore` then `dotnet build --no-restore` run against the API half +3. `npm ci`, `npm run typecheck` (`tsc --noEmit`) then `next build` run against the frontend half +4. If either half fails, the LLM receives the error output and regenerates the failing files 5. Steps 2–4 repeat up to **3 times** 6. If the build is still failing after 3 attempts: **a full refund is initiated automatically, no questions asked** +7. On success, `build-report.json` — every command, exit code, and per-half verdict — is written + into the archive, and the same verdict is shown on your delivery page This is a hard technical guarantee — not a marketing claim. Code that doesn't compile doesn't get delivered. diff --git a/docs/user/user-guide.md b/docs/user/user-guide.md index 9412b383..5bcc000f 100644 --- a/docs/user/user-guide.md +++ b/docs/user/user-guide.md @@ -20,7 +20,7 @@ ## Overview -StackAlchemist generates a complete, compilable source repository from a description of your SaaS idea. You describe what you're building — your entities, relationships, and API surface — and receive a full project archive with a .NET 10 Web API backend, Next.js 15 frontend, PostgreSQL migrations, Supabase auth integration, and Docker Compose dev environment. +StackAlchemist generates a complete, compilable source repository from a description of your SaaS idea. You describe what you're building — your entities, relationships, and API surface — and receive a full project archive with a .NET 10 Web API backend, Next.js 15 frontend, PostgreSQL migrations, the Supabase client preinstalled and env-wired, and a Docker Compose dev environment. There are two ways to describe your project: @@ -203,18 +203,18 @@ lands inside one of them. ``` infra/ ├── cdk/ -│ ├── bin/app.ts # CDK app entry -│ ├── lib/ -│ │ ├── database-stack.ts # RDS PostgreSQL -│ │ ├── api-stack.ts # Lambda + API Gateway -│ │ ├── frontend-stack.ts # S3 + CloudFront -│ │ └── auth-stack.ts # Cognito / Supabase wiring -│ └── package.json -├── .github/ -│ └── workflows/ -│ ├── ci.yml # Build + test pipeline -│ └── deploy.yml # CDK deploy on merge to main -└── DEPLOYMENT.md +│ ├── lib/-stack.ts # VPC, ECS Fargate + ALB, RDS PostgreSQL +│ ├── package.json +│ └── tsconfig.json +├── terraform/ +│ ├── main.tf # VPC, ECS, ALB, RDS, CloudWatch logs +│ ├── variables.tf +│ └── outputs.tf +└── helm/ + ├── Chart.yaml + ├── values.yaml + └── templates/ # deployment, service, ingress, HPA, config, secrets +DEPLOYMENT.md # preflight, deploy, rollback runbook ``` --- diff --git a/docs/user/your-output.md b/docs/user/your-output.md index 76c16b35..7759102b 100644 --- a/docs/user/your-output.md +++ b/docs/user/your-output.md @@ -1,91 +1,107 @@ # Understanding Your Output -When generation completes, you receive a ZIP archive containing your complete project. This page explains what's inside, how it's organized, and how to get it running. +When a **paid** generation completes, you receive a ZIP archive containing your project. This +page explains what's inside, how it's organized, and how to get it running. + +> The free Spark tier produces no archive. It renders a fixed demo project into your browser +> and nothing is downloadable at that tier — see [Getting Started](./getting-started#about-the-free-tier). --- ## Archive Structure -Every Boilerplate and Infrastructure package follows the same directory layout: +Every Boilerplate and Infrastructure package follows the same directory layout. There are +exactly two top-level source directories — `dotnet/` and `nextjs/` — because the generation +prompt rejects any file path outside them: ``` your-project-name/ -├── README.md ← Project-specific setup instructions ├── .env.example ← All required environment variables -├── docker-compose.yml ← Full-stack local dev environment -├── docker-compose.prod.yml ← Production-ready compose (Tier 3) +├── .dockerignore +├── .gitignore +├── build-report.json ← Every build command run against your code + verdict +├── docker-compose.yml ← db + engine + web, one command +├── Dockerfile ← Multi-stage, two targets: `web` and `engine` │ -├── api/ ← .NET 10 Web API -│ ├── YourProject.Api/ ← Controllers, middleware, program entry -│ ├── YourProject.Core/ ← Domain models, interfaces -│ ├── YourProject.Data/ ← Repositories, migrations, Dapper queries -│ └── YourProject.sln ← Solution file +├── dotnet/ ← .NET 10 minimal API (ONE project, not a solution) +│ ├── YourProject.csproj +│ ├── Program.cs ← Serilog, CORS, Dapper factory, DI + route registrations +│ ├── Models/ ← One record + Create…Request per entity +│ ├── Repositories/ ← Interface + Dapper implementation per entity +│ ├── Controllers/ ← One `…Endpoints.cs` per entity (MapGroup extensions) +│ ├── Infrastructure/ ← DbConnectionFactory +│ ├── Migrations/ +│ │ └── 001_initial_schema.sql +│ ├── appsettings.json +│ └── appsettings.Development.json │ -├── web/ ← Next.js 15 frontend +├── nextjs/ ← Next.js 15 frontend │ ├── src/ -│ │ ├── app/ ← App Router pages and layouts -│ │ ├── components/ ← UI components -│ │ ├── lib/ ← API client, utilities, types -│ │ └── types/ ← Generated TypeScript interfaces -│ ├── package.json -│ └── next.config.ts -│ -├── migrations/ ← Ordered SQL migration files -│ ├── 001_initial_schema.sql -│ ├── 002_indexes.sql -│ └── 003_rls_policies.sql +│ │ ├── app/ ← layout.tsx, page.tsx, globals.css +│ │ ├── lib/api.ts ← Typed API client +│ │ └── types/index.ts ← Generated TypeScript interfaces +│ ├── package.json ← Includes `typecheck` (tsc --noEmit) +│ ├── next.config.ts +│ ├── tailwind.config.ts +│ ├── postcss.config.mjs +│ ├── eslint.config.mjs +│ └── tsconfig.json │ -└── infra/ ← Tier 3 only: Cloud infrastructure +└── infra/ ← Tier 3 only: cloud infrastructure ├── cdk/ ← AWS CDK TypeScript stack - ├── helm/ ← Kubernetes Helm charts - └── .github/workflows/ ← GitHub Actions CI/CD + ├── terraform/ ← Terraform AWS baseline + └── helm/ ← Kubernetes chart ``` +Tier 3 also adds `DEPLOYMENT.md` at the root. + +> **Not in the archive:** there is no `README.md`, no solution file, no +> `docker-compose.prod.yml`, and no GitHub Actions workflow. The setup instructions are this +> page; the layout above is the whole of it. + --- ## The API Project (.NET 10) ### Project Structure -The API follows a clean architecture pattern with three layers: - -**`YourProject.Api`** — HTTP layer -- `Controllers/` — One controller per entity, with all specified endpoints -- `Program.cs` — Service registration, middleware pipeline, Supabase auth config -- `Middleware/` — Error handling, request logging +The API is a **single ASP.NET Core project** using minimal APIs — one `.csproj`, no solution +file, no Api/Core/Data split. Folders inside it separate concerns by namespace: -**`YourProject.Core`** — Domain layer -- `Models/` — C# record types for each entity -- `Interfaces/` — Repository and service interfaces -- `Enums/` — All enum types (status values, role types, etc.) +**`Models/`** — one file per entity: the `record` plus its `Create{Entity}Request` DTO +**`Repositories/`** — one file per entity: `I{Entity}Repository` plus a Dapper implementation +with `GetAllAsync`, `GetByIdAsync`, `CreateAsync`, `UpdateAsync`, `DeleteAsync` +**`Controllers/`** — one `{Entity}Endpoints.cs` per entity: a static class exposing +`Map{Entity}Endpoints(this WebApplication app)` that maps the CRUD `MapGroup` +**`Infrastructure/`** — `DbConnectionFactory` (Npgsql), injected everywhere a connection is needed +**`Program.cs`** — Serilog, CORS from `Cors:AllowedOrigins`, the connection factory, OpenAPI +in Development, and the generated DI + route registration lines -**`YourProject.Data`** — Data layer -- `Repositories/` — Dapper implementations for each entity -- `Migrations/` — EF-style migration runner (SQL files, not EF Core) -- `DbContext.cs` — Dapper connection factory +Endpoints are mapped at `/api/v1/{entity}s`. In Development the OpenAPI document is served at +`/openapi/v1.json` by `MapOpenApi()`. ### Naming Conventions Generated code follows standard .NET conventions: - Classes: PascalCase (`ProjectTask`, not `projectTask`) - Properties: PascalCase (`DueDate`, not `due_date`) -- Database columns: snake_case (via Dapper column mapping) -- Namespaces: `YourProjectName.Layer.Sublayer` +- Tables: lowercase plural of the entity (`Customer` → `customers`); columns snake_case +- Namespaces: `YourProjectName.Models`, `.Repositories`, `.Controllers`, `.Infrastructure` +- IDs are `Guid` in C# and `string` in TypeScript ### Authentication -API endpoints are secured via Supabase JWT validation. The `[Authorize]` attribute is applied automatically to all non-public endpoints. The `Program.cs` includes: - -```csharp -builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) - .AddJwtBearer(options => { - options.Authority = supabaseUrl; - options.TokenValidationParameters = new TokenValidationParameters { - ValidateIssuerSigningKey = true, - ValidAudience = "authenticated" - }; - }); -``` +**No authentication is generated.** The endpoints are open and there is no `[Authorize]` +attribute, no JWT bearer configuration, and no login flow. What ships is the groundwork: +`@supabase/supabase-js` is a dependency of the frontend, and `.env.example` plus +`docker-compose.yml` carry the `NEXT_PUBLIC_SUPABASE_*` and `SUPABASE_SERVICE_ROLE_KEY` +slots. The generated migration enables row-level security on every table +(`ALTER TABLE … ENABLE ROW LEVEL SECURITY`) but writes no policies, so a table is closed to +the anon role until you add them. + +Wiring auth is your first real task on top of the archive, and it is deliberate: which +provider you use, and whose claims your RLS policies trust, is not a decision worth guessing +on your behalf. --- @@ -93,22 +109,26 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) ### App Router Structure +The frontend is deliberately small — a working, typed shell over your API, not a finished +product UI: + ``` -src/app/ -├── layout.tsx ← Root layout with auth provider -├── page.tsx ← Landing/home page -├── (auth)/ ← Login, sign up, forgot password flows -│ ├── login/ -│ └── signup/ -├── (dashboard)/ ← Authenticated area -│ ├── layout.tsx ← Dashboard shell (sidebar, nav) -│ └── [entity]/ ← CRUD pages per entity -│ ├── page.tsx ← List view -│ ├── [id]/page.tsx ← Detail/edit view -│ └── new/page.tsx ← Create form -└── api/ ← Next.js API routes (thin proxy to .NET API) +nextjs/src/ +├── app/ +│ ├── layout.tsx ← Root layout +│ ├── page.tsx ← Home page, linking to each entity's endpoint +│ └── globals.css ← Tailwind entry +├── lib/ +│ └── api.ts ← Typed API client (apiFetch + per-entity helpers) +└── types/ + └── index.ts ← One interface + Create…Input type per entity ``` +There are **no route groups, no auth pages, and no per-entity CRUD pages**. Nothing is +scaffolded under `(auth)/` or `(dashboard)/`, and there is no Next.js API-route proxy — +`lib/api.ts` calls the .NET API directly at `NEXT_PUBLIC_API_URL`. Building the screens is +your work; the types, the client, and a build that passes `tsc --noEmit` are ours. + ### Generated API Client A fully typed API client is generated at `nextjs/src/lib/api.ts` (the frontend half of @@ -131,7 +151,7 @@ export const api = { ### TypeScript Types -All entity interfaces are generated at `src/types/`: +All entity interfaces are generated in `nextjs/src/types/index.ts`: ```typescript export interface Project { @@ -155,20 +175,20 @@ export interface CreateProjectInput { ## Migrations -SQL migrations are in `/migrations`, numbered sequentially. They run automatically on `docker compose up` via the init script. +The schema ships as a single file, `dotnet/Migrations/001_initial_schema.sql`: the +`uuid-ossp` extension, one `CREATE TABLE` per entity with UUID primary keys and foreign keys, +and `ALTER TABLE … ENABLE ROW LEVEL SECURITY` on each. + +`docker-compose.yml` mounts that directory read-only into the Postgres container's +`/docker-entrypoint-initdb.d`, so it runs **once, on first boot of an empty volume**. Drop the +volume (`docker compose down -v`) to re-run it. **To run manually:** ```bash -# Connect to the database -psql postgresql://postgres:password@localhost:5432/yourdb - -# Run a specific migration -\i migrations/001_initial_schema.sql +psql postgresql://postgres:postgres@localhost:5432/yourdb -f dotnet/Migrations/001_initial_schema.sql ``` -Each migration file is idempotent — it checks for existing objects before creating them. - --- ## Environment Variables @@ -177,18 +197,27 @@ Copy `.env.example` to `.env` and fill in the required values: ```env # Database -DATABASE_URL=postgresql://postgres:password@localhost:5432/yourdb +DATABASE_URL=postgresql://postgres:postgres@localhost:54322/yourproject +ConnectionStrings__DefaultConnection=${DATABASE_URL} + +# .NET engine +ASPNETCORE_ENVIRONMENT=Development +ASPNETCORE_URLS=http://+:5000 + +# Next.js frontend +NEXT_PUBLIC_API_URL=http://localhost:5000 -# Supabase (get these from your Supabase project dashboard) +# Supabase — placeholders for the preinstalled client library. Nothing reads +# these until you wire up auth yourself. NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key SUPABASE_SERVICE_ROLE_KEY=your-service-role-key - -# API -API_BASE_URL=http://localhost:5000 -NEXT_PUBLIC_API_URL=http://localhost:5000 ``` +`docker compose` supplies its own database credentials for the containerised stack +(`postgres:postgres` against the `db` service); the `DATABASE_URL` above is for running the +API on the host. + --- ## Running Locally @@ -197,7 +226,8 @@ NEXT_PUBLIC_API_URL=http://localhost:5000 - Docker Desktop - (Optional) .NET 10 SDK if you want to run the API outside Docker -- (Optional) Node.js 20+ if you want to run the frontend outside Docker +- (Optional) Node.js 20+ if you want to run the frontend outside Docker (the images use + Node 24) ### Quick Start @@ -214,19 +244,25 @@ Services will be available at: |---------|-----| | Frontend | http://localhost:3000 | | API | http://localhost:5000 | -| API Swagger | http://localhost:5000/swagger | +| OpenAPI document (Development only) | http://localhost:5000/openapi/v1.json | | PostgreSQL | localhost:5432 | +The `Dockerfile` has two targets and `docker-compose.yml` builds both from the project root: +`--target web` (Next.js standalone output on Node 24 Alpine) and `--target engine` +(`dotnet publish` onto the ASP.NET 10 runtime image). Both targets are built on every change +to the template in our own CI, so `docker compose up --build` is a supported first command, +not a hopeful one. + ### Running Services Individually ```bash # API only -cd api -dotnet run --project YourProject.Api +cd dotnet +dotnet run # Frontend only -cd web -npm install +cd nextjs +npm ci npm run dev ``` @@ -234,20 +270,19 @@ npm run dev ## Blueprint-Only Output (Tier 1) -If you purchased the Blueprint tier, your archive contains: +The Blueprint tier is documentation, not code. Its archive contains exactly two files: ``` your-project-name/ -├── schema.json ← Full entity-relationship schema -├── openapi.yaml ← OpenAPI 3.0 spec (importable into Postman/Insomnia) -├── migrations/ ← SQL DDL scripts -├── data-flow-diagram.md ← Mermaid diagram of data flows -└── adrs/ ← Architecture Decision Records - ├── 001-database-choice.md - ├── 002-api-pattern.md - └── 003-auth-approach.md +├── schema.json ← Your entity-relationship schema, normalized and pretty-printed +└── api-docs.md ← The CRUD contract: fields, types, keys, and the five + REST endpoints per entity, plus the relationship list ``` +Nothing in a Blueprint is compiled, so a Blueprint carries no `build-report.json` and is not +sold under the Compile Guarantee. If you need the SQL, the migration is generated at +Boilerplate — the Blueprint gives you the model to write it from. + --- ## Related Docs diff --git a/src/StackAlchemist.Web/src/app/about/page.tsx b/src/StackAlchemist.Web/src/app/about/page.tsx index 2241b4e0..b51fc4f5 100644 --- a/src/StackAlchemist.Web/src/app/about/page.tsx +++ b/src/StackAlchemist.Web/src/app/about/page.tsx @@ -215,27 +215,31 @@ export default function AboutPage() {

V1 Stack

+ {/* Every row below is a claim about what the engine emits, so each one is + sourced from the template tree or the generation prompt — not from what the + stack could plausibly include. Keep it in substance identical to the tier + lists on /pricing; the two pages disagreeing is how a false claim survives. */}
{[ { tech: ".NET 10 Web API", role: "Backend", - desc: "RESTful API with controllers, repository pattern, model validation, and Entity Framework-ready data access. Clean architecture, proper layering.", + desc: "Minimal-API endpoint groups with a Dapper repository per entity over Npgsql. One real file each for the model, the repository and the CRUD endpoints.", }, { tech: "Next.js 15", role: "Frontend", - desc: "App Router, TypeScript strict mode, Tailwind CSS. Type-safe API client generated from your schema. No config required to run.", + desc: "App Router, TypeScript strict mode, Tailwind CSS. Type-safe API client generated from your schema. Copy .env.example and it runs.", }, { tech: "PostgreSQL", role: "Database", - desc: "Schema migrations scripted from your entity definitions. Foreign keys, indexes, and constraints modeled from your relationships.", + desc: "Schema migrations scripted from your entity definitions. UUID primary keys and foreign key constraints modeled from your relationships.", }, { tech: "Supabase", - role: "Auth + Storage", - desc: "Row Level Security policies scaffolded for your entities. Auth flows wired into the frontend. Ready for production the moment you deploy.", + role: "Preinstalled", + desc: "The client library and its environment variables ship wired through Docker Compose. The migration enables row-level security — the policies and the auth flows are yours to write.", }, { tech: "Docker Compose", @@ -245,7 +249,7 @@ export default function AboutPage() { { tech: "AWS CDK (Infra tier)", role: "Cloud", - desc: "Lambda, RDS, S3, CloudFront — all as TypeScript infrastructure code. Deploy to production with a single CDK deploy command.", + desc: "A TypeScript stack — VPC, ECS Fargate behind an Application Load Balancer, RDS PostgreSQL. Terraform and Helm equivalents ship beside it.", }, ].map((item) => (
diff --git a/src/StackAlchemist.Web/src/app/advanced/steps/step-tier.tsx b/src/StackAlchemist.Web/src/app/advanced/steps/step-tier.tsx index c17192ab..cc915469 100644 --- a/src/StackAlchemist.Web/src/app/advanced/steps/step-tier.tsx +++ b/src/StackAlchemist.Web/src/app/advanced/steps/step-tier.tsx @@ -13,12 +13,14 @@ export function StepTier({ selectedTier, setSelectedTier, quota }: { }) { const tiers: { id: Tier; name: string; price: string; items: string[]; recommended?: boolean; isFree?: boolean }[] = [ { + // Tier 0 renders a fixed demo template with no LLM call — it is not built + // from the schema in this wizard. Say so here, where the choice is made. id: 0, name: "SPARK", price: "Free", isFree: true, - items: ["ER Canvas", "Generated Next.js UI (view-only)", "Live Micro IDE Preview"], + items: ["Fixed demo app — not your schema", "Runs live in your browser", "No download"], }, - { id: 1, name: "BLUEPRINT", price: "$299", items: ["Schema JSON", "API Specifications", "SQL Scripts"] }, - { id: 2, name: "BOILERPLATE", price: "$599", items: ["Blueprint features", "Full Source Code", "Compile Guarantee"], recommended: true }, - { id: 3, name: "INFRASTRUCTURE", price: "$999", items: ["Boilerplate features", "AWS CDK Stack", "Helm Charts", "Deployment Runbook"] }, + { id: 1, name: "BLUEPRINT", price: "$299", items: ["schema.json", "api-docs.md (CRUD contract)", "No code"] }, + { id: 2, name: "BOILERPLATE", price: "$599", items: ["Full source from your schema", "Both halves compiled", "build-report.json"], recommended: true }, + { id: 3, name: "INFRASTRUCTURE", price: "$999", items: ["Boilerplate features", "AWS CDK + Terraform", "Helm Chart", "Deployment Runbook"] }, ]; return (
diff --git a/src/StackAlchemist.Web/src/app/faq/page.tsx b/src/StackAlchemist.Web/src/app/faq/page.tsx index fbd8b763..e863578b 100644 --- a/src/StackAlchemist.Web/src/app/faq/page.tsx +++ b/src/StackAlchemist.Web/src/app/faq/page.tsx @@ -92,8 +92,8 @@ export default function FaqPage() { Still have questions?

- Dig into the docs or just start building — the free Spark tier - lets you explore the schema workflow end-to-end. + Dig into the docs or just start building — the free Spark tier runs + the workflow end-to-end and boots a demo app in your browser.

diff --git a/src/StackAlchemist.Web/src/app/generate/[id]/components/free-tier-panel.tsx b/src/StackAlchemist.Web/src/app/generate/[id]/components/free-tier-panel.tsx index 2a44f6d6..19805fd2 100644 --- a/src/StackAlchemist.Web/src/app/generate/[id]/components/free-tier-panel.tsx +++ b/src/StackAlchemist.Web/src/app/generate/[id]/components/free-tier-panel.tsx @@ -23,10 +23,10 @@ function SchemaFallbackView({ generation, onUpgrade }: { generation: Generation;
-

Your Architecture is Ready

+

Your Build Finished

- The live IDE preview will be available once the engine populates the - preview files. In the meantime, here's your generated schema: + The in-browser demo app could not be attached to this build. If you modelled + entities in Advanced Mode, here is the schema this row is carrying:

@@ -98,10 +98,11 @@ function SchemaFallbackView({ generation, onUpgrade }: { generation: Generation; {/* Upgrade CTA */}
-

Want the full downloadable codebase?

+

Want the downloadable codebase?

- Upgrade to Blueprint ($299), Boilerplate ($599), or Infrastructure ($999) to get the full - source code — compiled, tested, and yours forever. + Blueprint ($299) delivers the schema and API contract as documents. Boilerplate ($599) + and Infrastructure ($999) deliver the source built from your schema, compiled on both + halves before it ships — and yours forever.

diff --git a/src/StackAlchemist.Web/src/app/pricing/page.tsx b/src/StackAlchemist.Web/src/app/pricing/page.tsx index 3e62b3b0..03c043df 100644 --- a/src/StackAlchemist.Web/src/app/pricing/page.tsx +++ b/src/StackAlchemist.Web/src/app/pricing/page.tsx @@ -13,19 +13,23 @@ export const metadata: Metadata = { alternates: { canonical: "/pricing" }, }; +// Spark is a fixed demo, not a generated codebase: the engine renders the +// V0-Spark-NextJs template with your project name substituted and makes no LLM +// call at all (GenerationOrchestrator.RenderTier0Preview). Copy here describes +// exactly that — the run, not an imagined generation. const freeTier = { id: "spark", name: "Spark", - tagline: "Try Before You Buy", + tagline: "Take the Workflow for a Lap", price: "Free", description: - "Describe your SaaS, watch the architecture come alive, and explore the generated Next.js frontend in a live embedded IDE — all without spending a cent. Code is view-only; upgrade to download.", + "Run the whole pipeline before you pay a cent: describe your product, watch the build, and land on a delivery page with a real Next.js 15 app already running in your browser. Spark hands everyone the same fixed demo app — a working task tracker, renamed to your project — so it is instant, costs nothing, and always boots.", items: [ - "Entity-Relationship Canvas", - "AI Schema Extraction", - "Generated Next.js Frontend (view-only)", - "Live Preview in Micro IDE", - "Architecture Overview", + "5 free builds a month — no card, ever", + "A real Next.js 15 app running in-browser (StackBlitz WebContainers)", + "Every file open in the embedded editor — read it, edit it, re-run it", + "Entity wizard with a live ER canvas (Advanced Mode)", + "The same delivery flow the paid tiers use", ], highlight: false, cta: "Start Free", @@ -40,13 +44,13 @@ const tiers = [ tagline: "The Architecture", price: 299, description: - "Everything you need to understand the system before a single line of code is written. The full schema, API surface, and SQL scripts — delivered as precise technical documentation.", + "Your data model and API contract, written down. No code — the documents you hand to a stakeholder, drop into an RFP, or give to the engineer who is going to build it.", items: [ - "Entity-Relationship Schema (JSON)", - "API Specification (OpenAPI 3.0)", - "SQL Migration Scripts", - "Data Flow Diagram", - "Architecture Decision Records", + "schema.json — the normalized entity-relationship model", + "api-docs.md — the CRUD contract, endpoint by endpoint", + "Every field with its type, key, nullability and default", + "The relationship map between entities", + "Stack-agnostic — nothing in it assumes .NET or Next.js", ], highlight: false, cta: "Get the Blueprint", @@ -59,16 +63,15 @@ const tiers = [ tagline: "The Foundation", price: 599, description: - "A complete, compiled, download-ready source repository. Every file. Every layer. Guaranteed to build on the first try — or we correct it automatically, up to three times.", + "A complete, download-ready source repository shaped around your schema. Both halves are put through their real compilers before it ships — or we correct and rebuild, up to three times.", items: [ - "Everything in Blueprint", - ".NET 10 Web API (Controllers, Repos, Models)", - "Next.js 15 Frontend (App Router, TypeScript)", - "PostgreSQL Schema + Migrations", - "Supabase Auth Integration", - "Stripe Payments Integration", - "Docker Compose Dev Environment", - "Compile Guarantee (3-retry auto-correction)", + ".NET 10 minimal API — records, Dapper repositories, CRUD endpoints per entity", + "Next.js 15 frontend (App Router, TypeScript) with a typed API client", + "PostgreSQL migration — UUID keys, foreign keys, row-level security enabled", + "Docker Compose + multi-stage Dockerfile (web and engine targets)", + "Supabase client and env wiring preinstalled (auth flows are yours to write)", + "Compile Guarantee — .NET and Next.js both built before delivery", + "build-report.json — every command, exit code and verdict, in the archive", ], highlight: true, cta: "Get the Boilerplate", @@ -81,15 +84,13 @@ const tiers = [ tagline: "The Kingdom", price: 999, description: - "Production-ready from day one. Cloud infrastructure as code, Kubernetes manifests, and a deployment runbook so complete you could hand it to a junior engineer and disappear.", + "The Boilerplate repository plus the infrastructure to put it in a cloud. Two IaC paths, a Kubernetes chart, and a runbook complete enough to hand to a junior engineer.", items: [ "Everything in Boilerplate", - "AWS CDK Stack (Lambda, RDS, S3, CloudFront)", - "Helm Charts for Kubernetes", - "CI/CD Pipeline (GitHub Actions)", - "Deployment Runbook (step-by-step)", - "Environment Configuration Guide", - "Cost Estimation Report", + "AWS CDK stack (VPC, ECS Fargate, ALB, RDS PostgreSQL)", + "Terraform AWS baseline (ECS, ALB, RDS, networking, logs)", + "Helm chart — deployment, service, ingress, HPA, config and secrets", + "DEPLOYMENT.md runbook — preflight, deploy, rollback", ], highlight: false, cta: "Get the Infrastructure", @@ -101,7 +102,15 @@ const tiers = [ const faqs = [ { q: "What does the free Spark tier include?", - a: "Spark generates the Next.js frontend for your described SaaS and opens it in a live embedded IDE so you can see the running app. The code is view-only — you can't download it — but you can explore every file and interact with the live preview. Upgrade to any paid tier to get the full downloadable codebase.", + a: "Spark runs the full workflow — describe your product, watch the build, land on a delivery page — and hands back a working Next.js 15 app that boots and runs inside your browser via StackBlitz WebContainers. You get five free builds a month, no card required.", + }, + { + q: "Is the Spark app generated from my description?", + a: "No, and we would rather say so than let you find out. Spark renders one fixed demo app — a small task tracker — with your project name substituted in. It makes no AI call, which is why it is free and always boots. Code generated from your own schema starts at Blueprint.", + }, + { + q: "Then what is Spark actually for?", + a: "Seeing the machine run before you pay for it. You confirm the flow works in your browser, see exactly what the delivery page looks like, read a real Next.js 15 App Router project file by file, and — in Advanced Mode — model your entities on the ER canvas and keep that schema for a paid run later.", }, { q: "Is this a subscription?", @@ -109,7 +118,7 @@ const faqs = [ }, { q: "What is the Compile Guarantee?", - a: "Your generated Boilerplate or Infrastructure package is run through dotnet build before delivery. If it fails, an automatic correction loop re-runs the LLM with the compiler output and retries — up to three times. If it still fails, you get a full refund.", + a: "Before a Boilerplate or Infrastructure archive is packed, both halves are put through their real toolchains: dotnet restore and dotnet build for the API, npm ci, tsc --noEmit and next build for the frontend. If either fails, the compiler output goes back to the LLM and the failing files are regenerated — up to three times, after which the charge is refunded automatically. The archive ships a build-report.json recording every command and its verdict.", }, { q: "What stack does V1 generate?", @@ -125,28 +134,32 @@ const faqs = [ }, { q: "What if my idea doesn't fit the V1 stack?", - a: "The Blueprint tier is stack-agnostic — schema, API specs, and SQL are transferable to any stack. Additional templates are on the roadmap.", + a: "The Blueprint tier is stack-agnostic — the schema and the CRUD contract transfer to any stack you like. Additional templates are on the roadmap.", }, ]; +// Every row here is a claim about what the engine actually emits. Sources: +// Spark = V0-Spark-NextJs (fixed template, no LLM call); Blueprint = +// Tier1ArtifactBuilder (schema.json + api-docs.md, and nothing else); +// Boilerplate = the V1-DotNet-NextJs tree filled by the generation prompt; +// Infrastructure = that tree plus Tier3-Infrastructure. Do not add a row you +// cannot point at a rendered file for. const comparison = [ - { label: "Schema JSON + ER Diagram", spark: true, bp: true, bb: true, infra: true }, - { label: "AI Schema Extraction", spark: true, bp: true, bb: true, infra: true }, - { label: "Generated Next.js Frontend", spark: true, bp: false, bb: true, infra: true }, - { label: "Live Micro IDE Preview", spark: true, bp: false, bb: false, infra: false }, - { label: "Code Download", spark: false, bp: true, bb: true, infra: true }, - { label: "OpenAPI Specification", spark: false, bp: true, bb: true, infra: true }, - { label: "SQL Migration Scripts", spark: false, bp: true, bb: true, infra: true }, - { label: ".NET 10 Web API Source", spark: false, bp: false, bb: true, infra: true }, - { label: "Supabase Auth Integration", spark: false, bp: false, bb: true, infra: true }, - { label: "Stripe Payments Integration", spark: false, bp: false, bb: true, infra: true }, - { label: "Docker Compose Environment", spark: false, bp: false, bb: true, infra: true }, - { label: "Compile Guarantee (3-retry)", spark: false, bp: false, bb: true, infra: true }, - { label: "AWS CDK Infrastructure Stack", spark: false, bp: false, bb: false, infra: true }, - { label: "Helm Charts (Kubernetes)", spark: false, bp: false, bb: false, infra: true }, - { label: "GitHub Actions CI/CD", spark: false, bp: false, bb: false, infra: true }, - { label: "Deployment Runbook", spark: false, bp: false, bb: false, infra: true }, - { label: "Cost Estimation Report", spark: false, bp: false, bb: false, infra: true }, + { label: "Live demo app running in-browser", spark: true, bp: false, bb: false, infra: false }, + { label: "Entity wizard + live ER canvas", spark: true, bp: true, bb: true, infra: true }, + { label: "Built from your own schema", spark: false, bp: true, bb: true, infra: true }, + { label: "Downloadable archive", spark: false, bp: true, bb: true, infra: true }, + { label: "Schema + API contract documents", spark: false, bp: true, bb: false, infra: false }, + { label: ".NET 10 minimal API source", spark: false, bp: false, bb: true, infra: true }, + { label: "Next.js 15 frontend + typed API client", spark: false, bp: false, bb: true, infra: true }, + { label: "PostgreSQL migration (UUID keys, RLS)", spark: false, bp: false, bb: true, infra: true }, + { label: "Docker Compose + Dockerfile", spark: false, bp: false, bb: true, infra: true }, + { label: "Compile Guarantee (both halves built)", spark: false, bp: false, bb: true, infra: true }, + { label: "build-report.json in the archive", spark: false, bp: false, bb: true, infra: true }, + { label: "AWS CDK stack", spark: false, bp: false, bb: false, infra: true }, + { label: "Terraform AWS baseline", spark: false, bp: false, bb: false, infra: true }, + { label: "Helm chart (Kubernetes)", spark: false, bp: false, bb: false, infra: true }, + { label: "Deployment runbook", spark: false, bp: false, bb: false, infra: true }, ]; @@ -217,8 +230,9 @@ export default function PricingPage() { OWN IT FOREVER.

- Start with a free live preview in our micro IDE. No credit card required. - Upgrade to download the full codebase — yours to keep, modify, and ship. + Run the workflow free — a demo app boots in your browser, no credit card. + Pay once when you want the codebase generated from your own schema, downloaded, + and yours to keep, modify, and ship.

@@ -246,7 +260,7 @@ export default function PricingPage() {

Spark

- Free Preview + Free Demo Run $0

@@ -261,10 +275,12 @@ export default function PricingPage() { ))} -
- - - Code is view-only in the IDE. Download requires a paid tier. +
+ + + The demo app is the same for everyone and is not generated from your + description. There is no download and no .NET half at this tier — code + built from your schema starts at Blueprint.
@@ -281,7 +297,7 @@ export default function PricingPage() { > Start Free → -

Select Spark in the tier chooser

+

5 builds a month · no card

@@ -391,6 +407,12 @@ export default function PricingPage() { +

+ Boilerplate and Infrastructure ship the code instead of the Blueprint documents: + your schema arrives as the SQL migration, the C# records, and the TypeScript + types rather than as schema.json. Spark's + in-browser app is a fixed demo, not a build of your schema. +

@@ -426,7 +448,8 @@ export default function PricingPage() { Ready to transmute your idea?

- Start free with Spark — no credit card, no commitment. Upgrade when you're ready to own the code. + Watch the machine run first — Spark is free, instant, and needs no card. Pay when + you want it pointed at your own schema.

Generation ID

{generationId}

-

Keep this page open — your live preview opens automatically.

+

Keep this page open — your demo app opens automatically.

)} diff --git a/src/StackAlchemist.Web/src/app/simple/page.tsx b/src/StackAlchemist.Web/src/app/simple/page.tsx index 9d04ea7a..94b00651 100644 --- a/src/StackAlchemist.Web/src/app/simple/page.tsx +++ b/src/StackAlchemist.Web/src/app/simple/page.tsx @@ -5,7 +5,7 @@ import SimpleModePage from "./SimpleModePage"; export const metadata: Metadata = { title: "Simple Mode — Natural-Language SaaS Generator", description: - "Describe your product in plain English. StackAlchemist extracts the schema and hands back a compiled .NET + Next.js repo.", + "Describe your product in plain English. Your free Spark build boots a demo app in the browser; paid tiers hand back a compiled .NET + Next.js repo built from your schema.", alternates: { canonical: "/simple" }, }; diff --git a/src/StackAlchemist.Web/src/components/home/pricing-section.tsx b/src/StackAlchemist.Web/src/components/home/pricing-section.tsx index f9804b6b..da9f21c6 100644 --- a/src/StackAlchemist.Web/src/components/home/pricing-section.tsx +++ b/src/StackAlchemist.Web/src/components/home/pricing-section.tsx @@ -1,6 +1,9 @@ import Link from "next/link"; import { Check } from "lucide-react"; +// Keep these lists identical in substance to /pricing — both are claims about +// what the engine emits, and the two pages disagreeing is how a false one +// survives. See the sourcing note above `comparison` in app/pricing/page.tsx. const PRICING_TIERS = [ { id: "blueprint", @@ -8,13 +11,13 @@ const PRICING_TIERS = [ name: "Blueprint", tagline: "The Architecture", price: 299, - description: "The full schema, API surface, and SQL scripts — delivered as precise technical documentation. Stack-agnostic.", + description: "Your data model and API contract, written down. No code — the documents you hand to a stakeholder or the engineer who will build it. Stack-agnostic.", features: [ - "Entity-Relationship Schema (JSON)", - "API Specification (OpenAPI 3.0)", - "SQL Migration Scripts", - "Data Flow Diagram", - "Architecture Decision Records", + "schema.json — normalized entity-relationship model", + "api-docs.md — the CRUD contract per entity", + "Types, keys, nullability and defaults per field", + "The relationship map between entities", + "Transfers to any stack you like", ], featured: false, href: "/advanced?step=4&tier=1", @@ -25,15 +28,14 @@ const PRICING_TIERS = [ name: "Boilerplate", tagline: "The Foundation", price: 599, - description: "A complete, compiled, download-ready source repository. Guaranteed to build on first try — or we auto-correct up to three times.", + description: "A download-ready source repository shaped around your schema. Both halves go through their real compilers before it ships — or we correct and rebuild, up to three times.", features: [ - "Everything in Blueprint", - ".NET 10 Web API (Controllers, Repos)", - "Next.js 15 Frontend (App Router, TS)", - "PostgreSQL Schema + Migrations", - "Supabase Auth Integration", - "Docker Compose Dev Environment", - "Compile Guarantee (3-retry loop)", + ".NET 10 minimal API (records, Dapper repos, endpoints)", + "Next.js 15 frontend (App Router, TS) + typed client", + "PostgreSQL migration — UUID keys, FKs, RLS enabled", + "Docker Compose + multi-stage Dockerfile", + "Compile Guarantee — .NET and Next.js both built", + "build-report.json with every command and verdict", ], featured: true, href: "/advanced?step=4&tier=2", @@ -44,15 +46,13 @@ const PRICING_TIERS = [ name: "Infrastructure", tagline: "The Kingdom", price: 999, - description: "Production-ready from day one. Cloud IaC, Kubernetes manifests, and a deployment runbook so complete a junior engineer could ship it.", + description: "The Boilerplate repository plus the infrastructure to put it in a cloud. Two IaC paths, a Kubernetes chart, and a runbook a junior engineer could ship from.", features: [ "Everything in Boilerplate", - "AWS CDK Stack (Lambda, RDS, S3)", - "Helm Charts for Kubernetes", - "CI/CD Pipeline (GitHub Actions)", - "Deployment Runbook (step-by-step)", - "Environment Configuration Guide", - "Cost Estimation Report", + "AWS CDK stack (VPC, ECS Fargate, ALB, RDS)", + "Terraform AWS baseline", + "Helm chart (deployment, service, ingress, HPA)", + "DEPLOYMENT.md runbook — preflight, deploy, rollback", ], featured: false, href: "/advanced?step=4&tier=3", diff --git a/src/StackAlchemist.Web/src/lib/faq-manifest.ts b/src/StackAlchemist.Web/src/lib/faq-manifest.ts index 73f6bcc2..4023f1ce 100644 --- a/src/StackAlchemist.Web/src/lib/faq-manifest.ts +++ b/src/StackAlchemist.Web/src/lib/faq-manifest.ts @@ -32,7 +32,7 @@ export const FAQS = [ category: "general", question: "What is StackAlchemist?", answer: - "StackAlchemist is an AI SaaS generator that turns natural-language product descriptions into fully compiled, production-ready full-stack code repositories. The output includes a .NET 10 Web API, a Next.js 15 frontend, a PostgreSQL schema, Supabase auth, Docker Compose, and optional AWS CDK infrastructure — all guaranteed to build on delivery.", + "StackAlchemist is an AI SaaS generator that turns natural-language product descriptions into compiled, download-ready full-stack code repositories. The output includes a .NET 10 minimal API, a Next.js 15 frontend, a PostgreSQL migration, Docker Compose, and optional AWS CDK, Terraform and Helm infrastructure — with both halves built before delivery.", }, { category: "general", @@ -82,7 +82,7 @@ export const FAQS = [ category: "pricing", question: "What are the pricing tiers?", answer: - "Spark is a free tier for exploring schemas. Blueprint ($299) delivers architecture documents — schema, OpenAPI spec, SQL, and data-flow diagrams. Boilerplate ($599) adds the full compiled source plus Docker Compose. Infrastructure ($999) includes everything plus AWS CDK, Helm charts, a CI/CD pipeline, and a deployment runbook.", + "Spark is free and runs the workflow end to end, handing back a fixed demo app that boots in your browser — it is not generated from your description. Blueprint ($299) delivers the architecture documents: schema.json and a CRUD API contract. Boilerplate ($599) delivers the generated source itself, compiled on both halves before delivery, with Docker Compose. Infrastructure ($999) adds AWS CDK, Terraform, a Helm chart, and a deployment runbook.", }, { category: "pricing", @@ -101,7 +101,7 @@ export const FAQS = [ category: "output", question: "What stack does StackAlchemist generate?", answer: - "The V1 stack is a .NET 10 Web API with Dapper and PostgreSQL on the backend, Next.js 15 with the App Router and Tailwind CSS on the frontend, Supabase for auth and storage, and Docker Compose for local development. Infrastructure tier adds AWS CDK infrastructure-as-code.", + "The V1 stack is a .NET 10 minimal API with Dapper and PostgreSQL on the backend, Next.js 15 with the App Router and Tailwind CSS on the frontend, and Docker Compose for local development. The Supabase client and its env slots ship preinstalled but no auth flow is generated. Infrastructure tier adds AWS CDK, Terraform and a Helm chart.", }, { category: "output",