Skip to content
Fox Logo

Fox Web Framework

Fast, flexible, and powerful web framework built on Gin

🚀 Automatic Parameter Binding

Bind parameters from URI, query strings, and JSON bodies automatically with struct tags

🌐 Multi-Domain Routing

Route traffic based on domain names with exact and regex pattern matching

📝 Structured Logging

Built-in logger with TraceID, structured fields, and automatic file rotation

🛡️ Crash Protection

Graceful panic recovery with detailed error logging and stack traces

⚡ High Performance

Minimal overhead above Gin’s routing engine, benchmarked for speed

🔌 Middleware Support

Full compatibility with Gin middleware ecosystem

✅ Custom Validation

Implement IsValider interface for complex business validation logic

🔄 100% Gin Compatible

Use any existing Gin middleware and handlers seamlessly

package main
import (
"github.com/fox-gonic/fox"
)
type UserRequest struct {
Name string `json:"name" binding:"required"`
Email string `json:"email" binding:"required,email"`
}
func main() {
r := fox.Default()
// Automatic parameter binding and response
r.POST("/user", func(req *UserRequest) (any, error) {
// Parameters are automatically bound and validated
return map[string]string{
"message": "User created successfully",
"name": req.Name,
}, nil
})
r.Run(":8080")
}

Fox extends Gin with modern conveniences while maintaining 100% backward compatibility. Write cleaner, more maintainable code with automatic parameter binding, flexible response handling, and built-in validation.

Perfect for building REST APIs with numerous endpoints where you want to focus on business logic rather than boilerplate code.