Backend & databases
Design dependable APIs, protect account data, and diagnose database queries, transactions, and migrations.
Showing 13–20 of 20 articles

Design file uploads that enforce server side limits
Enforce upload size, type, ownership, and publication state on the server, including direct-to-storage flows and cleanup after provider failure.

Trace an authorization rule from the page to the database query
Follow a document-access rule through identity, service calls, queries, and serialization so hidden buttons cannot substitute for enforced permissions.

Make a password reset token work only once under concurrency
Consume a password-reset grant with an atomic conditional update, keep password changes in the same invariant, and test two simultaneous submissions.

Implement cursor pagination without losing or repeating records
Define a total order with a tie-breaker, encode the full cursor, and test inserts and equal timestamps without promising a snapshot of a changing dataset.

Design retry safe create endpoints with idempotency keys
Give repeated create requests a scoped identity, compare payloads, and persist replayable results without claiming exactly-once effects across external providers.

Prevent duplicate records when two requests arrive together
Replace a check-then-insert race with a database uniqueness constraint, audit existing conflicts, and verify the invariant under simultaneous requests.

Find why invalid input becomes a 500 response
Trace malformed JSON, schema errors, invalid identifiers, and dependency failures through an endpoint so client mistakes receive deliberate responses.

Design a small API contract before generating frontend and backend code
Write a narrow request and response contract before generating both sides of an endpoint, including unknown fields, null values, and failure examples.
Explore topics
Subscribe to Newsletter
Get the latest articles and updates delivered to your inbox.