Introduction
What Reion is, why it exists, and how to get started.
Introduction to Reion
Reion is a backend API framework for building fast, type-safe HTTP services. It gives you file-based routing, a middleware pipeline, validation with Zod, and a CLI so you can go from zero to a running API in minutes.
This documentation covers what Reion is, why it exists, and how to use it.
What is Reion?
Reion is a Node.js and Bun-ready API framework that focuses on:
- File-based routing — Define routes by placing files in your app directory; no manual router setup.
- Type-safe request/response — Validate bodies and responses with Zod and get full TypeScript inference.
- Middleware pipeline — Compose CORS, logging, and custom logic in a clear order.
- CLI-first workflow — Use
reion create,reion dev,reion build,reion start, andreion addfor projects and plugins.
You write your handlers and middleware in TypeScript; Reion handles routing, validation, body parsing, and server lifecycle. It runs on both Node.js (with tsx for .ts route files) and Bun natively.
Why Reion?
- Ship faster — Minimal config, conventional project layout, and a single CLI. No framework lock-in for your HTTP layer; it's just a server and a router.
- Type safety — Request/response schemas with Zod mean fewer runtime bugs and better editor support.
- Flexible runtime — Use Node or Bun. Reion stays close to the platform instead of hiding it.
- Observability — Built-in request logging (Pino), tracing, and structured logging so you can debug and monitor without extra setup.
- Extensible — Plugins and an event bus let you add cross-cutting behavior without cluttering route handlers.
Whether you're building a small API or a larger service, Reion gives you structure without forcing a specific architecture.
What does Reion provide?
| Area | What you get |
|---|---|
| CLI | reion create (scaffold), reion dev (hot reload), reion build, reion start, reion add (plugins) — port, host, app directory, templates |
| Routing | File-based route loading, radix-tree matching, and a clear route table |
| Middleware | Resolve, load, and run middleware in order; CORS and custom middleware supported |
| Validation | Zod-based body and response validation with typed context and error handling |
| Body | Parsing for JSON and other payloads |
| CORS | Configurable CORS headers and preflight handling |
| Plugins | A plugin API to extend the runtime and lifecycle |
| Events | An event bus and file-based event handlers for decoupled logic |
| Tracing | Trace spans and a trace store for request flow and performance |
| Logging | Pino-based request logging and a configurable base logger |
Who is Reion for?
Reion is for developers who want:
- A lightweight API framework that doesn't dictate your whole stack.
- TypeScript-first APIs with validation and good DX.
- Conventions (file-based routes, standard CLI) without magic.
- The option to run on Node or Bun with minimal changes.
It fits greenfield APIs, internal tools, and services where you care about clarity and control over the HTTP layer.
How do I get started?
- Create a project: run
npx reion create my-app(or addreionto an existing app and createappDir/router/**yourself — defaultappDiris often./src). - Run the dev server:
reion dev(default port 3000, configurable with-pand-H). - Add routes as files under your
appDir/router/; Reion will load and serve them. - Build for production:
reion build, then run withreion start.
The rest of this documentation goes into setup, routing, validation, middleware, and advanced topics.
What you'll find in these docs
- Get started — Install Reion, scaffold or wire a project, first routes and production build.
- Development guide — Folder layout, routes, middleware, security, events.
- Concepts — Request/response, validation, CLI, plugins API, tracing, and more.
- Plugins — First-party packages such as Cron and Better Auth.
Use the sidebar to jump to a section, or search (⌘K) to find a topic.
Quick links
Home
Back to the homepage
Get Started
Set up Reion and run your first API
Plugins
Cron, Better Auth, and official add-ons
Need help?
If something is unclear or you run into issues, check the relevant section in the sidebar or open an issue in the project repository.