You are browsing as a guest. Sign up (or log in) to start making projects!

2h 32m 10s logged

πŸš€ I Built x: An Ultra-Fast, Full-Stack React Framework Native to Bun!

Hey Hack Club! πŸ‘‹

I just shipped x (@thexjs) β€” an open-source, single-process React framework designed from scratch to run natively on top of the Bun runtime.

Check out the project on StarDance ⭐


πŸ’‘ The Idea

Modern frameworks like Next.js bring heavy bundlers, complex dev servers, and dozens of abstractions. Since Bun is already a transpiler, bundler, package manager, and native HTTP engine with built-in SQLite & Postgres support, I asked a simple question:

Why wrap React around Webpack/Vite when Bun can do it all natively in a single process?


πŸ”‘ Key Features

  • πŸ“ File-Based Routing: Drop .tsx files in src/pages/ to create routes.
  • ⚑ Hybrid Rendering: Choose SSR or static prerendering per route (export const mode = "static").
  • πŸ”Œ Built-in API Routes: Write REST endpoints in src/api/ sharing the same memory and DB context.
  • πŸ› οΈ Server Functions: Call type-safe server logic directly from your React components.
  • πŸ›‘οΈ Zero-Trust Security: AST build-time leak detection (prevents secret key exposure), native CSRF protection, and rate limiting.
  • πŸ“Š Production Observability: Built-in /healthz & /readyz probes, JSON logging, and OpenTelemetry/Sentry support.
  • πŸš€ Deploy Anywhere: Run on any VPS/Docker, or deploy to Vercel via @thexjs/adapter-vercel.

⏱️ Quickstart

Bootstrap a production-grade app in 30 seconds:

bun create thexjs-app@latest my-app
cd my-app
bun run dev

πŸ”— Links & Resources


Feedback and GitHub stars are super appreciated! Let me know what you think! πŸ™Œ

0
12

Comments 0

No comments yet. Be the first!