Commit Graph

2 Commits

Author SHA1 Message Date
saravanakumardb1
6354711f97 feat(create-app): add CLI Scaffolder (3.1) — interactive product repo generator
Scaffolder (scaffolder.ts):
- Interactive prompts: product name/ID/tagline/domain, port, platforms, features
- --from product.json flag to skip prompts (non-interactive)
- --dry-run preview mode
- Generates backend (always) + web (Next.js) + mobile (Expo) based on selection
- Template engine with {{VARIABLE}} and {{#IF FEATURE}} conditional blocks
- Backend scaffold: Fastify 5, Zod config, JWT auth, datastore, server.ts
- Web scaffold: Next.js 16 App Router, layout, page, product-config
- Mobile scaffold: Expo with app.json, index screen
- Root files: product.json, .gitignore, .env.example, README.md

Tests: 26 passing (11 template-engine + 15 scaffolder)
Tested with ActionTrail product.json dry-run — correct output
2026-03-19 20:31:35 -07:00
saravanakumardb1
f051942ef6 feat(create-app): add API Route Generator (3.3) + AGENTS.md Auto-Generator (3.4)
3.3 API Route Generator (api-routes.ts):
- Two modes: 'direct' (Cosmos DB CRUD) and 'proxy' (backend fetch)
- Generates route.ts + [id]/route.ts (Next.js App Router named exports)
- Direct mode also generates lib/schemas/ + lib/repositories/ files
- withErrorHandler HOF wrapper, Zod validation, auth check
- Dry-run preview, configurable methods, skip existing files

3.4 AGENTS.md Auto-Generator (agents-md.ts):
- Reads shared/product.json for identity, port, domain
- Scans repo for backend modules, lib files, test counts
- Generates full AGENTS.md with identity, layout, stack, conventions
- --update preserves CUSTOM sections
- Creates CLAUDE.md, .cursorrules, .windsurfrules symlinks
2026-03-19 20:17:02 -07:00