RepoPilotOpen in app →

kataras/iris

The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket:

Healthy

Healthy across all four use cases

Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 4mo ago
  • 6 active contributors
  • BSD-3-Clause licensed
Show 4 more →
  • CI configured
  • Tests present
  • Slowing — last commit 4mo ago
  • Concentrated ownership — top contributor handles 79% of recent commits

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/kataras/iris)](https://repopilot.app/r/kataras/iris)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/kataras/iris on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: kataras/iris

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/kataras/iris shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across all four use cases

  • Last commit 4mo ago
  • 6 active contributors
  • BSD-3-Clause licensed
  • CI configured
  • Tests present
  • ⚠ Slowing — last commit 4mo ago
  • ⚠ Concentrated ownership — top contributor handles 79% of recent commits

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live kataras/iris repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/kataras/iris.

What it runs against: a local clone of kataras/iris — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in kataras/iris | Confirms the artifact applies here, not a fork | | 2 | License is still BSD-3-Clause | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 144 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>kataras/iris</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of kataras/iris. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/kataras/iris.git
#   cd iris
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of kataras/iris and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "kataras/iris(\\.git)?\\b" \\
  && ok "origin remote is kataras/iris" \\
  || miss "origin remote is not kataras/iris (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(BSD-3-Clause)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"BSD-3-Clause\"" package.json 2>/dev/null) \\
  && ok "license is BSD-3-Clause" \\
  || miss "license drift — was BSD-3-Clause at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "go.mod" \\
  && ok "go.mod" \\
  || miss "missing critical file: go.mod"
test -f "VERSION" \\
  && ok "VERSION" \\
  || miss "missing critical file: VERSION"
test -f ".github/workflows/ci.yml" \\
  && ok ".github/workflows/ci.yml" \\
  || miss "missing critical file: .github/workflows/ci.yml"
test -f "README.md" \\
  && ok "README.md" \\
  || miss "missing critical file: README.md"
test -f "CONTRIBUTING.md" \\
  && ok "CONTRIBUTING.md" \\
  || miss "missing critical file: CONTRIBUTING.md"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 144 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~114d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/kataras/iris"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Iris is a high-performance HTTP/2 Go web framework designed for rapid development and unbeatable cost-performance ratios. It provides a modern, easy-to-learn API for building web applications with built-in support for routing, middleware, view rendering (via Ace, Jet, Pongo2, Handlebars, Blocks), and static file serving, while emphasizing developer control and minimal abstractions. Monolithic Go module structured as a single package (github.com/kataras/iris/v12) with examples organized in _examples/ directory (285+ runnable demos), benchmarks in _benchmarks/ (testing view engine performance), and configuration via VERSION file and .deepsource.toml for code quality. Core logic is likely in root package with handler/router registration, middleware pipeline, and response writing; no visible internal/ subdirectory suggests flatter package organization.

👥Who it's for

Go backend developers building REST APIs, server-rendered web applications, and microservices who need a lightweight alternative to Express-like frameworks with native HTTP/2 support and hot-reload capabilities during development.

🌱Maturity & risk

Production-ready and actively maintained. The project has 285+ examples, comprehensive CI/CD via GitHub Actions (ci.yml, codeql-analysis.yml), established governance (CODEOWNERS, CODE_OF_CONDUCT.md), security policy (SECURITY.md), and a detailed HISTORY.md changelog documenting releases like v12.2.0. Latest commit appears recent (2025-01-25 based on go.mod timestamp), indicating active development.

Low risk for established projects but medium maintenance burden: ~30+ transitive dependencies (golog, blocks, tunnel, multiple template engines) create supply chain surface area; single primary maintainer (kataras) based on CODEOWNERS structure poses continuity risk; the framework's extensive template engine integrations (Jet, Pongo2, Jade, Handlebars) mean bugs in any one can affect production apps. Verify your chosen view engine's maintenance status before adopting.

Active areas of work

Active development with recent go.mod updates (timestamp 2025-01-25), dependency bumps for security patches (e.g., Shopify/goreferrer updated 2025-01-17), and ongoing focus on HTTP/2 optimization and template engine compatibility. The framework appears to maintain steady releases rather than pursuing major rewrites.

