Arcton
A TypeScript backend framework structured for real applications, with priority-based routing, typed context and a runtime-decoupled core.
Arcton is a backend framework for TypeScript. You write handlers that return values, compose behavior with middleware, and organize an application into modules that merge into a single route tree.
import { Arcton } from '@arcton/core'
const app = Arcton()
app.get('/', () => ({ message: 'Welcome to Arcton' }))
app.get('/users/:id', ctx => ({ id: ctx.params.id }))
app.listen({ port: 3000 })ctx.params.id is typed as string because the route literal says so — no
generic argument, no cast. The returned object becomes a JSON response.
Start here
A straight line from zero to a running server:
What is Arcton?
The problem it solves and the shape of an Arcton app.
Installation
Scaffold a project for Bun or Node.js in one command.
Your first server
From an empty directory to a running HTTP API.
Project structure
What the scaffold gives you, and where your code goes.
Core concepts
The ideas that show up everywhere else in Arcton:
Context
The single object a handler receives: request, params, query, response.
Routing
Static, dynamic and wildcard segments, and which one wins.
Middleware
Onion-shaped composition, and the registration order that drives it.
Validation
Standard Schema on params, query and body, with typed output.
Providers
Compose typed values onto ctx with provide(), available to everything after it.
Modules
Compose an application from Arcton instances that merge at registration.
Running an app for real
Errors
How a mistake, yours or the caller's, turns into a response.
Configuration
What ArctonConfig and listen() actually control — and what env only labels.
Testing
Testing routes and middleware with bun:test, no mocking required.
Reference
API Reference
Every public export, with signatures, behavior and examples.
Architecture
Why the router, the pipeline and the adapters are built this way.
Arcton is pre-1.0. The API described here is the API that ships today.