A Go router that respects
both your latency budget
Routix pairs a hand-tuned radix tree with the kind of API you don’t need to keep open in another tab. Three lines to a server. Zero allocation in the hot path.
$go get github.com/ramusaaa/routixpackage main
import (
"github.com/ramusaaa/routix"
)
func main() {
r := routix.New()
r.GET("/users/:id", func(c *routix.Context) error {
id := c.Params["id"]
return c.JSON(200, routix.Map{
"id": id,
"name": "Ada Lovelace",
})
})
r.Start(":8080")
}$ go run server.go
▲ routix v1.0.0 · listening on :8080
↳ 12 routes registered in 280µs
$ curl -s :8080/users/42 | jq
{
"id": "42",
"name": "Ada Lovelace"
}
GET /users/42 200 · 0.41ms
GET /users/42 200 · 0.29ms
GET /users/42 200 · 0.31ms
$ Faster than the things you already trust.
Same hardware, same workload — a 64-route REST API serving JSON to a warmwrkclient. Numbers are requests per second, higher is better.
Apple M3 Pro · Go 1.23 · 8 workers, 200 connections, 30s.
repro recipe →
Six things you actually need.
Nothing you don’t.
Radix-tree routing
Pattern lookup is O(prefix-length). 64 routes resolve in tens of nanoseconds with no map allocations.
API that reads aloud
Borrowed the good parts of Express and Laravel. r.GET, r.Group, c.JSON. Nothing surprising.
Middleware, batteries-on
CORS, recovery, structured logger, rate limiter, request-id. All composable, all opt-in.
Storage agnostic
Bring database/sql, GORM, sqlx, or none. Migrations and seeders ship with the CLI when you want them.
Sane security defaults
Secure headers, body-size guard, CSRF on state-changing routes. Off by default would’ve been wrong.
A CLI worth using
routix new, routix make:controller, routix serve --watch. The boring scaffold, written for you.
From $ to a running server in three commands.
Install
The router is one module. No init step, no wizard.
$go get github.com/ramusaaa/routixScaffold
If you want the full project layout — handlers, middleware, .env — let the CLI write it.
$routix new my-app && cd my-appRun
Hot reload is on by default. Edit a handler, watch it return without restarting.
$routix serve --watchBuilt for the part that comes after “works on my machine.”
Graceful shutdown is wired in. Panics never take the process down. Logs are structured. Requests carry a trace ID before you ask. The Dockerfile in the starter is forty-three lines and we’re proud of every one of them.
Stop tuning routers. Ship the API.
The first thirty minutes with Routix tend to look like the next thirty months.