Features
Everything you need to build for the web
X combines static generation, server rendering, APIs, and server functions in a single Bun process, with zero configuration.
One process, everything included
Static sites, SSR, API routes, and server functions all run in a single Bun process. No microservices, no orchestration, no separate API server.
DetailsFile-based routing
Your file tree is your route tree. Drop a page in src/pages/ and it's immediately available. Dynamic segments, nested routes, and catch-all 404s come for free.
DetailsStatic + dynamic hybrid
Pick the right rendering mode per route. Use mode='static' for prerendered marketing pages, and server mode for personalized dashboards, all in the same project.
DetailsAPI routes built in
Build REST endpoints alongside your frontend. Shared types, same process, zero config. Middleware support for auth, validation, and logging.
DetailsServer functions
Call server-side functions from the browser without writing REST endpoints. Import them into a client component and call them directly, or by hand with fetch.
DetailsType safe end to end
TypeScript across the stack. Dynamic route params are inferred from file paths, server functions are fully typed, and client bundles stay type-checked against the same code.
DetailsProduction security
Build-time env isolation prevents secret leaks into client bundles. CSRF protection on server actions. Security headers (CSP, HSTS, X-Frame-Options) on every response. In-memory rate limiting, all on by default.
DetailsObservability
Structured JSON logging, /healthz and /readyz probes for containers, and pluggable APM error tracing (Sentry + OpenTelemetry). Production-ready out of the box.
DetailsContent collections
Write markdown files with frontmatter and X turns them into pages. Built-in rendering with code highlighting, slug generation, and frontmatter parsing.
DetailsLive reload
See changes instantly. The dev server watches pages, layouts, API routes, and actions. No manual restarts, no build step during development.
DetailsOptimized production builds
One command produces static HTML, a server bundle, and a build manifest. Deploy anywhere Bun runs: Fly.io, Railway, Docker, or a VPS.
DetailsIslands architecture
Interactive client components hydrate in place. The rest of the page is static HTML. Minimal JavaScript, maximum performance.
DetailsClient-side navigation, by default
Every <a> tag already gets SPA-style transitions and hover prefetch, with no router setup. Opt out per-link with data-no-nav, or use the typed <Link> component.
DetailsRemote image proxy
Stream allow-listed remote images through your own origin at /_x/image. Keeps img-src 'self' in your CSP even with external image sources, with no client-side cross-origin requests.
DetailsDatabase integration
Built-in SQLite and PostgreSQL support with migrations. Query databases directly from loaders and server functions with prepared statements.
DetailsStreaming SSR
renderStreamingPage streams HTML to the client as it renders, so the first byte arrives before the full page is ready. Fast TTFB for slow data dependencies.
DetailsModular toolkit
Small, focused packages — core, cli, auth, env, adapter-vercel — that compose together. Add only what you need, drop in a migration today.
DetailsOpen source
MIT licensed. Contributions welcome. Built for Bun with modern JavaScript in mind. No lock-in, no proprietary formats.
DetailsReady to build with X?
One command, one process, everything you need.