Documentation

docs
getting started
introduction

Introduction

Mithril

Welcome to Mithril

Mithril is a batteries-included, AI-friendly Go web framework built on Fiber. It draws inspiration from Django, Laravel, FastAPI, Express, and NestJS — bringing a modern developer experience to the Go ecosystem.

Available Now#

Developer Experience

  • CLI: Global mithril new + project commands via mithril / make (migrations, CRUD gen, seed, backup)
  • Code generation: CRUD from models (mithril crud MODEL=Blog)
  • Hot reload: Air integration (mithril run-dev)
  • Docker: Multi-stage Dockerfile with health checks
  • AI Swagger: Regenerate OpenAPI via mithril swagger (requires OPENAI_API_KEY)
  • Migrations: goose SQL migrations (mithril migrate-up)
  • Seeders, backup & restore: mithril seed, mithril backup, mithril restore
  • Dev services: Postgres, PgAdmin, Adminer, Redis, RabbitMQ, Kafka via make dc-up-<service>
  • Embedded DBMS: Lightweight Postgres UI on :5050 (mithril dbms)
  • Admin panel: Django-inspired UI at /admin (mithril admin-enable)

Architecture

  • Fiber v3 on fasthttp with Sonic JSON
  • PostgreSQL via pgx v5
  • Repository pattern in database/repositories/
  • Middleware: CORS, logger, recover, request ID, optional Helmet & gzip
  • JET templates for server-rendered HTML

Security (shipped)

  • JWT access + refresh tokens
  • RBAC: Django-style roles and permissions with ACL CLI
  • Ownership helpers for resource-level access (e.g. blog posts)
  • Security headers via optional Helmet middleware
  • Request ID on every request

Production

  • Health: /health, Fiber healthcheck (/livez, /readyz)
  • Monitor: /monitor (Fiber system dashboard)
  • Kubernetes manifests in infrastructure/k8s/
  • GitHub Actions CI/CD pipeline
  • Gzip when ENABLE_COMPRESSION=true

Planned (see ROADMAP)#

  • CSRF, rate limiting, sessions, captcha
  • 2FA, email verification, password reset (auth stubs return 501 today)
  • WebSockets, gRPC, background queues
  • S3/MinIO object storage
  • OpenTelemetry, Sentry, Prometheus /metrics
  • FastAPI-style request validation layer
  • Laravel-style DI service container
  • migrate-gen from models

Quick Comparison#

FeatureMithrilGinEchoFiber
PerformanceVery HighHighHighVery High
CLI ToolsBuilt-inNoneNoneNone
Code GenerationYesNoNoNo
MigrationsBuilt-in (goose)ManualManualManual
Admin PanelBuilt-inNoNoNo
JWT + RBACBuilt-inManualManualManual
Auto SwaggerYes (AI-assisted)ManualManualManual

What's Next?#

  1. Install Mithril — install the CLI
  2. Quick Start — create your first project
  3. Application Structure — learn the layout
  4. CLI Commands — explore Makefile / mithril commands
  5. JWT Authentication — auth flow
  6. RBAC — roles and permissions

Community & Support#


Built with Go — Mithril brings the best ideas from modern frameworks to the Go ecosystem.