LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
← Build a support-ticket app
BUILD → VERIFY → EXPLAIN · STEP 2 OF 6

Create a ticket and keep it after restart

Follow a request from the browser to durable storage.

UNDERSTAND

Bring these concepts with you

BUILD

Your implementation

  1. Implement createTicket using a prepared INSERT and bound values. Take owner and organization from the authenticated actor.
  2. New tickets always start open at version 1. Reject attempts to set ownership, status or version at creation.
  3. Return the saved record with its database ID. Reopen the same SQLite file and verify the ticket remains. The browser flow becomes complete after step 6.
function createTicket(actor, input) { /* validate and INSERT */ }
Need a hint?
  • Use result.lastInsertRowid to retrieve the inserted record.
  • A successful response should describe the committed row, not merely echo submitted fields.

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 2

This 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

The UI says saved, but the next request cannot find the ticket. Which boundaries would you inspect?

Say your answer aloud, then record the trade-offs and evidence in your notes above.

LOCAL VOICE REHEARSAL

Rehearse your step walkthrough aloud

Target pacing: 02:00 · Stays in this browser only; never uploaded.

00:00/ 02:00
AlifBay Prep