the production-grade Go framework you need

Forge your backend

A modular, extensible framework for building backend services in Go. Type-safe dependency injection, auto-generated API schemas, and 28+ production-ready extensions.

$go get github.com/xraph/forge

Everything you need to build at scale

A complete toolkit for production Go services, from routing to observability.

Modular Extensions

28+ production-ready extensions. Plug in only what you need.

PostgreSQL
Redis
gRPC
GraphQL
Kafka
Auth
// Register any extension with one line
app.Use(postgres.Extension())
app.Use(redis.Extension())
app.Use(grpc.Extension())
Multi-Protocol

Unified routing across every protocol, from REST to WebTransport.

HTTPgRPCGraphQLWebSocketSSEWebTransport
// One router, every protocol
app.Router().GET("/api/users", listUsers)
app.Router().POST("/api/users", createUser)
// gRPC auto-registered from proto
app.Use(grpc.Extension())
// GraphQL from schema
app.Use(graphql.Extension())
Type-Safe DI

Go generics-powered container with compile-time safety.

Constructor Injection
Auto-resolve deps
Scoped Lifetimes
Singleton, transient
Circular Detection
Compile-time checks
// Type-safe with Go generics
vessel.Register[UserService](c, NewUserService)
vessel.Register[OrderService](c, NewOrderService)
// Auto-resolve entire dependency graph
svc := vessel.Resolve[UserService](c)
Auto-Generated Schemas

OpenAPI 3.1 & AsyncAPI 3.0 from your handler signatures.

OpenAPI 3.1AsyncAPI 3.0JSON Schema
// Schemas generated at build time
type CreateUserInput struct {
Name string `json:"name" validate:"required"`
Email string `json:"email" validate:"email"`
}
// → OpenAPI spec auto-generated ✓

No manual spec writing. Forge inspects your Go types and handler signatures to produce standards-compliant schemas with validation rules, examples, and documentation included.

Enterprise Observability

Metrics, tracing, health checks — all built in.

