The connective tissue
that makes apps work.

Infrastructure patterns for databases, auth, deployment, and all the other stuff that's hard to get right. Copy. Paste. Ship.

30patterns
10categories
Open Source
Terminalclick to replay
$

Why Sinew?

Stop copy-pasting from old projects or chasing tutorials. Get production-ready code that you own.

No Dependencies

You own the code. No packages to update, no breaking changes to chase. Just copy and customize.

Production-Ready

Battle-tested patterns from real applications. Not toy examples—code you can actually ship.

Framework-Aware

Patterns tailored for Next.js, Remix, SvelteKit, and more. Not generic—optimized for your stack.

Type-Safe

Full TypeScript support with proper types. IDE autocompletion and type checking out of the box.

CLI + Web

Use the CLI for quick setup or browse the web and copy directly. Whatever fits your workflow.

Community-Driven

Open source and accepting contributions. Help make these patterns even better.

Get started in seconds

Three commands. That's all it takes.

1

Initialize in your project

npx sinew init

Sets up your project configuration for Sinew patterns.

2

Add the patterns you need

npx sinew add database/connection-pooling

Copies production-ready code directly into your project.

3

Ship it

The code is yours. Customize it, extend it, or use it as-is. No lock-in, no dependencies.

Or just browse the patterns and copy what you need.

All Categories

Production-ready code for the hard parts of web development.

Browse all →

Database

3 patterns

Connection pooling, ORMs, and serverless-ready database patterns

Authentication

3 patterns

OAuth, sessions, and role-based access control

API

3 patterns

Rate limiting, validation, and error handling

Testing

4 patterns

Unit, integration, and end-to-end testing

Caching

3 patterns

Redis caching and data management

Email

3 patterns

Transactional email and templates

Payments

3 patterns

Stripe integration and subscriptions

Monitoring

3 patterns

Error tracking and observability

Environment

2 patterns

Type-safe configs and secrets management

Deployment

3 patterns

Docker, CI/CD, and production-ready configs

Free. Open source. Forever.

Sinew is MIT licensed and community-driven. Contributions welcome.

Your support helps keep this project free and maintained.