Files
dance-lessons-coach/adr/0002-chi-router.md
Gabriel Radureau 31af8bed07
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 23s
CI/CD Pipeline / CI Pipeline (push) Failing after 4m54s
📝 docs: update existing ADRs with user authentication references
Updated existing Architecture Decision Records:
- Added user authentication references to ADR-0008 (BDD Testing)
- Updated ADR-0016 (CI/CD Pipeline) with authentication workflow
- Enhanced ADR-0017 (Trunk-based Development) with BDD integration
- Added security considerations to multiple ADRs
- Updated cross-references throughout documentation

Removed deprecated files:
- docker-compose.cicd-test.yml (replaced by docker-compose.yml)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-09 00:26:33 +02:00

2.1 KiB

Use Chi router for HTTP routing

  • Status: Accepted
  • Deciders: Gabriel Radureau, AI Agent
  • Date: 2026-04-02

Context and Problem Statement

We needed to choose an HTTP router for the dance-lessons-coach web service that provides:

  • Good performance characteristics
  • Flexible routing capabilities
  • Middleware support
  • Active maintenance and community support
  • Compatibility with our interface-based design

Decision Drivers

  • Need for performant HTTP routing
  • Desire for clean, idiomatic Go API
  • Requirement for middleware support
  • Long-term maintainability
  • Good documentation and examples

Considered Options

  • Chi router - Lightweight, fast router with good middleware support
  • Gorilla Mux - Well-established but heavier
  • Gin - High performance but more opinionated
  • Standard library - Simple but limited features

Decision Outcome

Chosen option: "Chi router" because it provides excellent performance, clean API, good middleware support, and active maintenance while remaining lightweight and unopinionated.

Pros and Cons of the Options

Chi router

  • Good, because lightweight and fast
  • Good, because excellent middleware support
  • Good, because clean, idiomatic Go API
  • Good, because actively maintained
  • Good, because good documentation and examples
  • Bad, because slightly less feature-rich than some alternatives

Gorilla Mux

  • Good, because very mature and stable
  • Good, because feature-rich
  • Bad, because heavier and more complex
  • Bad, because less performant than Chi

Gin

  • Good, because extremely high performance
  • Good, because good ecosystem
  • Bad, because more opinionated framework
  • Bad, because different from standard library patterns

Standard library

  • Good, because no external dependencies
  • Good, because simple and familiar
  • Bad, because limited routing capabilities
  • Bad, because no built-in middleware support