Behind Modem.dev’s Product Velocity
Modem, a startup building an AI agent that centralizes user feedback from Slack, Discord and GitHub, uses Neon Postgres branching as its development workflow.
Modem, a startup building an AI agent that centralizes user feedback from Slack, Discord and GitHub, uses Neon Postgres branching as its development workflow.
Neon Auth stores users, sessions and OAuth data in a neon_auth schema inside the Postgres database, so branching the database also branches auth state via copy-on-write.
Mocking authentication in tests hides real failures: password hashing and verification, UNIQUE-constraint enforcement under concurrent signups, session handling, and SQL joins between auth and application data.
Neon's copy-on-write storage makes Postgres database branches instant and cheap: each branch shares the parent's base data, gets its own autoscaling compute that scales to zero, and can be created from any point within the history retention window.
Neon branches can now be created with anonymized data: schema and data are copied from a parent such as production, then masked with the PostgreSQL Anonymizer extension using per-column rules (dummy emails, names, phone numbers, random values) while foreign keys and constraints stay intact.
Neon combines copy-on-write database branches with the PostgreSQL Anonymizer (anon) extension to create production-like non-prod environments without exposing PII.
Neon's serverless Postgres pairs well with ephemeral environments on AWS Lambda because each environment can get its own instant copy-on-write database branch without paying for extra RDS uptime.
Adding a UNIQUE constraint or setting a column NOT NULL in Postgres triggers a full table scan under an ACCESS EXCLUSIVE lock, which blocks all reads and writes and can take down an API on large tables.
Asking Claude to generate synthetic Postgres seed data directly as SQL INSERT statements from a schema-only dump breaks down quickly: claude-3-5-sonnet lost referential integrity somewhere between 20 and 100 rows, and claude-3-7-sonnet often failed with 'model overloaded' errors.
Docker Compose with the official Postgres image gives each developer and CI run an isolated test database, but it struggles with production-like seed data, leftover state between runs, and RAM/CPU overhead.
A scheduled GitHub Actions workflow can keep a Neon "Twin" refreshed with a partial copy of a production Postgres database.
Database mocks are brittle, expensive to maintain, and test little beyond the mock itself, since they skip real behaviour like transactions, isolation levels, foreign keys and referential integrity.
Neon's Schema Diff feature now has a `compare_schema` API endpoint, available on all plans, that takes two Neon branch IDs and returns a unified diff of their Postgres schemas.
Neon branches, which are copy-on-write clones of a Postgres database, can provide pre-seeded databases for ephemeral PR environments.
Neon's Schema Diff GitHub Action compares the schema of a pull request's Neon child branch against its parent (or a specified base_branch) and posts the result as an SQL patch in a single PR comment.
Database-per-tenant setups need every tenant database kept on the same schema, and this walkthrough automates that across many Neon projects with DrizzleORM, the Neon API and GitHub Actions.
Nightly backups of multiple Neon Postgres databases can be automated with one GitHub Actions workflow per database.
Part 1 of a series on automating nightly Postgres backups from many Neon projects to S3 via scheduled GitHub Actions covers the AWS setup.
Schema changes tested on Neon database branches can be promoted to an AWS RDS production Postgres database through GitHub Actions that run when a pull request merges.
A nightly GitHub Actions workflow that pg_dumps an RDS production Postgres database and restores it to a Neon dev branch can be extended to post success and failure alerts to a Slack channel through an incoming webhook.
A Neon Twin is a nightly-synced copy of an RDS Postgres production database kept in Neon for dev, test and staging, so teams get instant provisioning, branching and scale-to-zero without migrating production.
Shepherd, an insurtech startup that moved its Alchemist pricing engine from SQLite to Postgres, uses Neon's copy-on-write database branches to give every pull request an ephemeral test database.
Neo.Tax replaced a multi-day manual QA loop (product-created test customers, hand-verified PDFs, engineers hand-copying values into E2E fixtures via SQL dumps) with per-PR Neon database branches created by the Neon CLI, named after the GitHub branch, injected into Cloud Run via CircleCI environment variables, and deleted on merge.
Cedalio, an ESG data verification startup, moved from DynamoDB to Postgres and picked Neon over RDS for a simpler API and console.