Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

gofr

> 数据库
Open source

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

21.1K stars0 likes2 views
WebsiteGitHub

About

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

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.24 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:

go
import "gofr.dev/pkg/gofr"

Alternatively, use the command:

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

🏃 Running GoFr

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

go
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:

bash
$ 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

  • GoDoc: Official API documentation.
  • GoFr Documentation: Comprehensive guides and resources.

👍 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

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

Cloning with SSH

bash
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

Issues· 155 open

View all issuesOpen on GitHub
  • #4388

    RBAC: authorize on a token's scope/permissions claim, and add the role/permission extractor hook agreed in #2144

    Updated Oct 1, 2026
  • #4395

    File stores are never closed on app shutdown (the FTP adapter has no Close at all)

    Updated Oct 1, 2026
  • #4394

    gRPC logs status 2 (Unknown) when a handler returns context.Canceled or DeadlineExceeded, while the client receives 1 or 4

    Updated Oct 1, 2026
  • #2480

    Add response time unit in json logs

    good first issuegoUpdated Sep 30, 2026
  • #4393

    FTP file store: concurrent or overlapping operations desync the single control connection and hang forever

    Updated Sep 27, 2026
  • #4392

    mongo: if MongoDB is down at startup, every operation and HealthCheck panics with a nil pointer and the client never recovers

    Updated Sep 27, 2026
  • #4389

    RBAC: opt-in `defaultPolicy: deny` for routes no rule covers

    Updated Sep 26, 2026
  • #3935

    RBAC keeps a second copy of the route table; the router has already resolved the request by the time the middleware runs

    Updated Sep 26, 2026
  • #995

    Enhance GoDoc for the directories section

    documentationgood first issueUpdated Sep 25, 2026
  • #3013

    Add span links in EventHub

    good first issuegopubsubUpdated Sep 25, 2026

> Tags

Goframeworkgogo-frameworkgolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库