newX 1.3 — islands to disk, server-mode islands, image proxy

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.

01

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.

Details
02

File-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.

Details
03

Static + 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.

Details
04

API routes built in

Build REST endpoints alongside your frontend. Shared types, same process, zero config. Middleware support for auth, validation, and logging.

Details
05

Server 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.

Details
06

Type 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.

Details
07

Production 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.

Details
08

Observability

Structured JSON logging, /healthz and /readyz probes for containers, and pluggable APM error tracing (Sentry + OpenTelemetry). Production-ready out of the box.

Details
09

Content collections

Write markdown files with frontmatter and X turns them into pages. Built-in rendering with code highlighting, slug generation, and frontmatter parsing.

Details
10

Live reload

See changes instantly. The dev server watches pages, layouts, API routes, and actions. No manual restarts, no build step during development.

Details
11

Optimized 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.

Details
12

Islands architecture

Interactive client components hydrate in place. The rest of the page is static HTML. Minimal JavaScript, maximum performance.

Details
13

Client-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.

Details
14

Remote 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.

Details
15

Database integration

Built-in SQLite and PostgreSQL support with migrations. Query databases directly from loaders and server functions with prepared statements.

Details
16

Streaming 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.

Details
17

Modular toolkit

Small, focused packages — core, cli, auth, env, adapter-vercel — that compose together. Add only what you need, drop in a migration today.

Details
18

Open source

MIT licensed. Contributions welcome. Built for Bun with modern JavaScript in mind. No lock-in, no proprietary formats.

Details

Ready to build with X?

One command, one process, everything you need.