Problem
In docs/features/app-wizard.md:34, step 2 of "Mode 2: Create New App" instructs users:
2. **Template**: Select template (vite+express, node-server, static)
However, server/lib/validation.js:1100-1107 strictly restricts scaffoldSchema.template to SCAFFOLD_TEMPLATES:
export const SCAFFOLD_TEMPLATES = [
'portos-stack',
'vite-express',
'vite-react',
'express-api',
'ios-native',
'xcode-multiplatform'
];
And server/routes/scaffold.js:94-154 (GET /api/scaffold/templates) registers only these 6 templates.
Neither node-server nor static exists. Submitting either template value to POST /api/scaffold is rejected by Zod with a 400 VALIDATION_ERROR.
Furthermore, the API table in docs/features/app-wizard.md:55-62 omits the directory browser endpoint GET /api/scaffold/directories and helper route POST /api/scaffold/templates/create.
Trigger
A user or developer following docs/features/app-wizard.md attempts to invoke POST /api/scaffold with { "template": "node-server", ... } or { "template": "static", ... }.
Impact
The scaffolding request fails immediately with HTTP 400 (Invalid enum value). Meanwhile, actual supported scaffolding templates (portos-stack, vite-react, ios-native, xcode-multiplatform) are not discoverable from the feature guide.
Fix
- Update
docs/features/app-wizard.md line 34 to list the real templates: portos-stack, vite-express, vite-react, express-api, ios-native, xcode-multiplatform.
- Add
GET /api/scaffold/directories and POST /api/scaffold/templates/create to the API table in docs/features/app-wizard.md.
- Verify test coverage in
server/routes/scaffold.test.js or server/lib/validation.test.js.
Alternative rejected: Adding node-server and static to SCAFFOLD_TEMPLATES — rejected because express-api and vite-react supersede them, and PortOS does not maintain standalone static/node-server scaffolding scripts.
Acceptance Criteria
Problem
In
docs/features/app-wizard.md:34, step 2 of "Mode 2: Create New App" instructs users:However,
server/lib/validation.js:1100-1107strictly restrictsscaffoldSchema.templatetoSCAFFOLD_TEMPLATES:And
server/routes/scaffold.js:94-154(GET /api/scaffold/templates) registers only these 6 templates.Neither
node-servernorstaticexists. Submitting either template value toPOST /api/scaffoldis rejected by Zod with a400 VALIDATION_ERROR.Furthermore, the API table in
docs/features/app-wizard.md:55-62omits the directory browser endpointGET /api/scaffold/directoriesand helper routePOST /api/scaffold/templates/create.Trigger
A user or developer following
docs/features/app-wizard.mdattempts to invokePOST /api/scaffoldwith{ "template": "node-server", ... }or{ "template": "static", ... }.Impact
The scaffolding request fails immediately with HTTP 400 (
Invalid enum value). Meanwhile, actual supported scaffolding templates (portos-stack,vite-react,ios-native,xcode-multiplatform) are not discoverable from the feature guide.Fix
docs/features/app-wizard.mdline 34 to list the real templates:portos-stack,vite-express,vite-react,express-api,ios-native,xcode-multiplatform.GET /api/scaffold/directoriesandPOST /api/scaffold/templates/createto the API table indocs/features/app-wizard.md.server/routes/scaffold.test.jsorserver/lib/validation.test.js.Alternative rejected: Adding
node-serverandstatictoSCAFFOLD_TEMPLATES— rejected becauseexpress-apiandvite-reactsupersede them, and PortOS does not maintain standalone static/node-server scaffolding scripts.Acceptance Criteria
docs/features/app-wizard.mdlists the 6 actual templates fromSCAFFOLD_TEMPLATES.docs/features/app-wizard.mddocumentsGET /api/scaffold/directories.npm test -- server/routes/scaffold.test.js).