🚀Get running

Clone the repository and explore examples: git clone https://github.com/kataras/iris.git && cd iris && go mod download. Run an example: cd _examples/hello-world && go run main.go. No npm or external runtime required—pure Go toolchain only.

Daily commands: Create a simple main.go: package main\nimport "github.com/kataras/iris/v12"\nfunc main() { app := iris.New(); app.Get("/", func(ctx iris.Context) { ctx.JSON(iris.Map{"message": "Hello"}) }); app.Listen(":8080") } then go run main.go. Access http://localhost:8080.

🗺️Map of the codebase

  • go.mod — Declares the Iris framework as the primary dependency; essential for understanding the web framework's version and all transitive dependencies.
  • VERSION — Single source of truth for the framework's semantic version; critical for release management and compatibility tracking.
  • .github/workflows/ci.yml — Defines the CI/CD pipeline for automated testing, builds, and deployment; essential for understanding how code quality is maintained.
  • README.md — Primary entry point documenting the framework's purpose, quick-start guide, and architectural philosophy for new contributors.
  • CONTRIBUTING.md — Specifies contribution guidelines, code style, and testing requirements that all contributors must follow.
  • _examples — Collection of reference implementations demonstrating Iris patterns, routing, middleware, and view layer integration.
  • HISTORY.md — Changelog documenting breaking changes, new features, and deprecations across versions for backward-compatibility awareness.

🧩Components & responsibilities

  • Iris Router Engine (Go net/http, HTTP/2 protocol) — Core HTTP routing, request multiplexing, context management, and response writing
    • Failure mode: Unroutable requests return 404; panic in handler causes 500; malformed requests rejected at protocol level
  • Middleware Stack (Go interfaces, handler chain pattern) — Request/response interception for authentication, logging, CORS, compression, and custom cross-cutting concerns
    • Failure mode: Middleware panic halts request; auth middleware failure triggers 401/redirect; logging middleware failure silent (graceful degradation)
  • View Rendering Engine (Jet, Pug, Handlebars, Django, Ace, HTML/template) — Template selection, compilation, and rendering with context data; supports multiple template syntaxes
    • Failure mode: Template not found returns 500; template syntax error logged and 500 returned; missing context data causes runtime panic
  • Database Driver Integration (go-sql-driver/mysql, database/sql) — SQL query execution, connection pooling, and result marshaling for data persistence
    • Failure mode: Connection pool exhaustion causes request timeout; query syntax errors return SQL error; connection loss triggers automatic retry by driver
  • Authentication/Authorization Layer (Custom middleware, auth.yml configuration, user provider interface) — User identity verification, session management, and access control enforcement
    • Failure mode: Invalid credentials trigger 401; session expiry redirects to login; missing auth header fails fast before handler execution

🔀Data flow

  • HTTP ClientIris Router — Raw HTTP request (TCP packet stream) decoded by Go's net/http server
  • Iris RouterMiddleware Stack — Request context with parsed URL, headers, query params, and body passed through middleware chain
  • Middleware StackRoute Handler — Processed context with user data, validated input, and extracted parameters delivered to business logic
  • Route HandlerDatabase Driver — SQL queries with bound parameters and context timeout signals sent to connection pool
  • Database DriverRoute Handler — Result rows unmarshaled into Go structs and returned to handler for processing
  • Route Handlerundefined — undefined

🛠️How to make changes

Add a New Route Handler

  1. Create a new handler file in your application following the pattern shown in _examples/auth/auth/main.go (_examples/auth/auth/main.go)
  2. Define route with app.Get(), app.Post(), etc. and attach your handler function (see authentication example for middleware) (_examples/auth/auth/main.go)
  3. If handler requires template rendering, register your view engine in the main initialization block (_benchmarks/view/html/main.go)

Add a New Template Engine Integration

  1. Create view engine benchmark directory following the structure in _benchmarks/view/html (engine name, views/, layouts/, partials/) (_benchmarks/view/html)
  2. Implement main.go with engine initialization—reference _benchmarks/view/django/main.go for dependency registration pattern (_benchmarks/view/django/main.go)
  3. Create template files in views/ and test rendering performance to ensure consistency with framework benchmarks (_benchmarks/view/django/views/index.html)

