gofr is a free, open source monitoring & observability project written in Go and released under Apache-2.0. It has 20,916 GitHub stars, 1,759 forks and 132 open issues, and was last pushed 10 hours ago. On this registry it ranks #17 of 97 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available.

What is gofr?

GoFr is an opinionated Go framework for building microservices, aimed at Go developers and platform teams who want HTTP, gRPC, data access and observability built in rather than assembled from separate libraries.

What it is

GoFr is an opinionated microservice development framework written in Go, distributed as the module gofr.dev/pkg/gofr and licensed under Apache-2.0. It is listed in the CNCF Landscape. The project's stated goal is to simplify microservice development with a focus on Kubernetes deployment and out-of-the-box observability, and while it can build generic applications, microservices remain at its core. A minimal program creates an application with app := gofr.New(), registers a handler with app.GET("/greet", ...), and calls app.Run(), which serves on localhost:8000.

The concrete problem it solves is the assembly work that precedes a first line of business logic in a Go service. Instead of wiring an HTTP router, a gRPC server, a configuration loader, middleware, structured logging, metrics, tracing, a publisher/subscriber client and datasource health checks by hand from separate libraries, a GoFr service gets those as part of the framework and follows REST standards by default. It also removes the gap between development and operation: datasource health checks, database migrations, cron jobs and log-level changes are framework concerns rather than per-service infrastructure code.

Key capabilities

  • Simple API syntax through gofr.dev/pkg/gofr, with gofr.New() for application construction and app.Run() for serving.
  • Out-of-the-box observability covering logs, traces and metrics.
  • gRPC support alongside the HTTP service, which includes circuit breaker support.
  • Authentication middleware and custom middleware support.
  • Publish/subscribe messaging, cron jobs, and WebSocket handling.
  • Health checks for all datasources, plus database migration handling.
  • Swagger rendering, abstracted file systems, and support for changing the log level without restarting the service.

Who uses it and how

  • Teams building microservices for Kubernetes, the deployment target the framework explicitly designs for.
  • Service owners who need REST conventions, middleware and datasource health checks present from the first commit rather than retrofitted.
  • Developers who want tracing, metrics and logs available without adding separate instrumentation libraries per service.
  • Backend teams that need both HTTP and gRPC endpoints over the same application object and shared middleware.
  • Contributors and evaluators arriving through the project's presence in the CNCF Landscape and its hacktoberfest topic; ready-to-run samples live in the repository's examples directory.

Getting started

Add the import gofr.dev/pkg/gofr and let Go module support fetch dependencies, or run go get -u gofr.dev/pkg/gofr. GoFr requires Go version 1.26 or above, and an application starts with go run main.go, serving on localhost:8000.

How it compares

The supplied facts name no paid products that GoFr replaces and no competing frameworks, so on the evidence here it stands alone in this registry rather than being positioned against a specific alternative. Any comparison against other Go microservice frameworks would have to come from outside these facts.

When to use it — and when not to

GoFr suits teams that accept an opinionated framework and want observability, middleware, migrations and health checks to arrive with the application rather than be chosen piece by piece. Teams that want a minimal router and full control over every dependency, or projects pinned to a Go toolchain older than 1.26, should look elsewhere. The README is largely a feature index that links out to gofr.dev for procedural detail, so self-hosters must be willing to run their own datasources and read the external documentation rather than rely on the repository alone.

project readme (upstream, from github) — read inline

GoFr

logo

GoFr: An Opinionated Microservice Development Framework

godoc gofr-docs Maintainability Code Coverage Go Report Card Apache 2.0 License discord

Listed in the CNCF Landscape

🎯 Goal

GoFr is designed to simplify microservice development, with a key focus on Kubernetes deployment and out-of-the-box observability. While capable of building generic applications, microservices remain at its core.


💡 Key Features

  1. Simple API Syntax
  2. REST Standards by Default
  3. Configuration Management
  4. Observability (Logs, Traces, Metrics)
  5. Inbuilt Auth Middleware & Custom Middleware Support
  6. gRPC Support
  7. HTTP Service with Circuit Breaker Support
  8. Pub/Sub
  9. Health Check for All Datasources
  10. Database Migration
  11. Cron Jobs
  12. Support for Changing Log Level Without Restarting
  13. Swagger Rendering
  14. Abstracted File Systems
  15. Websockets

🚀 Getting Started

Prerequisites

  • GoFr requires Go version 1.26 or above.

Installation

To get started with GoFr, add the following import to your code and use Go’s module support to automatically fetch dependencies:

import "gofr.dev/pkg/gofr"

Alternatively, use the command:

go get -u gofr.dev/pkg/gofr

🏃 Running GoFr

Here's a simple example to get a GoFr application up and running:

package main

import "gofr.dev/pkg/gofr"

func main() {
	app := gofr.New()

	app.GET("/greet", func(ctx *gofr.Context) (any, error) {
		return "Hello World!", nil
	})

	app.Run() // listens and serves on localhost:8000
}

To run this code:

$ go run main.go

Visit localhost:8000/greet to see the result.


📂 More Examples

Explore a variety of ready-to-run examples in the GoFr examples directory.


👩‍💻 Documentation


👍 Contribute

Join Us in Making GoFr Better

Share your experience: If you’ve found GoFr helpful, consider writing a review or tutorial on platforms like Medium, Dev.to, or your personal blog. Your insights could help others get started faster!

Contribute to the project: Want to get involved? Check out our CONTRIBUTING.md guide to learn how you can contribute code, suggest improvements, or report issues.


🔒 Secure Cloning

To securely clone the GoFr repository, you can use HTTPS or SSH:

Cloning with HTTPS

git clone https://github.com/gofr-dev/gofr.git

Cloning with SSH

git clone [email protected]:gofr-dev/gofr.git

🎁 Get a GoFr T-Shirt & Stickers!

If your PR is merged, or if you contribute by writing articles or promoting GoFr, we invite you to fill out this form to claim your GoFr merchandise as a token of our appreciation!

Partners

JetBrains logo

Frequently asked questions

Is gofr free to use?

gofr is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does gofr do?

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.

What is gofr written in?

gofr is primarily written in Go. Its source is publicly available at https://github.com/gofr-dev/gofr, and it has 20,916 GitHub stars.