The connective tissue
that makes apps work.

Infrastructure patterns for databases, auth, payments, and all the other stuff that's hard to get right. You own every line. Copy, paste, and sinew audit keeps it current.

50patterns
14categories
Open Source
Terminalclick to replay
$

Why Sinew?

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

Yours, Not Frozen

You own every line, with no package to install. And sinew audit flags when a pattern you copied drifts from the registry, so owning the code never means missing a fix.

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

Developer Experience

5 patterns

Feature flags, analytics, search, and internationalization

Infrastructure

5 patterns

File uploads, background jobs, webhooks, and real-time features

AI & LLM

5 patterns

AI chat, embeddings, tool calling, and streaming UI patterns

Security & Compliance

5 patterns

Audit logging, encryption, CSRF protection, and MFA

Free. Open source. Forever.

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

Your support helps keep this project free and maintained.