Migrate to GoFr
Summary
You don't have to migrate everything at once. The recommended path is: pick one new microservice, build it in GoFr, get a feel for the framework, then migrate older services as you touch them. GoFr deploys alongside your existing Gin / Fiber / Echo / Express / Flask / Spring Boot services with no special infrastructure.
Migrating with an AI assistant?
Hand https://gofr.dev/AGENTS.md to your coding assistant (Claude Code, Cursor, Codex, Aider). It contains the framework conventions, routing/binding/datasource patterns, and per-framework cheat-sheets so the assistant can translate handlers without you re-explaining GoFr.
Choose your starting point
From Go frameworks
- Migrate from Gin → — handler, middleware, binding, and group translations.
- Migrate from Fiber → —
net/httpsemantics, datasource and observability differences. - Migrate from Echo → — Migration guide for Go developers moving from Echo to GoFr. Handler signature, middleware, route groups, binding, and gradual adoption with side-by-side examples.
- Migrate from chi → — Migration guide for Go developers moving from chi router to GoFr framework. Handler signature, middleware, route groups, URL params, and the router-vs-framework trade-off.
From Node.js / TypeScript
- Migrate from Express (Node.js) → — JavaScript-to-Go mental model, async/await analogues.
- Migrate from NestJS → — Migration guide for TypeScript developers moving from NestJS to GoFr. Controllers and decorators to handlers, modules to constructors, microservices to Pub/Sub.
From Python
- Migrate from Flask → — Pythonic patterns and their Go equivalents.
- Migrate from FastAPI → — Migration guide for Python developers moving from FastAPI to GoFr. Async/await to goroutines, Pydantic to Go structs, automatic OpenAPI to built-in Swagger UI.
- Migrate from Django REST → — Migration guide for Python developers moving from Django REST Framework to GoFr. ViewSets to AddRESTHandlers, ORM to SQL drivers, permissions to RBAC, settings.py to .env.
From Java / .NET
- Migrate from Spring Boot (Java) → — DI, controllers, configuration, and observability mappings.
- Migrate from ASP.NET Core → — Migration guide for C# developers moving from ASP.NET Core to GoFr. Controllers to handlers, DI container to constructors, appsettings.json to .env, OTLP exporter.
From PHP / Ruby
- Migrate from Laravel (PHP) → — Migration guide for PHP developers moving from Laravel to GoFr. Controllers to handlers, Eloquent to SQL drivers, Artisan to GoFr CLI, queues to Pub/Sub.
- Migrate from Rails (Ruby) → — Migration guide for Ruby developers moving from Rails to GoFr. Controllers to handlers, ActiveRecord to SQL, Active Job to Pub/Sub, Action Cable to WebSocket.
Recommended adoption strategy
- Run a spike. Build a small new service or internal tool in GoFr to learn the framework patterns.
- Establish your baseline configuration. Decide how your team handles
.envfiles, your OpenTelemetry collector endpoint, your Prometheus scrape config, and your log format. - Migrate by attrition. When you next touch an existing service for a feature or refactor, port it to GoFr in the same change.
- Use the same datastores. GoFr's MySQL / Postgres / Mongo / Redis / Kafka clients connect to the same backends you already use; no data migration is required.
- Validate observability. Confirm that traces, metrics, and logs from the migrated service appear in your existing observability stack with the same names and labels you expect.
What stays the same
- Your databases, message brokers, and caches. GoFr connects to existing infrastructure.
- Your deployment platform (Kubernetes, ECS, Cloud Run, bare VM — all supported).
- Your CI/CD pipeline. GoFr is a normal Go module; build and ship it the same way.
- Your team's Go skills. GoFr is idiomatic Go.
What changes
- The handler signature:
func(*gofr.Context) (any, error)replaces framework-specific types. - Configuration moves to environment variables /
.env(12-factor). - Observability becomes default — you remove your manual OpenTelemetry / Prometheus wiring code.
- Datasource access goes through
c.SQL,c.Redis,c.Mongo, etc., instead of injected clients you manage.

