Repolode
gofr-dev

gofr-dev/gofr

An opinionated Go framework for building microservices, with built-in databases, observability, gRPC and Kubernetes-oriented defaults.

Stars
20,817
Forks
1,790
Open issues
203
Last commit
yesterday

What is it?

GoFr is a Go framework for building microservices and REST APIs. It aims to reduce boilerplate by providing a simple handler API, standard REST behavior by default, and configuration management out of the box. Logs, traces and metrics are wired in automatically, and the project emphasizes deployment on Kubernetes.

Beyond HTTP handlers, GoFr includes gRPC support, an HTTP client with circuit breaking, Pub/Sub, cron jobs, database migrations, health checks for data sources, websockets, Swagger rendering and an abstracted file system layer. Auth and custom middleware are supported.

GoFr also offers an LLM integration that registers OpenAI-compatible models and exposes read-only handlers as Model Context Protocol tools for AI agents. The framework requires Go 1.26 or later.

Key features

  • 01Simple handler API that returns values and errors
  • 02Logs, traces and metrics integrated by default
  • 03gRPC support alongside HTTP
  • 04Built-in auth middleware and custom middleware support
  • 05Pub/Sub, cron jobs and database migrations
  • 06LLM integration with an MCP server for exposing handlers to AI agents

Use cases

  • Building Kubernetes-deployed microservices in Go
  • Creating REST APIs with built-in observability
  • Adding LLM calls or AI agent tool access to a Go backend

Quick start

  1. 1

    Install Go 1.26 or above

  2. 2

    Fetch the GoFr module

    go get -u gofr.dev/pkg/gofr
  3. 3

    Save the example greet handler as main.go and run it

    go run main.go
  4. 4

    Visit localhost:8000/greet in your browser

Things to know

  • Requires Go 1.26 or above, which is a recent version.

In collections

Topics

FAQ

What is gofr?
An opinionated Go framework for building microservices, with built-in databases, observability, gRPC and Kubernetes-oriented defaults. GoFr is a Go framework for building microservices and REST APIs. It aims to reduce boilerplate by providing a simple handler API, standard REST behavior by default, and configuration management out of the box. Logs, traces and metrics are wired in automatically, and the project emphasizes deployment on Kubernetes.
Is gofr free to use? What license does it have?
gofr is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is gofr still maintained?
Actively maintained. The last commit to gofr was on Nov 6, 2026.
What can I use gofr for?
Building Kubernetes-deployed microservices in Go Creating REST APIs with built-in observability Adding LLM calls or AI agent tool access to a Go backend
How do I install gofr?
Install Go 1.26 or above Fetch the GoFr module: go get -u gofr.dev/pkg/gofr Save the example greet handler as main.go and run it: go run main.go Visit localhost:8000/greet in your browser
Where can I get gofr?
The source code and installation instructions are on GitHub: https://github.com/gofr-dev/gofr

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects