Cookbook
Real-world recipes for using atemporal in production. Each recipe is a self-contained pattern you can copy and adapt.
Recipes
| Topic | Use case |
|---|---|
| REST input validation | Validate body.createdAt in Express / Fastify |
| Prisma | Map a Prisma DateTime column to a wrapper |
| Drizzle | Map a Drizzle timestamp column |
| React Server Components | Format dates on the server in a Next.js app |
| Cloudflare Workers | Cold-start, small bundle, no Node APIs |
| Structured logging | Emit atemporal error codes to your log stack |
| Microservice timezones | Storing UTC, rendering locally |
| Audit log timestamps | Append-only tamper-evident log rows |
| Business hours scheduling | Compute "next business day at 09:00 local" |
| i18n formatting | Locale-aware date/time rendering |
All recipes assume import atemporal from 'atemporal' and use the 8 official plugins where applicable.