Cookbook
Ready-to-use code recipes for common tasks. Copy, paste, and customize.
How to Use This Cookbook#
Each recipe provides:
- Complete, working code you can copy directly
- Dependencies to install
- Environment variables needed
- Customization tips for your use case
Authentication#
| Recipe | Description |
|---|---|
| JWT Sessions | First-party email/password auth with secure cookies |
| API Key Auth | Secure API endpoints with API keys |
Database#
| Recipe | Description |
|---|---|
| Prisma Setup | PostgreSQL with Prisma ORM |
| Database Migrations | Safe migration strategies |
| Multi-Tenant Database | Row-level security patterns |
Payments#
| Recipe | Description |
|---|---|
| Stripe Checkout | One-time payments |
| Subscriptions | Recurring billing |
| Usage-Based Billing | Metered billing |
Deployment#
Integrations#
| Recipe | Description |
|---|---|
| OpenAI | GPT-4 integration |
| Claude | Anthropic Claude integration |
| Stripe | Payment processing |
| Resend | Transactional emails |
Quick Reference#
Most Common Recipes#
Loading code block...
Recipe Categories by Use Case#
Building a SaaS?
Building an API?
Building a Marketplace?
Contributing Recipes#
Have a useful recipe? Email us with your recipe and we may feature it in our cookbook.