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). Logs and probes work with no extra setup; tracing wires into whichever reporter you already run.
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
Save a file and the dev server picks it up. It watches pages, layouts, API routes, and actions, so you never restart anything 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 while the rest of the page stays static HTML. Users download JavaScript only for the parts of the page that actually need it.
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
Core, CLI, auth, env, hooks, and the Vercel adapter ship as separate packages, so a project only installs what it uses. Each one works on its own.
DetailsOpen source
MIT licensed and developed in the open on GitHub. Standard React and TypeScript throughout; nothing proprietary to migrate away from later.
DetailsReady to build with X?
One command gets you a project with the whole stack already wired.