Skip to content

vel

Go HTTP framework with automatic client and OpenAPI generation

vel is, well, a modern Go HTTP framework that leverages Go generics. Built on the standard net/http library, maintains full compatibility while providing a clean, but opinionated API for building type-safe web services.

Quick Example

Create a HTTP handlers with automatic request/response marshaling

package main
import (
"context"
"net/http"
"github.com/dennypenta/vel"
)
type HelloRequest struct {
Name string `json:"name"`
}
type HelloResponse struct {
Message string `json:"message"`
}
func HelloHandler(ctx context.Context, req HelloRequest) (HelloResponse, *vel.Error) {
return HelloResponse{
Message: "Hello, " + req.Name,
}, nil
}
func main() {
router := vel.NewRouter()
vel.RegisterPost(router, "hello", HelloHandler)
http.ListenAndServe(":8080", router.Mux())
}

Code gen first

Leverage known data types to generate clients and OpenAPI

Standard Library

Built on Go’s standard net/http library - no custom abstractions, full compatibility maintained.

Client Generation

Generate type-safe clients for Go and TypeScript from your API definitions with a simple command.

OpenAPI Generation

Generate OpenAPI from what you’ve done, not promise what you plan implementing.