UNDERSTAND
Bring these concepts with you
BUILD
Your implementation
- Download all seven starter files into one folder. Use Node.js 22.13 or newer, which supplies node:sqlite. No packages are required.
- Implement initializeSchema with users, sessions and tickets tables. Enable foreign keys and constrain ticket text, status and version. The supplied auth adapter seeds four fixed demo users.
- Implement validateTicket. Trim title and body, enforce their lengths, reject unknown identity fields, and return field errors with HTTP 422.
export function initializeSchema(db) { /* create tables and constraints */ }
export function validateTicket(input) { /* validate title and body */ }Need a hint?
- Start from the documented column names used by auth.mjs and the provided HTTP adapter.
- A browser validation message improves usability; server validation and database constraints protect the stored data.
Saved on this device · 0 / 6000 · Do not include passwords or private data.
VERIFY
Acceptance checks
From the folder containing your downloaded files, run:
node checks.mjs ./starter.mjs 1This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.
Record your attempt to enable the checklist and reference comparison.
Compare with the reference
Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.
EXPLAIN
Your interviewer asks
Why do you need database constraints when your API already validates requests?
Say your answer aloud, then record the trade-offs and evidence in your notes above.
LOCAL VOICE REHEARSAL
Rehearse your step walkthrough aloud
00:00/ 02:00