gofr-dev/gofr
gofr-dev/gofr has 20,817 GitHub stars and 1,790 forks. GitHot measured -1 stars in 24 hours and -10 in 7 days. Last checked 2026-11-06 19:58 UTC. Last push 2026-11-03.
마이크로서비스 개발을 가속하는 주관이 뚜렷한 GoLang 프레임워크입니다. 데이터베이스와 옵저버빌리티를 기본 지원합니다.
What you can do
- Simple API Syntax
- REST Standards by Default
- Configuration Management
- Observability (Logs, Traces, Metrics)
측정된 스타 증가
- in 24h
- -1
- in 7 days
- -10
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original🎯 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
- 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
- LLM Integration (
app.AddLLM,ctx.LLM()) with Built-in Tracing, Token Metrics and Streaming - MCP Server (
app.EnableMCP) to Expose Read-Only Handlers as Tools for AI Agents
🚀 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.
🤖 AI Features
GoFr treats LLMs and AI agents like any other datasource: one line to set them up, with tracing, metrics, logs and health checks wired in automatically.
Call an LLM from a handler
app.AddLLM registers an OpenAI-compatible model (OpenAI, Groq, DeepSeek, Together, Ollama, or any endpoint via
BaseURL). Handlers reach it through ctx.LLM(), which also offers Chat, Stream and Embed.
package main
import (
"gofr.dev/pkg/gofr"
"gofr.dev/pkg/gofr/ai/llm"
)
func main() {
app := gofr.New()
// The API key is read from LLM_API_KEY, or GROQ_API_KEY for this provider.
app.AddLLM(&llm.Client{Provider: llm.Groq, Model: "llama-3.3-70b-versatile"})
app.POST("/summarize", func(ctx *gofr.Context) (any, error) {
var in struct {
Text string `json:"text"`
}
if err := ctx.Bind(&in); err != nil {
return nil, err
}
return ctx.LLM().Generate(ctx, "Summarize the following:\n"+in.Text)
})
app.Run()
}
A model can also be configured without code, through LLM_PROVIDER, LLM_MODEL and LLM_API_KEY in configs/.env.
See the LLM guide.
Expose handlers to AI agents
app.EnableMCP serves your read-only handlers (GET, HEAD, OPTIONS and QUERY) as
Model Context Protocol tools, so MCP clients such as Claude Code or Claude Desktop
can discover and call them. Write handlers are never exposed. The MCP server listens on loopback at MCP_PORT
(default 8200; 0 turns the transport off).
app := gofr.New()
app.EnableMCP()
app.GET("/products/{id}", getProduct)
app.Run()
ctx.LLM().Tools() gives a handler the same tools in-process, so you can build your own agent loop. See
Building AI Agents and the
using-ai example.
📂 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.
- AI coding assistants: point your assistant at AGENTS.md for GoFr's conventions, and at llms.txt for an index of the docs.
👍 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
관련 프로젝트 살펴보기
freeCodeCamp/freeCodeCamp
freeCodeCamp.org의 오픈 소스 코드베이스와 커리큘럼입니다. 수학, 프로그래밍, 컴퓨터 과학을 무료로 배울 수 있습니다.
458,673 스타donnemartin/system-design-primer
대규모 시스템 설계 방법을 배우고 시스템 설계 면접을 준비할 수 있습니다. Anki 플래시카드가 포함되어 있습니다.
377,143 스타react/react
웹과 네이티브 사용자 인터페이스를 위한 라이브러리.
252,249 스타vuejs/vue
Vue 2 저장소입니다. Vue 3은 https://github.com/vuejs/core를 방문하세요.
212,623 스타