Gofr
An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
Install / Use
/learn @gofr-dev/GofrREADME
🎯 Goal
GoFr is designed to simplify microservice development, with key focuses on Kubernetes deployment and out-of-the-box observability. While capable of building generic applications, microservices remain at its core.
💡 Key Features
- Simple API Syntax
- REST Standards by Default
- Configuration Management
- Observability (Logs, Traces, Metrics)
- Inbuilt Auth Middleware & Custom Middleware Support
- gRPC Support
- HTTP Service with Circuit Breaker Support
- Pub/Sub
- Health Check for All Datasources
- Database Migration
- Cron Jobs
- Support for Changing Log Level Without Restarting
- Swagger Rendering
- Abstracted File Systems
- Websockets
🚀 Getting Started
Prerequisites
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
- 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
git clone https://github.com/gofr-dev/gofr.git
Cloning with SSH
git clone git@github.com: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
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.png" alt="JetBrains logo" width="200">Related Skills
node-connect
338.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
338.0kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
83.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