Add Authentication/Authorization Middleware

  1. Study the complete auth example structure in _examples/auth/auth (user.go, user_provider.go) (_examples/auth/auth/user.go)
  2. Create auth.yml configuration following the example's pattern for credential storage and policy definition (_examples/auth/auth/auth.yml)
  3. Register middleware in main route handler using Iris middleware stack pattern (see _examples/auth/auth/main.go) (_examples/auth/auth/main.go)

🔧Why these technologies

  • Go 1.25 — High-performance concurrent language with built-in HTTP/2 support; enables Iris' claim of being the fastest HTTP/2 web framework
  • Multiple Template Engines (Jet, Pug, Handlebars, Django, Blocks) — Provides developer choice and migration paths from other frameworks; allows template selection based on project requirements and team familiarity
  • MySQL Driver (go-sql-driver/mysql) — Enables relational database integration for typical web application persistence; example dependency demonstrates common use case
  • Brotli Compression (andybalholm/brotli) — Modern compression algorithm for HTTP responses; reduces bandwidth while maintaining compatibility with standard clients

⚖️Trade-offs already made

  • Support multiple template engines via pluggable architecture

    • Why: Accommodates developer preference and reduces migration friction from other frameworks
    • Consequence: Increased framework complexity, more dependencies to maintain, and larger binary size
  • Focus on HTTP/2 and performance as primary differentiator

    • Why: Addresses critical infrastructure concern (latency/throughput) and appeals to performance-sensitive applications
    • Consequence: Less focus on higher-level abstractions (GraphQL, gRPC) compared to some competitors; developers responsible for API design patterns
  • Provide batteries-included examples rather than minimal scaffolding

    • Why: Reduces onboarding friction and demonstrates idiomatic patterns to new users
    • Consequence: Large _examples directory; requires maintenance as framework evolves to prevent stale examples

🚫Non-goals (don't propose these)

  • Does not provide ORM abstraction layer—database integration is developer responsibility
  • Not a real-time framework—WebSocket support expected but not a primary focus based on repo structure
  • Does not offer built-in distributed tracing or observability beyond standard Go tooling
  • Not opinionated about frontend frameworks—server-side rendering focused, no integrated SPA scaffolding

🪤Traps & gotchas

  1. View engine selection is baked at import time—switching from Blocks to Jet mid-project requires code restructuring. 2) The framework uses iris.Context wrapping http.ResponseWriter and *http.Request; direct use of underlying net/http can bypass Iris middleware chains. 3) No built-in database ORM—you must choose and integrate (go-sql-driver/mysql shown in go.mod suggests user responsibility). 4) Middleware order matters deeply due to handler chain execution; mis-ordering authentication vs. CORS middleware is a common footgun. 5) File serving via static middleware requires explicit path registration or wildcard routes; accidental double-serving of routes can cause 404s.

🏗️Architecture

💡Concepts to learn

  • HTTP/2 Server Push — Iris advertises HTTP/2 as core feature; understanding server push (unsolicited resource sending) is essential to leveraging performance claims vs. HTTP/1.1
  • Middleware Chain / Pipeline Pattern — Iris's architecture is built on ordered middleware execution (auth → CORS → logging → handler); incorrect chaining is the #1 configuration footgun in this codebase
  • Context Propagation in Go — iris.Context wraps Go's context.Context; understanding how Iris passes request-scoped values through middleware is critical for custom handlers and database queries
  • Content Negotiation — Iris auto-selects response format (JSON, XML, HTML, YAML) based on Accept headers; misunderstanding this can cause unexpected response types in client integration
  • Template Engine Abstraction / Adapter Pattern — Iris decouples view rendering via adapters (Jet, Pongo2, Blocks, Ace); adding custom template engines requires understanding the adapter interface
  • Zero-Copy I/O and Brotli Compression — go.mod includes andybalholm/brotli and valyala/bytebufferpool; Iris optimizes response serialization via these libraries for the cost-performance claim
  • Static Asset Serving and Cache Headers — Iris includes built-in static middleware (visible in _examples/file-server/); understanding ETags and Last-Modified headers prevents cache invalidation bugs
  • gin-gonic/gin — Direct competitor: similarly lightweight Go HTTP framework but HTTP/1.1 focused; Iris differentiates via native HTTP/2 and claim of superior performance
  • gorilla/mux — Lower-level Go routing library; Iris builds abstractions on top but gorilla is minimalist alternative if you prefer standard net/http
  • labstack/echo — Another production Go web framework with middleware ecosystem; comparable feature set to Iris (routing, views, validation) and similar performance targets
  • kataras/iris-cli — Official Iris command-line tool for scaffolding new projects and managing app lifecycle—companion tooling for this framework
  • kataras/golog — Iris's internal logging library (visible in go.mod as dependency); framework users may interact with this for structured logging

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive benchmarking CI workflow for view engine performance

