Backend & databases

Design dependable APIs, protect account data, and diagnose database queries, transactions, and migrations.

← All articles

Showing 13–20 of 20 articles

Design file uploads that enforce server side limits
Backend

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.

Oct 14, 2026
5 min read
Trace an authorization rule from the page to the database query
Backend

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.

Oct 14, 2026
5 min read
Make a password reset token work only once under concurrency
Backend

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.

Oct 14, 2026
5 min read
Implement cursor pagination without losing or repeating records
Backend

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.

Oct 14, 2026
5 min read
Design retry safe create endpoints with idempotency keys
Backend

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.

Oct 14, 2026
5 min read
Prevent duplicate records when two requests arrive together
Backend

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.

Oct 14, 2026
5 min read
Find why invalid input becomes a 500 response
Backend

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.

Oct 14, 2026
5 min read
Design a small API contract before generating frontend and backend code
Backend

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.

Oct 14, 2026
5 min read