RRuna

Runa

Go 1.27+

A Go web framework that grows on demand

Start from a lean core and load capabilities on demand. From a single route to an enterprise full-stack app, compose freely and scale with confidence

  • Lean core
  • On-demand providers
  • Controlled dependencies
  • Freely extensible
go get github.com/duxweb/runa
main.go
func main() {
    app := runa.New()
    app.Install(
        route.Provider(route.Addr(":8080")),
        cache.Provider(),
    )

    route.Default().Get("/", func(c *route.Context) error {
        return c.Text("Hello Runa")
    })

    if err := app.Run(context.Background()); err != nil {
        panic(err)
    }
}
Compose

Start with a lean core, then add capabilities on demand

The core only handles loading, dependency injection and the unified lifecycle. Routing, cache, queue, database, auth and storage all enter through providers

runa · kernel+
routegrpc · plannedwsjsonrpccachequeuedatabasesessionauthstoragelockrateeventtaskschedulerediss3oronats
transportcapabilitydriver
Supply chain

Use it only when you need it

Module boundaries follow imports. Capabilities you do not install do not bring their third-party dependencies into your go.sum. Small projects stay lean, large projects can grow steadily

Microkernel framework

Keep only the application skeleton and command entry

runa · app kernelconfig · config loadingcommand · command entrylifecycle · startup and shutdown

On-demand imports

Install and connect the provider for each capability you need

runa · kernelroute · HTTP entrycache / queue · cache and queuedatabase / storage · data and storage
Architecture

Clear layers, one-way dependencies

Drivers, capabilities and transports only depend downward on the core. The kernel never reaches back into upper modules, so the architecture stays clear as the project grows

Driversredis · s3 · oro · nats · amqp · mqtt
Capabilitiescache · queue · database · session · auth · storage · …
Transportsroute (HTTP) · ws · jsonrpc · grpc (planned)
Kernelloading · DI · lifecycle · command · host · config
Lifecycle

Every capability follows the same lifecycle

Providers enter Init, Register, Resolve, Boot and Shutdown by priority, giving application startup and shutdown a clear order

InitRegisterResolveBootShutdown
Beyond HTTP

Built for web apps, ready for background services

HTTP is the common entry point, but the kernel is not tied to HTTP. You can add routing services, or run commands, queue workers and other hosts without routing code

HTTPTyped routes, domains and middleware through route
gRPCA planned transport block that joins the kernel as a host
WebSocketHub and broadcast support, with redis for horizontal scaling
JSON-RPCRun over HTTP or WebSocket and mount through route

Start from the smallest application

Begin with the minimal core, add routing to serve an HTTP API, then install cache, queue or database capabilities when you need them