This is a fresh brief, not another copy of the finished app. Sketch the request and data boundaries first. The suggested time is a first attempt; finish the remaining acceptance cases in another session if needed.
The brief
Build a Reading Budget page. It receives sessions with a title, minutes and a done flag. A query filters titles without regard to case; the result contains the matching titles and the total minutes of unfinished matches.
- Normalize whitespace around the query; a missing query means all sessions.
- Do not mutate the sessions, and do not count completed sessions in minutes.
- Expose the rule through a Next.js page whose query lives in searchParams.
- Add a small form that submits the query, and make a direct filtered URL work.
The contract workspace checks the data rule. The route and form are your own integration work: test them in the preview and then in a downloaded project.
Acceptance cases
- Input
{"sessions": [{"title": "Read React", "minutes": 20, "done": false}, {"title": "React tests", "minutes": 15, "done": true}], "query": " react "}→{"titles": ["Read React", "React tests"], "minutes": 20}. - Input
{"sessions": [], "query": ""}→{"titles": [], "minutes": 0}.
npm install and npm run dev. Hint 1: the idea
Separate the data guarantee from its page or HTTP translation. The workspace lets you test the rule before connecting it to the framework.
Hint 2: a first step
Write down the validation order and the fields the result may expose. Use a new collection or draft for updates, and keep failure results explicit.
Show one data-rule solution
npm install and npm run dev. The supplied solution checks the data rule. Your framework integration still needs direct-route, form or HTTP checks: the correct model does not prove that the page or handler calls it correctly. Keep that distinction in your own test plan.
Continue independently
Add one rejection case not listed above. Explain why it matters and which assertion would fail if the rule were removed. Then return to the final review after a few days, before opening earlier lessons.
Completion is saved in this browser only. It does not measure mastery.