Backend & databases

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

← All articles

Showing 1–12 of 20 articles

Use synthetic data to test AI generated database changes
Backend

Use synthetic data to test AI generated database changes

Build deterministic synthetic fixtures around invariants, legacy shapes, races, and privacy boundaries so AI-generated database changes can fail meaningfully.

Oct 14, 2026
5 min read
Avoid exposing private fields through populated database records
Backend

Avoid exposing private fields through populated database records

Trace selected and populated fields through public serialization, use explicit response views, and test records that contain private extras and missing relations.

Oct 14, 2026
5 min read
Debug date grouping that changes across server timezones
Backend

Debug date grouping that changes across server timezones

Store instants separately from calendar dates, choose an IANA business timezone, and group with explicit boundaries that survive server moves and daylight shifts.

Oct 14, 2026
5 min read
Decide when several database writes need a transaction
Backend

Decide when several database writes need a transaction

Identify the invariant shared by multiple writes, compare single-document modeling, and test rollback without including external side effects in a retryable transaction.

Oct 14, 2026
5 min read
Normalize account email addresses without merging users accidentally
Backend

Normalize account email addresses without merging users accidentally

Define email identity policy, preview normalization collisions, and protect login uniqueness without silently combining distinct accounts or provider-specific aliases.

Oct 14, 2026
5 min read
Design a migration that can be checked before it writes
Backend

Design a migration that can be checked before it writes

Preview migration candidates, enforce write-time preconditions, process bounded batches, and verify invariants so a dry run predicts a reviewable change.

Oct 14, 2026
5 min read
Fix a cached database connection that never recovers
Backend

Fix a cached database connection that never recovers

Reset failed connection initialization without discarding healthy pooled clients, distinguish query errors from connection setup, and test recovery in one process.

Oct 14, 2026
5 min read
Design deletion behavior without leaving invisible orphan records
Backend

Design deletion behavior without leaving invisible orphan records

Choose deletion semantics for each relationship, prevent new dependents during cleanup, and verify retained history and removed private data separately.

Oct 14, 2026
5 min read
Choose an index from a slow query rather than a guess
Backend

Choose an index from a slow query rather than a guess

Choose a candidate index from the real filter, sort, projection, and explain plan, then compare examined work and write costs in a controlled dataset.

Oct 14, 2026
5 min read
Find an N plus one query before optimizing the wrong layer
Backend

Find an N plus one query before optimizing the wrong layer

Count storage operations across a complete request, distinguish ORM population from per-row reads, and batch only the relationships the response needs.

Oct 14, 2026
5 min read
Use AI to audit an API without leaking credentials or private data
Backend

Use AI to audit an API without leaking credentials or private data

Create a synthetic API evidence bundle, redact secrets without erasing the bug, and bound AI review tools to the exact contract being audited.

Oct 14, 2026
5 min read
Handle third party API failure without misleading the user
Backend

Handle third party API failure without misleading the user

Represent local persistence and remote delivery as separate states, handle timeouts as uncertain outcomes, and give retries a durable operation identity.

Oct 14, 2026
5 min read