Examples
Choose the boundary your application owns, then compare how that ecosystem creates, exposes, and disposes a scope. Each group mirrors one directory in examples/.
Start Here
Read examples/_shared/container.ts first. Most server-side examples import this builder so their files can focus on framework wiring.
| Group | What to compare |
|---|---|
| JavaScript usage | Node ESM, Node CommonJS, and browser bundler usage |
| Backend frameworks | Fastify, Hono, Koa, Express, and Elysia request-scope adapters |
| API layers | tRPC, Apollo Server, and GraphQL Yoga request-scope boundaries |
| Full-stack frameworks | Next.js App Router and Remix loader/action scopes |
| Runtimes and edge platforms | Node HTTP, Bun, Deno, Cloudflare Workers, Vercel Edge, Deno Deploy, and Supabase Edge |
| Frontend frameworks | React, React Native, Vue, and Svelte feature scopes |
| Bots, queues, and CLI | Telegraf, Grammy, BullMQ, Commander, and Yargs operation scopes |
How to Read the Groups
Use examples/_shared/container.ts as the application graph for server-side examples. The group pages focus on lifecycle ownership: where a scope is created, where it is exposed, and where it is disposed.
For server-side and worker examples, compare the framework/platform lifecycle hooks. For frontend examples, compare the mount and unmount boundaries.
Reference snippets
pnpm run examples:typecheck checks examples/_shared/container.ts and examples/_shared/testing.ts. It does not typecheck every framework snippet because the root workspace does not install every framework dependency. Copy the relevant pattern into your application, install its dependencies, and adapt the shared graph to your types.
