Lab 04: Build A Feature Slice
Build one complete path from user action to durable state.
Feature
Section titled “Feature”Ticket creation:
form -> client validation -> API request -> server validation -> database write -> success response -> UI feedbackUse starter-projects/support-desk-mini as the baseline unless your instructor
assigns another app.
- Create a small app or use an existing starter.
- Add a ticket creation form.
- Validate title and description on the client.
- Create a backend route.
- Validate the request on the server.
- Save the ticket.
- Show success and error states.
- Add tests for:
- valid ticket
- missing title
- server error
- duplicate submission
Starter project extension options:
- Add ticket priority.
- Add status transition validation.
- Add
GET /audit-eventstests. - Add a simple HTML form that calls the API.
Questions
Section titled “Questions”- What belongs in frontend validation?
- What must always be checked on the server?
- What does the UI show while waiting?
- What happens if the network fails?
- What does the database store?
Artifact
Section titled “Artifact”Create feature-slice.md with:
- Diagram.
- Acceptance criteria.
- Files changed.
- Test results.
- Known limitations.
Done When
Section titled “Done When”A user can create a ticket, bad input is rejected, and tests prove the important paths.