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
So I built Sinew.
It’s a pattern registry of infrastructure code I actually trust in production. You copy the code into your project. That’s it. 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
Browse: https://sinew.marquis.codes
Or use the CLI:
npm install -g sinew
sinew add database/connection-pooling
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 here.
Curious what pieces you end up rewriting the most.
Top comments (0)