Fullstack Feature Generator
This skill automates the creation of a new "vertical slice" feature in the ChoreWars application. It scaffolds both backend (Fastify/Prisma) and frontend (React/Vite) components.
Capabilities
- •Backend Service: Creates
server/src/services/<name>Service.tswith CRUD placeholders. - •Backend Route: Creates
server/src/routes/<name>.tsand registers it inserver/src/app.ts. - •Backend Test: Creates
server/test/<name>.test.ts. - •Frontend Page: Creates
pages/<FeatureName>.tsx. - •Frontend Route: Adds the new route to
App.tsx(wrapped inUserLayoutby default).
Usage
Run the scaffold script with the PascalCase name of the feature.
bash
node .gemini/skills/fullstack-feature-gen/scripts/scaffold_feature.js <FeatureName>
Example:
bash
node .gemini/skills/fullstack-feature-gen/scripts/scaffold_feature.js GoalTracker
Generated Files
| Component | Path | Description |
|---|---|---|
| Service | server/src/services/<featureName>Service.ts | Business logic and Prisma calls. |
| Route | server/src/routes/<featureName>.ts | API endpoints definition. |
| Test | server/test/<featureName>.test.ts | Basic unit/integration tests. |
| Page | pages/<FeatureName>.tsx | React page component. |
Post-Execution Steps
After running the script, you may need to:
- •Define Prisma Model: If this feature requires a new database table, add the model to
server/prisma/schema.prismaand runnpx prisma migrate dev. - •Add Navigation: Add a link to the new page in
components/Sidebar.tsxorcomponents/BottomNav.tsx. - •Implement Logic: Replace the placeholder CRUD logic in the generated service and page with actual requirements.