An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
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.
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/gofrHere'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.goVisit localhost:8000/greet to see the result.
Explore a variety of ready-to-run examples in the GoFr examples directory.
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.
To securely clone the GoFr repository, you can use HTTPS or SSH:
git clone https://github.com/gofr-dev/gofr.gitgit clone [email protected]:gofr-dev/gofr.gitIf 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!
RBAC: authorize on a token's scope/permissions claim, and add the role/permission extractor hook agreed in #2144
File stores are never closed on app shutdown (the FTP adapter has no Close at all)
gRPC logs status 2 (Unknown) when a handler returns context.Canceled or DeadlineExceeded, while the client receives 1 or 4
Add response time unit in json logs
FTP file store: concurrent or overlapping operations desync the single control connection and hang forever
mongo: if MongoDB is down at startup, every operation and HealthCheck panics with a nil pointer and the client never recovers
RBAC: opt-in `defaultPolicy: deny` for routes no rule covers
RBAC keeps a second copy of the route table; the router has already resolved the request by the time the middleware runs
Enhance GoDoc for the directories section
Add span links in EventHub