OpenTelemetry
Distributed traces
Health Checks
Liveness & readiness
Prometheus
Metrics export
Structured Logs
JSON / logfmt
Uptime
99.97%
last 30 days
P95 Latency
7.8ms
GET /api/*
Throughput
12.4k
req/sec
// Zero-config observability
app.Use(otel.Extension())
app.Use(prometheus.Extension())
app.Use(healthcheck.Extension())

Composite Modules

Built on varous modules.

AI SDK

AI-First Framework

Build intelligent applications with a unified LLM abstraction layer. From simple text generation to autonomous agents with tools, memory, and RAG pipelines.

LLM Abstraction
OpenAI, Anthropic, Ollama & more
ReAct Agents
Autonomous reasoning & tool use
Structured Output
Type-safe JSON schema responses
RAG & Workflows
Retrieval pipelines & multi-step flows
Guardrails
Content filtering & cost limits
Streaming
Real-time token streaming
Explore AI SDK
agent.go
01agent := ai.NewReActAgent(ai.AgentConfig{
02 Name: "assistant",
03 Model: llm.NewOpenAI("gpt-4o"),
04 Tools: []ai.Tool{searchTool, calcTool},
05 Memory: ai.NewConversationMemory(10),
06})
07 
08result, err := agent.Run(ctx, "Analyze Q4 revenue")
container.go
01// Register services with type-safe generics
02vessel.Register[UserService](container, NewUserService)
03vessel.Register[OrderService](container, NewOrderService)
04vessel.RegisterScoped[RequestCtx](container, NewRequestCtx)
05 
06// Resolve with automatic dependency injection
07userSvc := vessel.Resolve[UserService](container)
Vessel

Type-Safe Dependency Injection

A DI container built on Go generics. Register services once, resolve them anywhere with compile-time type safety, automatic dependency resolution, and lifecycle management.

Go Generics
Fully type-safe container API
Constructor Injection
Auto-resolve dependencies
Scoped Services
Singleton, transient, scoped lifetimes
Circular Detection
Compile-time safety checks
Lifecycle Hooks
Init, start, stop callbacks
Standalone or Forge
Use independently or integrated
Explore Vessel
Developer Experience

Zero-Config Docker

Forget writing Dockerfiles. Forge auto-generates optimized containers for your app, hot-reloads on changes, and manages networks automatically.

Automatic Containerization

No Dockerfile required. We generate one optimized for dev.

Live Reloading

Changes sync instantly to the running container.

Production Parity

Develop in the same environment you deploy to.

forge-dev
CLI Framework

Build Enterprise CLIs

Don't just build an API—ship the tool to use it. Forge includes a complete framework for building beautiful, interactive command-line applications.

Type-Safe Flags

Robust flag parsing with strict typing and validation.

Interactive Prompts

Rich selection, confirmation, and text input prompts.

Animations

Built-in spinners, progress bars, and colored output.

main.go
01package main
02 
03import "github.com/xraph/forge/cli"
04 
05func main() {
06 app := cli.New(cli.Config{
07 Name: "ops-tool",
08 Desc: "Internal operations CLI",
09 })
10 
11 app.AddCommand(cli.NewCommand(
12 "deploy",
13 "Deploy to environment",
14 func(ctx cli.Context) error {
15 env := ctx.String("env")
16 spinner := ctx.Spinner("Deploying...")
17
18 if err := deploy(env); err != nil {
19 return err
20 }
21
22 spinner.Success("Deployed to " + env)
23 return nil
24 },
25 cli.WithFlag(cli.StringFlag("env", "e", "Target environment")),
26 ))
27 
28 app.Run()
29}
Gateway & Discovery

Instant API Gateway. Just add code.

Turn any Forge app into a powerful API Gateway. With the FARP protocol, services automatically announce their schemas (OpenAPI, gRPC) and the gateway configures routes instantly.

Zero-Config Discovery

Services auto-register via mDNS, Consul, Kubernetes, etcd, and more.

FARP Protocol

Automatic route configuration from OpenAPI/gRPC schemas.

Production Ready

Rate limiting, circuit breakers, and auth built-in.

Designed for development and small deployments. For production at scale, consider a dedicated API gateway like Kong, Envoy, or AWS API Gateway.

Discovery via
User API
REST
Auth gRPC
gRPC
Events WS
WebSocket
Forge Gateway
via mDNS
Health Checks
Load Balancing
Circuit Breakers
Auth & Rate Limit
Clients
RESTgRPCWSSSE
Schema Registration
Route Discovery
Client Traffic

24+ Production Extensions

From databases to AI, transport layers to security. Every extension integrates in one line with full type safety and lifecycle management.

0+Extensions
0Protocols
0%Type-Safe
0Middleware

One line to add. Zero config needed.

// Add any extension in one line
app.Use(PostgreSQL.Extension())
app.Use(Redis.Extension())
app.Use(GRPC.Extension())
app.Use(AI.Extension())
app.Use(Gateway.Extension())

Pluggable architecture for every use case

Database
gRPC
GraphQL
AI SDK
Kafka
Auth
Search
Streaming
WebRTC
Dashboard
Cron
Events

Extension Categories

Organized into 6 categories covering data, networking, security, infrastructure, AI, and runtime utilities.

Data & Storage
PostgreSQLMySQLMongoDBRedisSQLiteClickHouseBadgerDB
Transport & Protocol
gRPCGraphQLWebSocketNATSKafkaMQTToRPC
Security & Middleware
JWT AuthOAuth2CORSRate LimitingRBACCompressionRecovery
Infrastructure
PrometheusOpenTelemetryConsulmDNSDockerKubernetesGateway
AI & Intelligence
LLM ProvidersReAct AgentsRAG PipelinesMCP ServerEmbeddingsGuardrails
Runtime & Utilities
Cron JobsEvent BusFeature FlagsSearchStreamingDashboardQueue

Built with Forge

Production services powered by the Forge framework.

Start forging today

From prototype to production in minutes. Build scalable Go backend services with the framework that grows with you.

$go get github.com/xraph/forge