I’m done copy-pasting infrastructure code from old projects

Published: (January 18, 2026 at 02:16 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Why I stopped copy‑pasting infrastructure code

Infrastructure work is rarely interesting—but it’s always necessary.
Over time I noticed I was solving the same problems again and again:

  • Copying configs from old projects and inheriting their mistakes
  • Stitching together tutorials that were already drifting out of date
  • Adding packages I didn’t really need, just to delete them later

Introducing Sinew

Sinew is a pattern registry of infrastructure code I actually trust in production.
You copy the code into your project—no abstractions, no hidden behavior.

What’s included so far (30+ patterns)

Database

  • pooling
  • Prisma edge
  • Drizzle

Auth

  • OAuth
  • sessions
  • RBAC

API

  • rate limiting
  • validation
  • error handling

Caching

  • in‑memory
  • Next.js cache
  • Redis

Payments

  • Stripe
  • LemonSqueezy

Email

  • Resend
  • Nodemailer
  • AWS SES

Monitoring

  • Sentry
  • logging
  • OpenTelemetry

Testing

  • Vitest
  • Playwright

Deployment

  • Docker
  • GitHub Actions
  • Vercel

Environment

  • type‑safe env + secrets

You can browse the full list here:

How to use Sinew

# Install the CLI globally
npm install -g sinew

# Add a pattern to your project
sinew add database/connection-pooling

Philosophy

Most infrastructure code doesn’t need to be a package. It just needs to be correct, understandable, and easy to adapt—that’s the goal of Sinew.

Curious what pieces you end up rewriting the most?

Back to Blog

Related posts

Read more »

Rapg: TUI-based Secret Manager

We've all been there. You join a new project, and the first thing you hear is: > 'Check the pinned message in Slack for the .env file.' Or you have several .env...

Technology is an Enabler, not a Saviour

Why clarity of thinking matters more than the tools you use Technology is often treated as a magic switch—flip it on, and everything improves. New software, pl...