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.
Everything you need to build at scale
A complete toolkit for production Go services, from routing to observability.
28+ production-ready extensions. Plug in only what you need.
// Register any extension with one lineapp.Use(postgres.Extension())app.Use(redis.Extension())app.Use(grpc.Extension())
Unified routing across every protocol, from REST to WebTransport.
// One router, every protocolapp.Router().GET("/api/users", listUsers)app.Router().POST("/api/users", createUser)// gRPC auto-registered from protoapp.Use(grpc.Extension())// GraphQL from schemaapp.Use(graphql.Extension())
Go generics-powered container with compile-time safety.
// Type-safe with Go genericsvessel.Register[UserService](c, NewUserService)vessel.Register[OrderService](c, NewOrderService)// Auto-resolve entire dependency graphsvc := vessel.Resolve[UserService](c)
OpenAPI 3.1 & AsyncAPI 3.0 from your handler signatures.
// Schemas generated at build timetype 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.
Metrics, tracing, health checks — all built in.
// Zero-config observabilityapp.Use(otel.Extension())app.Use(prometheus.Extension())app.Use(healthcheck.Extension())
Composite Modules
Built on varous modules.
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.
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")01// Register services with type-safe generics02vessel.Register[UserService](container, NewUserService)03vessel.Register[OrderService](container, NewOrderService)04vessel.RegisterScoped[RequestCtx](container, NewRequestCtx)05 06// Resolve with automatic dependency injection07userSvc := vessel.Resolve[UserService](container)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.
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.
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.
01package main02 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 err20 }21 22 spinner.Success("Deployed to " + env)23 return nil24 },25 cli.WithFlag(cli.StringFlag("env", "e", "Target environment")),26 ))27 28 app.Run()29}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.
24+ Production Extensions
From databases to AI, transport layers to security. Every extension integrates in one line with full type safety and lifecycle management.
One line to add. Zero config needed.
// Add any extension in one lineapp.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
Extension Categories
Organized into 6 categories covering data, networking, security, infrastructure, AI, and runtime utilities.
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.