:
| Field | Value |
|---|---|
| Task id | <task-id> (same as the task record) |
| Feature | docs/v1/features/<feature-id>.md (link it) |
| Design | docs/v1/designs/<feature-id>.html (link it; approved on a phone) |
| Repositories | nepwalk-fe / nepwalk-be / both |
| Assignee · reviewer | <id> · <id> |
| Priority · size | P1 · 10 XP |
| Depends on | <task-id> or None |
1. Context
- Problem: who has it and when (one or two sentences).
- Outcome: what the user can do after this task.
- Users: traveller / group leader / operator / admin.
2. Functional requirements
Number every requirement. Each one is testable.
- FR-1 When
, the app . - FR-2 …
Screen states (every screen this task touches):
| State | What the user sees |
|---|---|
| Loading | … |
| Empty | … |
| Error | … (plain message, retry if it makes sense) |
| Success | … |
3. Non-functional requirements
- NFR-1 Mobile first: works at 360 px wide; touch targets at least 44 px.
- NFR-2 Speed: first data shows within 2 s on a 4G phone; no request in a loop.
- NFR-3 Accessibility: labels on inputs, keyboard focus visible, icon buttons have
aria-label, status not shown by colour alone. - NFR-4 Security: list the S-rules from
docs/guidelines/security.mdthis task touches (for example S1, S3, S8). - NFR-5 Privacy: which fields are private; where they must never appear.
- Add others only when real (limits, retries, time zone: Asia/Kathmandu).
4. Design
- Prototype: link above. Screen by screen, what changes.
- Components to reuse (exact paths, for example
nepwalk-fe/src/components/ui/button.tsx). Do not create a new one when one exists. - Design tokens only (
nepwalk-fe/src/config/theme.ts); no hard-coded colours.
5. API contract
None if no backend change. Otherwise, per endpoint:
POST /api/v1/<path>
Auth: JwtAuthGuard (signed in) | OptionalJwtGuard + canViewTrip | public
Scope: filtered by orgId of the viewer | trip access via trip-access.ts
Request body (DTO <Name>Dto, every field validated):
{ "name": "string, 1-120 chars, trimmed", "capacity": "integer 1-1000, optional" }
Response 201:
{ "id": "uuid", "name": "string" }
Errors: 400 bad input (nothing saved) · 401 not signed in · 404 not found or not allowed (S2).
6. Database
None if no change. Otherwise:
- Prisma model change in
nepwalk-be/prisma/schema.prisma(paste the new fields). - Migration name:
npm run db:migrate -- --name <short_name>; additive only (S25). - Indexes for every new filter or join.
- Seed data needed for local testing.
7. Files to touch
| File | Change | Copy the pattern from |
|---|---|---|
nepwalk-be/src/modules/<m>/dto/<m>.dto.ts |
new DTO | nepwalk-be/src/modules/vendors/dto/vendor.dto.ts |
| … | … | … |
8. Steps
Small steps, in order. Each step: test first, see it fail, code, see it pass.
- Test first:
<file>— what it asserts. - Run:
<command>— expected: fails with<reason>. - Code: what to change.
- Run:
<command>— expected: passes. - …
Last step: run all checks (section 10) and the manual test (section 11).
9. Acceptance checks
- AC-1 Given
, when , then . (covers FR-1) - AC-2 …
10. Automated checks
# nepwalk-be
npm run lint && npm test && npm run test:e2e
# nepwalk-fe
npm run lint && npm test && npm run build # build in a throwaway worktree
11. Manual test
- Device and browser (phone first, then desktop).
- Steps with the expected result after each one.
12. Security checklist
Fill from team-security. Every line answered yes or "not touched".
13. Out of scope
- What this task does not do (new ideas become tickets).
14. Definition of done
- [ ] Every FR and AC met; tests written first and passing.
- [ ] Security checklist complete; rules named in the pull request.
- [ ] Manual test done by a person on a phone and a desktop.
- [ ] Pull request into
stage, reviewed by the reviewer.