// Articles

Guides and deep dives

Guides, tutorials, and comparisons to help you build better backend applications.

Filter by category: Guides (476)
Cloud Run: Container Failed to Start and Listen on the Port

What Cloud Run's 'failed to start and listen on the port defined by the PORT environment variable' error means, the six causes behind it, and how to find which one hit your revision.

6 Min Read
Build a Dock Appointment Scheduling Backend for Warehouses

Let carriers book dock doors without double bookings: slot availability from warehouse hours, a Postgres exclusion constraint on time ranges, bookings that cannot overlap even under concurrent requests, gate check-in, no-show detection on a schedule and events for carriers, in TypeScript with Encore.

8 Min Read
Build a Provider Credentialing Backend for Healthcare

Track clinician licenses, DEA registrations, board certifications and malpractice coverage: NPI checks against the NPPES registry, evidence stored for every verification, monthly OIG exclusion screening, expiry alerts and a clearance rule scheduling can trust, in Go with Encore.

10 Min Read
Build a Daily Interest Accrual Backend for Savings Accounts

Accrue interest on savings and deposit accounts every day from ledger balances, keep sub-cent precision without floating point, make reruns safe, post interest monthly with the rounding remainder carried forward, and schedule it all in TypeScript with Encore.

8 Min Read
Build a Digital Downloads Backend for Ecommerce

Sell ebooks, templates, software and other files: private storage, entitlements granted when an order is paid, download links with expiry and download limits, short-lived signed URLs, revocation on refund and link resends, in Go with Encore.

8 Min Read
How to Migrate Neon Postgres to Google Cloud SQL

Move a Neon database into Cloud SQL for PostgreSQL in your own GCP project: dump over the direct connection, strip Neon roles, Neon Auth references and Neon-only extensions, restore through a private connection, and choose between a write freeze and logical replication for the cutover.

8 Min Read
How to Test Event-Driven Systems Locally

Test publishers, subscribers, retries and the full flow of an event-driven backend on your laptop: what each layer proves, where cloud emulators drift from production, and a Go example with a publisher test, an idempotent subscriber test and a local end-to-end run.

9 Min Read
Preview Databases: A Fresh Database for Every Pull Request

Why preview environments that share a staging database break each other, how database-per-PR, schema-per-PR and copy-on-write clones compare, how to seed and clean up preview databases, and a Go example where every preview environment gets its own migrated, seeded Postgres database.

8 Min Read
Should You Mock the Database in Backend Tests?

What a database mock verifies, which bugs only show up against real Postgres, why SQLite is a poor stand-in, and how to make real-database tests fast enough to run on every change, with a Go example that tests a unique index against an isolated test database.

7 Min Read
How to Build Preview Environments with GitHub Actions

A GitHub Actions workflow that deploys every pull request to its own Cloud Run service with its own Cloud SQL database, comments the URL, and tears everything down when the pull request closes, plus the fork, cost and config pitfalls to plan for.

8 Min Read
Claude Code Hooks: Run Backend Checks After Every Agent Edit

Set up Claude Code hooks for a backend repo: a type check after every edit, a Stop hook that runs the tests against local infrastructure before Claude finishes, and a PreToolUse hook that keeps cloud CLIs out of the session, with an Encore example.

9 Min Read
The Sidecar Pattern: When to Use It and When Not To

What the sidecar pattern is, the jobs sidecars usually do in Kubernetes, native sidecar containers, the costs in memory, startup ordering and upgrades, and the alternatives: libraries in the process, node agents and sidecar-less meshes.

5 Min Read