# QC Text Builder (Go) Milestone 2 status: - bootstrap app/server/config - Quick Creator client contracts (Bearer token only) - AI template sync endpoint - onboarding/discovery endpoint with local manifest flattening - site build flow via `POST /sites` using local manifest + own text (`content.aiData`) - build persistence in memory incl. `qcJobId`, `qcSiteId`, `previewUrl`, `editorUrl` - build polling (`POST /api/site-builds/{id}/poll`) and background polling supervisor - strict MVP scope: no ACP login flow, no DCM/EFL, no image payload handling ## Run 1. Set env vars: - `HTTP_ADDR=:8080` - `QC_BASE_URL=https://qc-api.yggdrasil.dev-mono.net/api/v1` - `QC_TOKEN=` 2. Start: - `go run ./cmd/qctextbuilder` ## API (Milestone 3) - `GET /healthz` - `POST /api/templates/sync` - `GET /api/templates` - `GET /api/templates/{id}` - `POST /api/templates/{id}/onboard` - `PUT /api/templates/{id}/fields` - `POST /api/site-builds` - `GET /api/site-builds/{id}` - `POST /api/site-builds/{id}/poll` - `POST /api/site-builds/{id}/fetch-editor-url` Build request payload (`POST /api/site-builds`) expects: - `templateId` (AI template only, onboarded/reviewed) - `requestName` - `globalData` (`companyName`, `email`, `username` required; all other documented fields optional) - `fieldValues` keyed by manifest paths (`section.keyName`) Documented `globalData` scope supported by UI/API mapping: - `companyName`, `businessType`, `username`, `email`, `phone` - `orgNumber`, `startDate`, `mission`, `descriptionShort`, `descriptionLong`, `siteLanguage` - `address.line1`, `address.line2`, `address.city`, `address.region`, `address.zip`, `address.country` Current persistence is in-memory for bootstrap speed; postgres/sqlite stores are scaffolded for next milestones.