Summary
GoalsService has full business logic and unit tests, but GoalsController does not exist, GoalsModule is not registered in AppModule, and there is no database migration for the goals table. The feature is completely invisible.
Why This Matters
Goals is a user-facing savings feature with complete service logic already written and tested. The only missing pieces are the HTTP layer and registration — without them the entire feature is unreachable.
What Needs to Be Done
- Build
GoalsController with full CRUD: create, list, get by ID, update, delete, mark complete
- Add linked wallet endpoint to associate goals with wallets
- Write TypeORM migration for goals table
- Register
GoalsModule in AppModule
- Build complete E2E test suite
Key Files
src/goals/goals.controller.ts — create with all endpoints
src/goals/goals.module.ts — create and register
src/app.module.ts — import GoalsModule
src/database/migrations/xxxx-create-goals.ts — migration
test/goals.e2e-spec.ts — E2E tests
Acceptance Criteria
Constraints
- Goal ownership must be enforced at service level, not just controller level
progressPercentage must always be computed, never stored
- Complexity: High — 200 points
Summary
GoalsServicehas full business logic and unit tests, butGoalsControllerdoes not exist,GoalsModuleis not registered inAppModule, and there is no database migration for the goals table. The feature is completely invisible.Why This Matters
Goals is a user-facing savings feature with complete service logic already written and tested. The only missing pieces are the HTTP layer and registration — without them the entire feature is unreachable.
What Needs to Be Done
GoalsControllerwith full CRUD: create, list, get by ID, update, delete, mark completeGoalsModuleinAppModuleKey Files
src/goals/goals.controller.ts— create with all endpointssrc/goals/goals.module.ts— create and registersrc/app.module.ts— import GoalsModulesrc/database/migrations/xxxx-create-goals.ts— migrationtest/goals.e2e-spec.ts— E2E testsAcceptance Criteria
POST /goalscreates a goal and returns it withprogressPercentagecalculatedGET /goalsreturns only the authenticated user's goalsGET /goals/:idreturns 404 for goals belonging to other usersPATCH /goals/:idupdates fields and recalculatesprogressPercentagePOST /goals/:id/completevalidatescurrentAmount >= targetAmountDELETE /goals/:idsoft-deletes and returns 204Constraints
progressPercentagemust always be computed, never stored