Subatom.js 2.x

Build production APIs withSubatom.js

A Node.js backend framework with routing, middleware, runtime validation, file uploads, OpenAPI integration, and a structured request pipeline — plus focused companion packages for validation and real-time applications.

index.ts / index.js
import { Subatom } from "subatom";

const app = new Subatom();

app.get("/hello", {
  controller: (ctx) => {
    ctx.res.json({ message: "Hello, World!" });
  },
});

await app.listen(8080);

Create a project

$npm create subatom@latest my-app

Framework capabilities

Everything developers need to build a serious backend.

Explore the APIs, concepts, and production patterns that make up the Subatom ecosystem.

Routing

Trie-based routing, route groups, resources, parameters, and URL generation.

Validation

Request validation with Subatom Infer and Standard Schema-oriented integrations.

OpenAPI

Generate an OpenAPI specification and serve an interactive Swagger UI.

Middleware

Compose global, group, route, transformer, interceptor, and serializer layers.

File uploads

Multipart parsing with file helpers, storage strategies, and streaming support.

Real-time

Integrate subatom-pulse with the same Node.js HTTP server for authenticated WebSockets, rooms, acknowledgements, and lifecycle control.

Ecosystem

One framework, focused companion packages.

Subatom.js is the core framework. Subatom Infer handles runtime validation, while Subatom Pulse provides the WebSocket layer. Keep the main framework docs focused and jump to the dedicated package docs when you need deeper detail.

Ready to build?

Start with create-subatom, then use the documentation as your reference from first route to production deployment.

Open the getting started guide