The repo has extensive view engine benchmarks in _benchmarks/view/ (ace, blocks, django, handlebars, html, etc.) but no automated CI workflow to run and track these benchmarks. This would help detect performance regressions across different template engines and provide historical performance data. Currently .github/workflows only has ci.yml and codeql-analysis.yml.

  • [ ] Create .github/workflows/benchmarks.yml to run benchmarks in _benchmarks/view/ on each PR
  • [ ] Parse and compare benchmark results against baseline (ace, blocks, django, handlebars, etc.)
  • [ ] Post benchmark results as PR comments to track performance impact
  • [ ] Reference existing setup in .github/scripts/setup_examples_test.bash for build patterns

Add security policy enforcement and dependency audit in CI pipeline

The repo has SECURITY.md and .fossa.yml for license compliance, but lacks automated security scanning in the main CI workflow beyond CodeQL. With 50+ transitive dependencies including compression, cryptography, and markdown libraries, automated dependency vulnerability scanning and SBOM generation would improve supply chain security.

  • [ ] Extend .github/workflows/ci.yml to include GitHub's Dependabot vulnerability alerts integration
  • [ ] Add OWASP Dependency-Check or Snyk scanning step for transitive dependencies
  • [ ] Generate and validate SBOM using tools like syft in the CI workflow
  • [ ] Document security scanning process in CONTRIBUTING.md with specific references

Create integration test suite for iris-cli command generation against framework examples

README mentions the official Iris Command Line Interface (iris-cli) exists, and the repo has multiple example patterns in _benchmarks/view/ and .github/scripts/setup_examples_test.bash. However, there's no dedicated test suite validating that iris-cli generated projects actually build and run correctly with the current framework version.

  • [ ] Create _tests/cli_integration/ directory with test files for iris-cli project generation
  • [ ] Add tests that generate projects using iris-cli and verify they build against current iris/v12 version
  • [ ] Test generated projects with different view engines (blocks, django, handlebars) from _benchmarks/view/
  • [ ] Add CI step in .github/workflows/ci.yml to run these integration tests on each release candidate

🌿Good first issues

  • Add end-to-end examples demonstrating JWT authentication with Iris middleware in _examples/auth/ that pairs session cookies with token-based flows (currently go.mod imports google/uuid but no visible e2e auth example).
  • Create performance benchmark suite comparing HTTP/1.1 vs. HTTP/2 throughput in _benchmarks/ with load testing harness using Go's net/http pprof—valuable for demonstrating framework's HTTP/2 claim.
  • Document common gotchas and migration guide from Express.js/Gin patterns to Iris idioms in CONTRIBUTING.md or new PATTERNS.md file (e.g., how iris.Context.JSON differs from gin.Context.JSON signature).

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 4291456 — update dependencies (kataras)
  • 30c1c6b — 🎄 Spread holiday cheer — Merry Christmas from Iris (kataras)
  • d1a6237 — Update dependencies (kataras)
  • 13d2f17 — fix #2587 (kataras)
  • f67b42f — update dependencies (kataras)
  • a03373a — CI: minor: actions/checkout from 4 to 5 (kataras)
  • 92164ce — CI: minor: use the new exclude-paths (dependabot PR approved some days ago) (kataras)
  • a8a3afe — update dependencies (kataras)
  • de4f462 — update dependencies (kataras)
  • af9c821 — update dependencies (kataras)

🔒Security observations

Failed to generate security analysis.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · kataras/iris — RepoPilot