Ecosystem decisions
Choose Bun backend, full-stack, database, and engineering tools by portability, maturity, and production constraints
Last updated on
Status verified: 2026-08-02. Ecosystem versions and stability change quickly. Recheck official documentation, releases, issues, and licenses before a decision.
Backend service boundaries
| Option | Advantage | Prefer when | Main risk |
|---|---|---|---|
Bun.serve | No framework; native Request/Response | Webhooks, small APIs, embedded CLI services | You organize auth, validation, and OpenAPI |
| Hono | Web Standards and multiple runtimes | Bun, Node, or Workers may host the same API/MCP boundary | Portable code is limited to the shared runtime subset |
| Elysia | Bun-first and end-to-end type ecosystem | The service will remain Bun-only | Major framework and plugin compatibility need separate tests |
| H3 / Nitro | Deployment layer and presets | Nuxt, SSR, or Nitro-based outputs | Test each preset against the target platform |
Before choosing, answer whether the service needs OpenAPI, a typed client, auth middleware, cross-runtime deployment, and whether the team can own framework upgrade regressions. A small service does not need a framework merely to complete a fashionable stack.
React, Vue, and full-stack frameworks
| Option | Current boundary | Guidance |
|---|---|---|
| Next.js + Bun | Bun can install dependencies and run Next development and production commands | Keep Next's build commands; regress SSR, ISR, and native packages on upgrades |
| TanStack Start | Still RC; Bun-specific deployment requires React 19 | Reasonable to evaluate for new products with pinned versions and SSR/streaming/server-function tests |
| TanStack Router + Hono | Explicit frontend/backend boundary and portable runtime APIs | A lower-risk path for sensitive systems |
| Nuxt / Nitro | Nitro provides a Bun preset | Follow Nitro's documented deployment shape |
| Vite SPA | Bun can run Vite directly | Simple static frontend with a separately deployed API |
| Astro | Static builds work directly with Bun | Use official Astro adapters for SSR instead of inventing an output server |
“It starts” validates only a happy path. Production acceptance also covers hydration, streaming, cache headers, static assets, server functions, security boundaries, and rollback.
Data and authentication
| Option | Good fit | Verify first |
|---|---|---|
| Bun.SQL directly | Simple queries and a SQL-capable team | Migration tooling, missing protocol features, pool budget |
| Drizzle + Bun.SQL | Schemas, migrations, and typed queries | Current integration versions, Drizzle Kit, target database |
| Prisma | Existing Prisma schemas and team knowledge | Dynamic CLI subcommands still require npm; client generator and adapter |
| Better Auth minimal | Drizzle, Prisma, or another database adapter | No direct database connection or built-in migrations |
ORM types are not runtime database validation. Unique constraints, transaction isolation, migration locks, and index behavior remain database responsibilities.
Code quality and monorepos
| Context | Starting point |
|---|---|
| New ordinary application | Biome, or the team's already-stable ESLint setup |
| Large JavaScript monorepo | Oxlint plus one formatter; avoid duplicating most ESLint rules |
| Medium web monorepo | Bun Workspaces + Turborepo |
| Generators and enterprise project boundaries | Evaluate Nx |
| Polyglot monorepo | Evaluate moon or the existing organization build platform |
Tool count is not a quality metric. Give each rule one primary executor and freeze the same command in CI.
Engineering repositories worth studying
anomalyco/opencode: large Bun Workspaces, Catalog, patches, and multiple applications.openstatusHQ/openstatus: Hono, Drizzle, Next.js, and service boundaries; review its AGPL-3.0 license first.oven-sh/bun-ecosystem-ci: organizing real ecosystem projects as Bun compatibility regression tests.oven-sh/awesome-bun: project discovery, not a production-quality endorsement.
For every repository, inspect recent commits, releases, issues, CI, license, lockfile format, and current Bun version. Learn the architecture; do not copy unexplained configuration.
Agent decision output
Decision: <selected option>
Runtime boundary: <Bun-only or portable Web APIs>
Why: <requirements matched>
Rejected: <alternatives and concrete reasons>
Version evidence: <official page or release checked today>
Required tests: <integration, deployment, rollback>Recommendations are dated judgments
Do not turn this matrix into a permanent framework ranking. Project constraints, primary sources, and repeatable tests take priority over community attention.
Official references: Bun ecosystem guides, Hono, Elysia best practices, TanStack Start, Nitro Bun, and Better Auth.