Hexagonal, event-driven Go backend framework.
Important
Flamigo is still pre-1.0. The architecture is already usable, but APIs, templates, and tooling may still change between releases.
Flamigo is a backend framework for Go projects that want:
- domain-first structure
- hexagonal architecture
- event-driven coordination between domains
- transport adapters for HTTP and WebSocket-style applications
- lightweight dependency injection for startup wiring
It is designed for applications like game backends, internal platforms, modular monoliths, and services where domain boundaries matter more than raw CRUD scaffolding.
Flamigo is not trying to be:
- a full ORM or database framework
- a batteries-included auth product
- a frontend framework
- a giant “everything included” web framework
The framework gives you structure and reusable primitives. Application policy, persistence details, and adapter behavior still live in your app.
domainshold business logic and domain contractseventscarry domain events across the applicationstrategiesprovide application actions that transports can invokeadaptersconnect the system to the outside worldinjectionwires everything together at startup
Install the CLI:
go install github.com/amberbyte/flamigo/tools/flamigo@latestCreate a project:
flamigo initThe wizard scaffolds a project and lets you enable optional features like:
authtransport_httptransport_websocket
Documentation and guides are available at:
Flamigo framework internals use Go's standard log/slog package and scope framework records with library=flamigo.
If you already use slog in your app, setting the default logger is enough:
import (
"log/slog"
"os"
)
func init() {
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
})))
}If you want Flamigo to use a dedicated logger instead of the global default, set it explicitly:
import (
flamigo "github.com/amberbyte/flamigo"
"log/slog"
"os"
)
func init() {
flamigo.SetLogger(slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
})))
}To suppress one noisy framework debug record while keeping other debug logs, wrap the handler with flamigo.NewFilterHandler and filter by structured attributes such as component and code.
If your app still uses logrus, bridge Flamigo's slog logger into a custom slog.Handler and pass it to flamigo.SetLogger(...). See docs/guide/logging.md for a full example.
Issues, ideas, and pull requests are welcome. See CONTRIBUTING.md.
MIT
