Gallery · Architecture explained · Score · Go
Fiber architecture: modules, API surface, dependency graph
Express-inspired web framework written in Go. Generated from gofiber/fiber at 6e90e08, MIT.
- Files
- 202
- Modules
- 87
- API routes
- 0
- Documents
- 17
GoFiber
Executive Summary
At a Glance
| Aspect | Summary |
|---|---|
| What | Fiber is a early-stage command-line tool |
| Built With | Fiber + Go |
| Scale | 87 modules across 202 files |
| Maturity | Early-stage (1/3 indicators) |
What This System Does
Fiber is a Fiber command-line tool built with Go. It operates as a command-line interface, enabling users to interact with the system through terminal commands. This architecture is optimized for automation, scripting, and integration into CI/CD pipelines.
Business Capabilities
The system is organized around 10 functional domains, each representing a distinct business capability:
| Domain | Capability | Scale |
|---|---|---|
| API Layer | path middleware/proxy matches middleware | 31 modules, 101 files |
| Other | Uncategorized module | 42 modules, 81 files |
| Authentication & Identity | path middleware/session matches session | 1 modules, 6 files |
| Services | path client/client.go matches client | 6 modules, 6 files |
| Plugin System | path addon/retry matches addon | 1 modules, 2 files |
| State Management | path internal/contextvalue matches context | 2 modules, 2 files |
| +4 more | Additional functional areas | — |
Technical Foundation
| Layer | Technologies | Purpose |
|---|---|---|
| Application | Fiber | Core runtime framework |
| Language | Go | Primary development language |
Module Composition
The codebase follows a layered architecture with clear separation of concerns:
| Layer | Count | Key Modules | Responsibility |
|---|---|---|---|
| Other Modules | 3 | root, logtemplate | General purpose functionality |
| middleware | 10 | proxy, cache | Supporting application functionality |
| auth | 1 | session | Supporting application functionality |
| plugin | 1 | retry | Supporting application functionality |
Codebase Health
Overall Health: 🟢 85/100
| Metric | Value | Status |
|---|---|---|
| Internal imports | 3523 edges | ✅ Connected |
| External Packages | 23 | ✅ Manageable |
| Circular Dependencies | cycle-free | ✅ None |
| Orphan Files | 23 | ⚠️ 23 unused |
Key Insights
- ✅ Clean module boundaries — No circular dependencies detected, enabling safe refactoring and testing.
- ⚠️ Coupling hotspot —
adapter.gois imported by 87 files (43% of codebase). Consider splitting. - ⚠️ Potential dead code — 23 files (11%) are not imported anywhere.
Key Data Flows
The system processes information through 6 identified flows:
- csrf.go Request Flow (critical) — Import chain starting from
middleware/csrf/csrf.go— traces how this entry point depends on 1 downstream module - keyauth.go Request Flow (critical) — Import chain starting from
middleware/keyauth/keyauth.go— traces how this entry point depends on 1 downstream module - basicauth.go Request Flow (critical) — Import chain starting from
middleware/basicauth/basicauth.go— traces how this entry point depends on 1 downstream module - config.go Request Flow (critical) — Import chain starting from
middleware/csrf/config.go— traces how this entry point depends on 1 downstream module - session_manager.go Request Flow (critical) — Import chain starting from
middleware/csrf/session_manager.go— traces how this entry point depends on 1 downstream module
Strategic Observations
- The codebase follows Core/kernel architecture — `client/core.go`, Middleware pipeline — `middleware/proxy`, `middleware/cache`, `middleware/logger` (+29 more), Acyclic dependency graph — clean layering architectural patterns, providing a familiar structure for developers.
- With 10 distinct domains, the system has clear separation of concerns suitable for team-based development.
- As a CLI tool, this system is automation-friendly and can integrate into existing workflows and pipelines.
This executive summary was generated from comprehensive repository analysis including dependency graphs, data flow detection, and architectural pattern recognition. Enable AI enhancement with `GITHUB_TOKEN` for strategic recommendations, risk assessments, and plain-language explanations tailored for non-technical stakeholders.
<!-- repolens:docs-badge -->  · Examples
System Overview
The Big Picture
Fiber is a large codebase with multiple interconnected subsystems, containing 87 modules spread across 202 files.
| Dimension | Details |
|---|---|
| Total Files | 202 |
| Module Count | 87 |
| Functional Domains | 10 |
| Interface Type | Command-Line Tool |
Technology Stack
The system is built on a modern technology foundation:
| Layer | Technologies | Purpose |
|---|---|---|
| Runtime | Fiber | Application runtime |
| Language | Go | Primary development language |
Architecture Patterns
The codebase follows 3 identified architectural patterns:
- Core/kernel architecture — `client/core.go` — The system operates as a command-line interface, accepting user input through terminal commands and producing structured output.
- Middleware pipeline — `middleware/proxy`, `middleware/cache`, `middleware/logger` (+29 more) — A structured approach to organizing code and managing complexity.
- Acyclic dependency graph — clean layering — The system operates as a command-line interface, accepting user input through terminal commands and producing structured output.
Module Architecture
The system is organized into 4 architectural layers:
| Layer | Modules | Key Examples | Responsibility |
|---|---|---|---|
| Other Modules | 3 | root, logtemplate | General purpose functionality |
| middleware | 10 | proxy, cache | Supporting application functionality |
| auth | 1 | session | Supporting application functionality |
| plugin | 1 | retry | Supporting application functionality |
Layer Details
Other Modules — 3 modules
root— 37 files — Core application moduleinternal/logtemplate— 3 files — Core application moduleinternal/storage— 2 files — Core application module
middleware — 10 modules
middleware/proxy— 12 files — Request/response middlewaremiddleware/cache— 10 files — Request/response middlewaremiddleware/logger— 10 files — Request/response middlewaremiddleware/csrf— 7 files — Request/response middleware- +6 more modules
auth — 1 module
middleware/session— 6 files — Request/response middleware
plugin — 1 module
addon/retry— 2 files — Core application module
Functional Domains
The following domains represent the largest functional areas by file count:
| Rank | Domain | Scale | Business Capability |
|---|---|---|---|
| 1 | API Layer | 101 files | path middleware/proxy matches middleware |
| 2 | Other | 81 files | Uncategorized module |
| 3 | Authentication & Identity | 6 files | path middleware/session matches session |
| 4 | Services | 6 files | path client/client.go matches client |
| 5 | Plugin System | 2 files | path addon/retry matches addon |
| 6 | State Management | 2 files | path internal/contextvalue matches context |
| — | +4 more | — | Additional domains |
Dependency Graph
Codebase Health: 🟢 85/100
| Metric | Value | Assessment |
|---|---|---|
| Internal Imports | 3523 | Modules are connected |
| External Packages | 23 | Lean dependencies |
| Circular Dependencies | 0 | ✅ Clean |
| Orphan Files | 23 | ⚠️ 23 unused |
Hub modules (most imported):
adapter.go— imported by 87 filesapp.go— imported by 87 filesappconfig.go— imported by 87 filesbind.go— imported by 87 filescolor.go— imported by 87 files
This system overview was generated from comprehensive repository analysis. Enable AI enhancement with `GITHUB_TOKEN` for narrative context, architectural rationale, technology trade-off analysis, and scalability recommendations.
<!-- repolens:docs-badge -->  · Examples
Business Domains
Overview
Fiber is organized into 10 functional domains, each representing a distinct area of business capability. This document maps the technical structure to business-oriented functional areas.
Quick Reference:
| Domain | Modules | Files | Primary Capability |
|---|---|---|---|
| API Layer | 31 | 101 | External API interface layer |
| Other | 42 | 81 | Supporting business operations |
| Authentication & Identity | 1 | 6 | User identity verification and access control |
| Services | 6 | 6 | Supporting business operations |
| Plugin System | 1 | 2 | Extensibility and plugin architecture |
| State Management | 2 | 2 | Application state and data flow management |
| UI Components | 1 | 1 | Reusable visual interface elements |
| Search & Discovery | 1 | 1 | Search and content discovery |
| Core Engine | 1 | 1 | Supporting business operations |
| Delivery | 1 | 1 | Supporting business operations |
1. API Layer
Business Capability
path middleware/proxy matches middleware
This is a major domain with 31 modules and 101 source files.
Key Modules
| Module | Purpose |
|---|---|
middleware/proxy | Request/response middleware |
middleware/cache | Request/response middleware |
middleware/logger | Request/response middleware |
middleware/csrf | Request/response middleware |
middleware/limiter | Request/response middleware |
Business Impact
- Change Frequency Impact: High — Changes here affect 101 files
- Domain Complexity: Complex (multiple modules)
- Recommendation: Ensure comprehensive testing before modifying this domain
2. Other
Business Capability
Uncategorized module
This is a major domain with 42 modules and 81 source files.
Key Modules
| Module | Purpose |
|---|---|
root | Core application module |
internal/logtemplate | Core application module |
internal/storage | Core application module |
binder/binder.go | Core application module |
binder/cbor.go | Core application module |
Business Impact
- Change Frequency Impact: High — Changes here affect 81 files
- Domain Complexity: Complex (multiple modules)
- Recommendation: Ensure comprehensive testing before modifying this domain
3. Authentication & Identity
Business Capability
path middleware/session matches session
This is a focused domain with 1 module and 6 source files.
Key Modules
| Module | Purpose |
|---|---|
middleware/session | Request/response middleware |
Business Impact
- Change Frequency Impact: Low — Changes here affect 6 files
- Domain Complexity: Simple
4. Services
Business Capability
path client/client.go matches client
This is a focused domain with 6 modules and 6 source files.
Key Modules
| Module | Purpose |
|---|---|
client/client.go | Core application module |
client/cookiejar.go | Core application module |
client/errors.go | Core application module |
client/hooks.go | Custom hooks and shared state logic |
client/request.go | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 6 files
- Domain Complexity: Complex (multiple modules)
5. Plugin System
Business Capability
path addon/retry matches addon
This is a focused domain with 1 module and 2 source files.
Key Modules
| Module | Purpose |
|---|---|
addon/retry | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 2 files
- Domain Complexity: Simple
6. State Management
Business Capability
path internal/contextvalue matches context
This is a focused domain with 2 modules and 2 source files.
Key Modules
| Module | Purpose |
|---|---|
internal/contextvalue | Core application module |
log/context.go | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 2 files
- Domain Complexity: Simple
7. UI Components
Business Capability
path binder/form.go matches form
This is a focused domain with 1 module and 1 source file.
Key Modules
| Module | Purpose |
|---|---|
binder/form.go | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 1 file
- Domain Complexity: Simple
8. Search & Discovery
Business Capability
path binder/query.go matches query
This is a focused domain with 1 module and 1 source file.
Key Modules
| Module | Purpose |
|---|---|
binder/query.go | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 1 file
- Domain Complexity: Simple
9. Core Engine
Business Capability
path client/core.go matches core
This is a focused domain with 1 module and 1 source file.
Key Modules
| Module | Purpose |
|---|---|
client/core.go | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 1 file
- Domain Complexity: Simple
10. Delivery
Business Capability
path client/transport.go matches transport
This is a focused domain with 1 module and 1 source file.
Key Modules
| Module | Purpose |
|---|---|
client/transport.go | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 1 file
- Domain Complexity: Simple
Cross-Domain Dependencies
The following modules serve as shared infrastructure across multiple domains:
| Module | Consumers | Role |
|---|---|---|
adapter.go | 87 modules | Core application module |
app.go | 87 modules | Core application module |
appconfig.go | 87 modules | Configuration management |
bind.go | 87 modules | Core application module |
color.go | 87 modules | Core application module |
constants.go | 87 modules | Core application module |
Cross-Domain Integration Points
These modules facilitate communication and data sharing between domains:
- `adapter.go` serves as a central integration point, imported by 87 different modules. Changes to this module have wide-ranging impact and should be carefully coordinated.
- `app.go` serves as a central integration point, imported by 87 different modules. Changes to this module have wide-ranging impact and should be carefully coordinated.
- `appconfig.go` serves as a central integration point, imported by 87 different modules. Changes to this module have wide-ranging impact and should be carefully coordinated.
Domain Health Summary
| Metric | Value | Assessment |
|---|---|---|
| Total Domains | 10 | Well-balanced |
| Avg Files/Domain | 20 | Appropriate size |
| Largest Domain | API Layer (101 files) | Reasonable |
| Domain Concentration | 50% in largest | ✅ Well distributed |
Domain mapping is based on directory naming conventions and code organization patterns. Enable AI enhancement with `GITHUB_TOKEN` for business-language descriptions, stakeholder impact analysis, strategic recommendations, and cross-domain relationship narratives.
<!-- repolens:docs-badge -->  · Examples
Architecture Overview
Architectural Philosophy
Fiber follows a Core/kernel architecture — `client/core.go` architecture with elements of Middleware pipeline — `middleware/proxy`, `middleware/cache`, `middleware/logger` (+29 more), Acyclic dependency graph — clean layering.
Pattern Analysis
Core/kernel architecture — `client/core.go`
The system operates as a command-line interface, accepting user input through terminal commands and producing structured output.
Benefits: Automation-friendly, scriptable, integrates with CI/CD pipelines
Middleware pipeline — `middleware/proxy`, `middleware/cache`, `middleware/logger` (+29 more)
A structured approach to organizing code and managing complexity.
Benefits: Structured organization, maintainability, clarity
Acyclic dependency graph — clean layering
The system operates as a command-line interface, accepting user input through terminal commands and producing structured output.
Benefits: Automation-friendly, scriptable, integrates with CI/CD pipelines
System Layers
The system is organized into 10 functional layers, each encapsulating a distinct area of responsibility:
| Layer | Responsibility | Scale | Key Insight |
|---|---|---|---|
| API Layer | path middleware/proxy matches middleware | 101 files | Large domain — consider breaking down |
| Other | Uncategorized module | 81 files | Standard domain |
| Authentication & Identity | path middleware/session matches session | 6 files | Security-critical — extra review needed |
| Services | path `client/client | 6 files | Standard domain |
| Plugin System | path addon/retry matches addon | 2 files | Standard domain |
| State Management | path internal/contextvalue matches context | 2 files | Standard domain |
| UI Components | path `binder/form | 1 files | Standard domain |
| Search & Discovery | path `binder/query | 1 files | Standard domain |
| +2 more | Additional layers | — | — |
Module Layers
Modules are classified into 4 architectural roles:
Other Modules
Role: General purpose functionality
| Module | Files | Description |
|---|---|---|
root | 37 | Core application module |
internal/logtemplate | 3 | Core application module |
internal/storage | 2 | Core application module |
middleware
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
middleware/proxy | 12 | Request/response middleware |
middleware/cache | 10 | Request/response middleware |
middleware/logger | 10 | Request/response middleware |
middleware/csrf | 7 | Request/response middleware |
middleware/limiter | 6 | Request/response middleware |
| +5 more | — | Additional modules |
auth
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
middleware/session | 6 | Request/response middleware |
plugin
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
addon/retry | 2 | Core application module |
Technology Foundation
| Layer | Technologies | Architectural Implication |
|---|---|---|
| Application | Fiber | Standard application patterns |
| Language | Go | Fast compilation, strong concurrency support |
Scale & Complexity Analysis
| Dimension | Value | Assessment |
|---|---|---|
| Total Files | 202 | large project |
| Module Count | 87 | medium-high complexity |
| Domain Spread | 10 domains | Good separation |
| Interface | CLI | Terminal-driven interaction |
Dependency Health
Architecture Health Score: 🟢 85/100
| Metric | Value | Status | Recommendation |
|---|---|---|---|
| Import Edges | 3523 | ✅ | Healthy module connectivity |
| External Packages | 23 | ✅ | Lean dependency set |
| Circular Deps | 0 | ✅ | Clean module boundaries |
| Orphan Files | 23 | ⚠️ | Review for dead code |
Architectural Strengths
- Clean module boundaries — No circular dependencies detected. This enables safe refactoring, isolated testing, and clear ownership boundaries.
Concerns
- Central coupling hotspot —
adapter.gois imported by 87 files (43%). Consider breaking into smaller modules. Priority: Medium.
Hub modules (most imported):
adapter.go— imported by 87 filesapp.go— imported by 87 filesappconfig.go— imported by 87 filesbind.go— imported by 87 filescolor.go— imported by 87 files
This architecture overview was generated from comprehensive dependency graph analysis and pattern detection. Enable AI enhancement with `GITHUB_TOKEN` for architectural narratives, design rationale explanations, scalability analysis, and refactoring recommendations.
<!-- repolens:docs-badge -->  · Examples
Module Catalog
A complete inventory of all code modules in the repository, organized by location and size. Each module represents a distinct area of responsibility within the codebase.
Total modules: 87
Module Inventory
| Module | Files | Role | Owners |
|---|---|---|---|
root | 37 | Application module | — |
middleware/proxy | 12 | Request middleware and interceptors · Orchestrator (coordinates 233 modules) | @gofiber/maintainers |
middleware/cache | 10 | Request middleware and interceptors · Orchestrator (coordinates 243 modules) | @gofiber/maintainers |
middleware/logger | 10 | Request middleware and interceptors · Critical shared infrastructure (imported by 50 modules) | @gofiber/maintainers |
middleware/csrf | 7 | Request middleware and interceptors · Orchestrator (coordinates 223 modules) | @gofiber/maintainers |
middleware/limiter | 6 | Request middleware and interceptors · Orchestrator (coordinates 187 modules) | @gofiber/maintainers |
middleware/session | 6 | Request middleware and interceptors · Orchestrator (coordinates 176 modules) | @gofiber/maintainers |
middleware/idempotency | 5 | Request middleware and interceptors · Orchestrator (coordinates 81 modules) | @gofiber/maintainers |
internal/logtemplate | 3 | Application module · Critical shared infrastructure (imported by 21 modules) | @gofiber/maintainers |
middleware/encryptcookie | 3 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/paginate | 3 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/sse | 3 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
addon/retry | 2 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/storage | 2 | Application module · Leaf module (consumed only, 4 importers) | @gofiber/maintainers |
middleware/basicauth | 2 | Request middleware and interceptors · Orchestrator (coordinates 86 modules) | @gofiber/maintainers |
middleware/compress | 2 | Request middleware and interceptors · Orchestrator (coordinates 77 modules) | @gofiber/maintainers |
middleware/cors | 2 | Request middleware and interceptors · Orchestrator (coordinates 80 modules) | @gofiber/maintainers |
middleware/earlydata | 2 | Request middleware and interceptors · Orchestrator (coordinates 75 modules) | @gofiber/maintainers |
middleware/envvar | 2 | Request middleware and interceptors · Orchestrator (coordinates 37 modules) | @gofiber/maintainers |
middleware/etag | 2 | Request middleware and interceptors · Orchestrator (coordinates 79 modules) | @gofiber/maintainers |
middleware/expvar | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/favicon | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/healthcheck | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/helmet | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/hostauthorization | 2 | Request middleware and interceptors · Orchestrator (coordinates 75 modules) | @gofiber/maintainers |
middleware/keyauth | 2 | Request middleware and interceptors · Orchestrator (coordinates 89 modules) | @gofiber/maintainers |
middleware/pprof | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/recover | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/redirect | 2 | Request middleware and interceptors · Orchestrator (coordinates 80 modules) | @gofiber/maintainers |
middleware/requestid | 2 | Request middleware and interceptors · Orchestrator (coordinates 84 modules) | @gofiber/maintainers |
middleware/responsetime | 2 | Request middleware and interceptors · Orchestrator (coordinates 74 modules) | @gofiber/maintainers |
middleware/rewrite | 2 | Request middleware and interceptors · Orchestrator (coordinates 76 modules) | @gofiber/maintainers |
middleware/static | 2 | Request middleware and interceptors · Orchestrator (coordinates 76 modules) | @gofiber/maintainers |
middleware/timeout | 2 | Request middleware and interceptors · Orchestrator (coordinates 78 modules) | @gofiber/maintainers |
binder/binder.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/cbor.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/cookie.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/form.go | 1 | Application module · Connector (3 in, 1 out) | @gofiber/maintainers |
binder/header.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/json.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/mapping.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/msgpack.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/query.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/resp_header.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/uri.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
binder/xml.go | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
client/client.go | 1 | Application module | @gofiber/maintainers |
client/cookiejar.go | 1 | Application module · Isolated (no imports or importers) | @gofiber/maintainers |
client/core.go | 1 | Core business logic and shared foundations · Orchestrator (coordinates 39 modules) | @gofiber/maintainers |
client/errors.go | 1 | Application module · Isolated (no imports or importers) | @gofiber/maintainers |
client/hooks.go | 1 | Hook callbacks | @gofiber/maintainers |
client/request.go | 1 | Application module · Orchestrator (coordinates 37 modules) | @gofiber/maintainers |
client/response.go | 1 | Application module · Isolated (no imports or importers) | @gofiber/maintainers |
client/transport.go | 1 | Application module | @gofiber/maintainers |
extractors/extractors.go | 1 | Application module · Orchestrator (coordinates 40 modules) | @gofiber/maintainers |
internal/appconfig | 1 | Application module · Leaf module (consumed only, 5 importers) | @gofiber/maintainers |
internal/byterange | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/clocktest | 1 | Application module · Isolated (no imports or importers) | @gofiber/maintainers |
internal/contextvalue | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/cookie | 1 | Application module · Leaf module (consumed only, 4 importers) | @gofiber/maintainers |
internal/crosshost | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/ctxlocal | 1 | Application module · Orchestrator (coordinates 37 modules) | @gofiber/maintainers |
internal/etag | 1 | Application module · Connector (3 in, 1 out) | @gofiber/maintainers |
internal/fieldname | 1 | Application module · Leaf module (consumed only, 10 importers) | @gofiber/maintainers |
internal/fspath | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/headerlist | 1 | Application module · Leaf module (consumed only, 12 importers) | @gofiber/maintainers |
internal/headerlookup | 1 | Application module · Orchestrator (coordinates 39 modules) | @gofiber/maintainers |
internal/idnafold | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/loggertest | 1 | Application module | @gofiber/maintainers |
internal/mediatype | 1 | Application module · Leaf module (consumed only, 6 importers) | @gofiber/maintainers |
internal/memory | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
internal/nilerror | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
internal/origin | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/paramdelim | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/quotedstring | 1 | Application module · Leaf module (consumed only, 4 importers) | @gofiber/maintainers |
internal/redact | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
internal/rulematch | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/schemehost | 1 | Application module · Leaf module (consumed only, 3 importers) | @gofiber/maintainers |
internal/tlstest | 1 | Application module · Isolated (no imports or importers) | @gofiber/maintainers |
internal/urlnorm | 1 | Application module · Leaf module (consumed only, 2 importers) | @gofiber/maintainers |
internal/wiretarget | 1 | Application module · Orchestrator (coordinates 38 modules) | @gofiber/maintainers |
log/context.go | 1 | Application module · Critical shared infrastructure (imported by 19 modules) | @gofiber/maintainers |
log/default.go | 1 | Application module · Critical shared infrastructure (imported by 19 modules) | @gofiber/maintainers |
log/fiberlog.go | 1 | Application module · Critical shared infrastructure (imported by 19 modules) | @gofiber/maintainers |
log/log.go | 1 | Application module · Critical shared infrastructure (imported by 19 modules) | @gofiber/maintainers |
middleware/adaptor | 1 | Request middleware and interceptors · Orchestrator (coordinates 39 modules) | @gofiber/maintainers |
middleware/skip | 1 | Request middleware and interceptors · Orchestrator (coordinates 37 modules) | @gofiber/maintainers |
Module detection is based on the `module_roots` setting in your RepoLens configuration. Adjust this setting to change how modules are grouped.
<!-- repolens:docs-badge -->  · Examples
Route Map
A complete listing of user-facing pages and backend API endpoints. This map shows every URL a user or client can interact with, along with the source file that handles each route.
Route Detection
This project is a CLI tool — it does not expose HTTP routes or serve web pages. This is expected behavior, not a detection failure.
CLI tools interact through terminal commands rather than URLs. See the System Overview or Developer Onboarding documents for command documentation.
<!-- repolens:docs-badge -->  · Examples
API Surface
This page documents both the API endpoints the application exposes and the external services it integrates with. Use it as a reference for understanding the system's interfaces.
Internal API Endpoints
These are the backend services the application provides to handle incoming requests.
No API routes were detected in this scan. If your project uses a routing framework (Express, Fastify, NestJS, etc.), ensure the relevant directories are included in your scan.include patterns.
External API Integrations
Third-party services the application connects to, grouped by category.
No external API integrations were detected. This section populates automatically when RepoLens identifies SDK imports or API client usage in your codebase.
HTTP method reference — GET: retrieve data, POST: create, PUT/PATCH: update, DELETE: remove.
<!-- repolens:docs-badge -->  · Examples
Data Flows
Understanding Data Movement
Data flows describe how information moves through Fiber — from external inputs through processing layers to storage or presentation. Understanding these flows is essential for debugging, performance optimization, and architectural decisions.
Flow Summary
6 data flows identified in the codebase:
| Flow | Type | Complexity | Critical |
|---|---|---|---|
| csrf.go Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| keyauth.go Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| basicauth.go Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| config.go Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| session_manager.go Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| Authentication Flow | Integration | Medium (5 steps) | 🔴 Yes |
1. csrf.go Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from middleware/csrf/csrf.go — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | csrf.go (entry point, imports 52 modules) | Data acquisition |
| 2 | adapter.go (shared infrastructure, used by 87 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `csrf.go` (entry point, imports 52 modules) │
│ ↓
│ `adapter.go` (shared infrastructure, used by 87... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
csrf.go | Request/response middleware |
adapter.go | Core application module |
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
2. keyauth.go Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from middleware/keyauth/keyauth.go — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | keyauth.go (entry point, imports 50 modules) | Data acquisition |
| 2 | adapter.go (shared infrastructure, used by 87 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `keyauth.go` (entry point, imports 50 modules) │
│ ↓
│ `adapter.go` (shared infrastructure, used by 87... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
keyauth.go | Authentication and authorization logic |
adapter.go | Core application module |
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
3. basicauth.go Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from middleware/basicauth/basicauth.go — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | basicauth.go (entry point, imports 48 modules) | Data acquisition |
| 2 | adapter.go (shared infrastructure, used by 87 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `basicauth.go` (entry point, imports 48 modules) │
│ ↓
│ `adapter.go` (shared infrastructure, used by 87... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
basicauth.go | Authentication and authorization logic |
adapter.go | Core application module |
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
4. config.go Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from middleware/csrf/config.go — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | config.go (entry point, imports 48 modules) | Data acquisition |
| 2 | adapter.go (shared infrastructure, used by 87 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `config.go` (entry point, imports 48 modules) │
│ ↓
│ `adapter.go` (shared infrastructure, used by 87... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
config.go | Configuration management |
adapter.go | Core application module |
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
5. session_manager.go Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from middleware/csrf/session_manager.go — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | session_manager.go (entry point, imports 47 modules) | Data acquisition |
| 2 | adapter.go (shared infrastructure, used by 87 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `session_manager.go` (entry point, imports 47 m... │
│ ↓
│ `adapter.go` (shared infrastructure, used by 87... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
session_manager.go | Request/response middleware |
adapter.go | Core application module |
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
6. Authentication Flow 🔴 CRITICAL FLOW
Description
User authentication and session management
Characteristics
| Property | Value |
|---|---|
| Steps | 5 |
| Modules Involved | 4 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | User submits login credentials | Security check |
| 2 | Auth API validates credentials | Input validation |
| 3 | Session is created and stored | Data persistence |
| 4 | User is redirected to authenticated area | Security check |
| 5 | Subsequent requests include auth token | Security check |
Flow Diagram
┌─ START ─┐
│ User submits login credentials │
│ ↓
│ Auth API validates credentials │
│ ↓
│ Session is created and stored │
│ ↓
│ User is redirected to authenticated area │
│ ↓
│ Subsequent requests include auth token │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
session | Request/response middleware |
basicauth | Authentication and authorization logic |
hostauthorization | Authentication and authorization logic |
keyauth | Authentication and authorization logic |
Dependencies
External services: Authentication service
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
Import Network
The system has 3523 internal import edges connecting 202 source files.
Network Topology
| Metric | Value | Meaning |
|---|---|---|
| Total Edges | 3523 | Direct import relationships |
| Hub Count | 10 | Central integration points |
| Avg Connections | ~17.4 per file | Coupling density |
Key Integration Points
These modules aggregate data from multiple sources:
| Hub | Inbound | Role |
|---|---|---|
adapter.go | 87 files | Core application module |
app.go | 87 files | Core application module |
appconfig.go | 87 files | Configuration management |
bind.go | 87 files | Core application module |
color.go | 87 files | Core application module |
Flow detection uses naming conventions, import patterns, and dependency graph analysis. Enable AI enhancement with `GITHUB_TOKEN` for end-to-end flow narratives, failure mode analysis, data transformation descriptions, and performance bottleneck identification.
<!-- repolens:docs-badge -->  · Examples
Architecture Diff
No changes detected.
<!-- repolens:docs-badge -->  · Examples
System Map
What is this? This visual diagram shows how different parts of your codebase connect to each other. Arrows indicate dependencies (which modules use which).
Showing: 30 modules and 10 relationships
Source: Real import analysis
Architecture Diagram
┌─────────────────────────────────────────────────────────────┐
│ 🏗️ SYSTEM ARCHITECTURE MAP │
└─────────────────────────────────────────────────────────────┘
📋 RENDERING
│
└── logtemplate (3 files)
│
🔀 MIDDLEWARE
│
├── proxy (12 files)
├── cache (10 files)
├── logger (10 files)
│ → logtemplate
├── csrf (7 files)
│ → session
│ → logger
├── limiter (6 files)
├── session (6 files)
│ → logger
│ → storage
├── idempotency (5 files)
│ → storage
├── encryptcookie (3 files)
├── paginate (3 files)
├── sse (3 files)
├── basicauth (2 files)
│ → logger
├── compress (2 files)
│ → etag
├── cors (2 files)
├── earlydata (2 files)
├── envvar (2 files)
├── etag (2 files)
├── expvar (2 files)
├── favicon (2 files)
├── healthcheck (2 files)
├── helmet (2 files)
├── hostauthorization (2 files)
├── keyauth (2 files)
│ → logger
├── pprof (2 files)
├── recover (2 files)
├── redirect (2 files)
└── requestid (2 files)
→ logger
│
📦 OTHER
│
├── root (37 files)
├── retry (2 files)
└── storage (2 files)
│
Legend:
→ imports / depends on
╌→ tests
Key Connections
Most depended-on modules (highest import count):
| Module | Imported by |
|---|---|
middleware/logger | 50 modules |
internal/logtemplate | 18 modules |
middleware/session | 12 modules |
internal/storage | 4 modules |
middleware/etag | 2 modules |
Most dependent modules (highest dependency count):
| Module | Depends on |
|---|---|
middleware/csrf | 22 modules |
middleware/logger | 18 modules |
middleware/session | 12 modules |
middleware/basicauth | 10 modules |
middleware/keyauth | 10 modules |
<!-- repolens:docs-badge -->  · Examples
Developer Onboarding
Welcome to Fiber! 👋
This guide will help you get up to speed quickly. Fiber is a Fiber project built with Go, containing 87 modules across 202 files.
What You'll Learn
- ✅ Repository structure and organization
- ✅ Technology stack and tools
- ✅ Key modules to understand first
- ✅ How data flows through the system
- ✅ How to start contributing
Quick Reference Card
| Aspect | Details |
|---|---|
| Languages | Go |
| Frameworks | Fiber |
| Build Tools | Standard toolchain |
| Size | 87 modules, 202 files |
| Domains | 10 functional areas |
| Type | Command-line interface |
Repository Structure
Understanding the directory layout is your first step to navigating the codebase:
| Directory | Purpose | Start Here? |
|---|---|---|
middleware | Middleware pipeline | — |
internal | Project files | — |
binder | Project files | — |
client | Project files | — |
log | Project files | — |
extractors | Project files | — |
addon | Project files | — |
Where to Begin
Start by exploring the main src/ directory or look for entry point files like index.js, main.js, or app.js.
Technology Stack
| Layer | Technologies | What to Learn |
|---|---|---|
| Framework | Fiber | Review the framework documentation |
| Language | Go | Review language idioms used in the codebase |
Core Modules to Understand
These are the most important modules by size and centrality. Understanding them will unlock the rest of the codebase:
| Priority | Module | Files | Type | Why It Matters |
|---|---|---|---|---|
| ⭐ High | root | 37 | Other Modules | Large module — core functionality |
| ⭐ High | middleware/proxy | 12 | middleware | Key system component |
| ⭐ High | middleware/cache | 10 | middleware | Key system component |
| Medium | middleware/logger | 10 | middleware | Key system component |
| Medium | middleware/csrf | 7 | middleware | Key system component |
| Medium | middleware/limiter | 6 | middleware | Key system component |
| Low | middleware/session | 6 | auth | Key system component |
| Low | middleware/idempotency | 5 | middleware | Key system component |
| Low | internal/logtemplate | 3 | Other Modules | Key system component |
| Low | middleware/encryptcookie | 3 | middleware | Key system component |
Key Integration Points
These modules are imported by many other files. Changes here have wide impact:
- `adapter.go` — Used by 87 files — Core application module
- `app.go` — Used by 87 files — Core application module
- `appconfig.go` — Used by 87 files — Configuration management
- `bind.go` — Used by 87 files — Core application module
- `color.go` — Used by 87 files — Core application module
⚠️ Caution: Be extra careful when modifying these files. Consider the ripple effects.
How Data Flows
Understanding these flows helps you see how the system processes information end-to-end:
| Flow | Description | Key Modules |
|---|---|---|
| csrf.go Request Flow | Import chain starting from middleware/csrf/csrf.go — trace... | csrf.go, adapter.go |
| keyauth.go Request Flow | Import chain starting from middleware/keyauth/keyauth.go —... | keyauth.go, adapter.go |
| basicauth.go Request Flow | Import chain starting from `middleware/basicauth/basicauth.g... | basicauth.go, adapter.go |
| config.go Request Flow | Import chain starting from middleware/csrf/config.go — tra... | config.go, adapter.go |
| session_manager.go Request Flow | Import chain starting from `middleware/csrf/session_manager.... | session_manager.go, adapter.go |
Debugging tip: When investigating issues, trace the data flow from input to output to identify where problems occur.
Getting Started Checklist
Follow these steps to set up your development environment:
1. Clone and Install
git clone <repository-url>
cd fiber
npm install # or yarn, pnpm
2. Explore the Structure
- Review the directory structure above
- Open the
README.mdfor project-specific instructions - Look for
CONTRIBUTING.mdfor contribution guidelines
3. Understand Core Modules
Start with the high-priority modules listed above. Read the code and comments to understand:
- What problem each module solves
- How modules interact with each other
- What data structures are used
4. Make Your First Change
Start small:
- Find a small bug or typo to fix
- Make the change in a feature branch
- Run tests to ensure nothing breaks
- Submit a pull request for review
Common Pitfalls
New contributors often run into these issues:
- High-impact modules —
adapter.gois used by 43% of the codebase. Changes here need thorough testing. - Environment setup — Check for
.env.examplefiles and ensure you have all required environment variables. - Branch naming — Follow the team's branch naming conventions (usually
feature/,fix/,docs/).
Additional Resources
| Resource | Purpose |
|---|---|
README.md | Project overview and quick start |
CONTRIBUTING.md | Contribution guidelines (if exists) |
CHANGELOG.md | Recent changes and release history |
package.json | Available scripts and dependencies |
This onboarding guide was generated from comprehensive repository analysis. Enable AI enhancement with `GITHUB_TOKEN` for narrative walkthroughs, common pitfall documentation, debugging tips, architecture deep-dives, and personalized contribution recommendations.
Welcome to the team! Happy coding! 🚀
<!-- repolens:docs-badge -->  · Examples
GraphQL Schema
No GraphQL schema was detected in this repository.
RepoLens scans for .graphql and .gql schema files, inline SDL via tagged template literals (e.g. gql\...\``), resolver patterns, and popular GraphQL libraries including Apollo, Yoga, Nexus, Pothos, Mercurius, type-graphql, Relay, and urql.
If your project uses GraphQL, ensure the relevant source directories are included in your scan.include configuration.
<!-- repolens:docs-badge -->  · Examples
TypeScript Type Graph
No TypeScript type declarations were detected in this repository.
RepoLens analyzes .ts and .tsx files for interface declarations, type aliases, classes, and enums. Ensure your TypeScript source directories are included in the scan.include configuration.
<!-- repolens:docs-badge -->  · Examples
Dependency Graph
202 files · 3523 imports · 23 external packages · ✓ no circular dependencies · 23 orphan file(s)
This document maps every import relationship in the codebase, identifies the most-connected modules, and flags circular dependencies that may complicate refactoring or increase build times.
Overview
| Metric | Value |
|---|---|
| Source files | 202 |
| Import edges | 3523 |
| External packages | 23 |
| Circular dependencies | 0 |
| Orphan files (no imports or importers) | 23 |
Hub Modules
These are the most-imported modules in the codebase. Changes to hub modules have the widest blast radius and should be reviewed carefully:
| Module | Imported By |
|---|---|
adapter.go | 87 files |
app.go | 87 files |
appconfig.go | 87 files |
bind.go | 87 files |
color.go | 87 files |
constants.go | 87 files |
constraint.go | 87 files |
ctx.go | 87 files |
ctx_interface.go | 87 files |
ctx_interface_gen.go | 87 files |
External Dependencies
The codebase imports 23 external packages. These are third-party modules (not the language standard library):
| Package |
| --------- |
github.com/fxamacker/cbor/v2 |
github.com/gofiber/schema |
github.com/gofiber/utils/v2 |
github.com/gofiber/utils/v2/bytes |
github.com/gofiber/utils/v2/strings |
github.com/gofiber/utils/v2/swar |
github.com/google/uuid |
github.com/mattn/go-colorable |
github.com/mattn/go-isatty |
github.com/tinylib/msgp/msgp |
github.com/valyala/bytebufferpool |
github.com/valyala/fasthttp |
github.com/valyala/fasthttp/expvarhandler |
github.com/valyala/fasthttp/fasthttpadaptor |
github.com/valyala/fasthttp/fasthttpproxy |
github.com/valyala/fasthttp/prefork |
golang.org/x/crypto/acme/autocert |
golang.org/x/crypto/bcrypt |
golang.org/x/net/http/httpguts |
golang.org/x/net/http/httpproxy |
golang.org/x/net/idna |
golang.org/x/net/publicsuffix |
golang.org/x/text/unicode/norm |
Generated by RepoLens import analysis. Dependency detection covers JavaScript and TypeScript (ES modules, dynamic import, CommonJS, re-exports; comments, strings, and type-only imports are skipped), Python (`import` / `from ... import`, including relative imports), and Go (`go.mod` module paths). Go `_test.go` files are not part of the graph.*
<!-- repolens:docs-badge -->  · Examples
Architecture Drift
No baseline found. Run
repolens publishonce to establish a baseline.
A baseline snapshot of the current architecture has been saved. On subsequent runs, this report will track structural changes across the following dimensions:
| Dimension | What is Tracked |
|---|---|
| Modules | New, removed, or significantly resized modules |
| API Endpoints | Added or removed backend routes |
| Dependencies | Changes to external package imports |
| Frameworks | Technology stack additions or removals |
| Circular Dependencies | Increases in dependency cycles |
| GraphQL Schema | Type additions or removals |
| Codebase Scale | Overall file count changes |
<!-- repolens:docs-badge -->  · Examples
Security Hotspots
No security anti-patterns were detected in the scanned source files.
RepoLens scans JavaScript and TypeScript source files for common security risks including code injection (eval), XSS (innerHTML), SQL injection, command injection, prototype pollution, hardcoded credentials, and insecure randomness.
Test files, configs, and build outputs are excluded from analysis to reduce false positives.
<!-- repolens:docs-badge -->  · Examples
Code Health Report
202 files analyzed · Average health: 79/100 · 123 A, 27 B, 40 C, 12 D, 0 F
This report synthesizes complexity, coupling, documentation, and security signals into a single health score per module. Lower scores indicate higher risk and maintenance burden.
Overview
| Metric | Value |
|---|---|
| Files analyzed | 202 |
| Average health score | 79/100 |
| Average complexity | 32 |
| Hotspots (score < 60) | 20 |
Grade Distribution
| Grade | Count | Meaning |
|---|---|---|
| 🟢 A (80–100) | 123 | Healthy — low complexity, well-documented |
| 🔵 B (60–79) | 27 | Acceptable — minor improvements possible |
| 🟡 C (40–59) | 40 | Needs attention — elevated complexity or coupling |
| 🟠 D (20–39) | 12 | At risk — multiple quality signals degraded |
| 🔴 F (0–19) | 0 | Critical — immediate refactoring recommended |
Hotspots — Priority Refactoring Targets
These modules have the lowest health scores and should be prioritized for improvement:
| Module | Score | Grade | Complexity | Coupling | Doc% | Security |
|---|---|---|---|---|---|---|
app.go | 30 | 🟠 D | 175 | 87↓ 17↑ | — | — |
bind.go | 30 | 🟠 D | 75 | 87↓ 13↑ | — | — |
extractors/extractors.go | 30 | 🟠 D | 78 | 7↓ 40↑ | — | — |
helpers.go | 30 | 🟠 D | 212 | 87↓ 20↑ | — | — |
internal/wiretarget/wiretarget.go | 30 | 🟠 D | 77 | 3↓ 38↑ | — | — |
listen.go | 30 | 🟠 D | 107 | 87↓ 4↑ | — | — |
redirect.go | 30 | 🟠 D | 72 | 87↓ 2↑ | — | — |
req.go | 30 | 🟠 D | 257 | 87↓ 4↑ | — | — |
res.go | 30 | 🟠 D | 240 | 87↓ 6↑ | — | — |
path.go | 32 | 🟠 D | 320 | 87↓ 1↑ | — | — |
router.go | 32 | 🟠 D | 266 | 87↓ 1↑ | — | — |
middleware/logger/default_logger.go | 38 | 🟠 D | 35 | 5↓ 40↑ | — | — |
middleware/session/session.go | 41 | 🟡 C | 50 | 2↓ 39↑ | — | — |
middleware/session/store.go | 42 | 🟡 C | 33 | 2↓ 45↑ | — | — |
adapter.go | 45 | 🟡 C | 54 | 87↓ 0↑ | — | — |
client/client.go | 45 | 🟡 C | 41 | 0↓ 4↑ | — | — |
client/cookiejar.go | 45 | 🟡 C | 120 | 0↓ 0↑ | — | — |
client/core.go | 45 | 🟡 C | 42 | 0↓ 39↑ | — | — |
client/hooks.go | 45 | 🟡 C | 111 | 0↓ 1↑ | — | — |
client/request.go | 45 | 🟡 C | 71 | 0↓ 37↑ | — | — |
Most Complex Functions
These functions have the highest cyclomatic complexity and are the most likely sources of bugs:
| Function | File | Line | Complexity |
|---|---|---|---|
New() | middleware/cache/cache.go | 194 | 264 |
UnmarshalMsg() | middleware/cache/manager_msgp.go | 685 | 87 |
DecodeMsg() | middleware/cache/manager_msgp.go | 176 | 71 |
EncodeMsg() | middleware/cache/manager_msgp.go | 393 | 44 |
New() | middleware/cors/cors.go | 89 | 41 |
New() | middleware/static/static.go | 120 | 38 |
SendFile() | res.go | 1244 | 38 |
getOffer() | helpers.go | 655 | 36 |
next() | router.go | 646 | 36 |
nextCustom() | router.go | 821 | 36 |
IsMethodIdempotent() | helpers.go | 1190 | 35 |
isJSONPMemberExpression() | res.go | 869 | 32 |
analyseParameterPart() | path.go | 1034 | 31 |
matchBacktrack() | path.go | 1264 | 31 |
adaptExpressHandler() | adapter.go | 52 | 29 |
All Modules by Health Score
Showing 50 of 202 modules (sorted worst-first)
| Module | Score | Grade | Lines | Complexity | Fan-In | Fan-Out |
|---|---|---|---|---|---|---|
app.go | 30 | 🟠 D | 1912 | 175 | 87 | 17 |
bind.go | 30 | 🟠 D | 583 | 75 | 87 | 13 |
extractors/extractors.go | 30 | 🟠 D | 955 | 78 | 7 | 40 |
helpers.go | 30 | 🟠 D | 1386 | 212 | 87 | 20 |
internal/wiretarget/wiretarget.go | 30 | 🟠 D | 334 | 77 | 3 | 38 |
listen.go | 30 | 🟠 D | 879 | 107 | 87 | 4 |
redirect.go | 30 | 🟠 D | 590 | 72 | 87 | 2 |
req.go | 30 | 🟠 D | 1826 | 257 | 87 | 4 |
res.go | 30 | 🟠 D | 1714 | 240 | 87 | 6 |
path.go | 32 | 🟠 D | 1548 | 320 | 87 | 1 |
router.go | 32 | 🟠 D | 1638 | 266 | 87 | 1 |
middleware/logger/default_logger.go | 38 | 🟠 D | 337 | 35 | 5 | 40 |
middleware/session/session.go | 41 | 🟡 C | 707 | 50 | 2 | 39 |
middleware/session/store.go | 42 | 🟡 C | 392 | 33 | 2 | 45 |
adapter.go | 45 | 🟡 C | 282 | 54 | 87 | 0 |
client/client.go | 45 | 🟡 C | 1115 | 41 | 0 | 4 |
client/cookiejar.go | 45 | 🟡 C | 894 | 120 | 0 | 0 |
client/core.go | 45 | 🟡 C | 355 | 42 | 0 | 39 |
client/hooks.go | 45 | 🟡 C | 673 | 111 | 0 | 1 |
client/request.go | 45 | 🟡 C | 1139 | 71 | 0 | 37 |
ctx.go | 45 | 🟡 C | 1152 | 111 | 87 | 0 |
domain.go | 45 | 🟡 C | 902 | 91 | 87 | 0 |
hooks.go | 45 | 🟡 C | 490 | 42 | 87 | 4 |
internal/mediatype/mediatype.go | 45 | 🟡 C | 206 | 51 | 6 | 0 |
middleware/adaptor/adaptor.go | 45 | 🟡 C | 1026 | 133 | 0 | 39 |
middleware/basicauth/basicauth.go | 45 | 🟡 C | 247 | 43 | 0 | 48 |
middleware/cache/cache.go | 45 | 🟡 C | 1424 | 267 | 0 | 43 |
middleware/cache/cachecontrol.go | 45 | 🟡 C | 219 | 60 | 0 | 2 |
middleware/cache/manager_msgp.go | 45 | 🟡 C | 1015 | 234 | 0 | 0 |
middleware/cors/cors.go | 45 | 🟡 C | 334 | 54 | 0 | 43 |
middleware/csrf/csrf.go | 45 | 🟡 C | 472 | 52 | 0 | 52 |
middleware/hostauthorization/hostauthorization.go | 45 | 🟡 C | 290 | 65 | 0 | 38 |
middleware/idempotency/response_msgp.go | 45 | 🟡 C | 283 | 57 | 0 | 0 |
middleware/proxy/blockedip.go | 45 | 🟡 C | 181 | 53 | 0 | 0 |
middleware/proxy/upstream.go | 45 | 🟡 C | 277 | 69 | 0 | 0 |
middleware/static/static.go | 45 | 🟡 C | 364 | 61 | 0 | 39 |
router_skip.go | 45 | 🟡 C | 279 | 56 | 87 | 0 |
binder/mapping.go | 46 | 🟡 C | 834 | 140 | 3 | 0 |
client/transport.go | 46 | 🟡 C | 661 | 64 | 0 | 1 |
internal/fspath/fspath.go | 46 | 🟡 C | 212 | 57 | 2 | 0 |
middleware/cache/keygen.go | 46 | 🟡 C | 382 | 44 | 0 | 38 |
mount.go | 46 | 🟡 C | 871 | 91 | 87 | 0 |
middleware/basicauth/config.go | 47 | 🟡 C | 330 | 37 | 0 | 38 |
middleware/compress/compress.go | 48 | 🟡 C | 212 | 41 | 0 | 40 |
middleware/redirect/redirect.go | 48 | 🟡 C | 452 | 77 | 0 | 43 |
redirect_msgp.go | 48 | 🟡 C | 302 | 53 | 87 | 0 |
router_filter.go | 50 | 🟡 C | 304 | 40 | 87 | 0 |
internal/fieldname/fieldname.go | 52 | 🟡 C | 315 | 49 | 10 | 0 |
internal/headerlist/headerlist.go | 54 | 🟡 C | 332 | 55 | 12 | 0 |
middleware/cache/credential.go | 56 | 🟡 C | 592 | 93 | 0 | 44 |
Scoring Methodology
The health score (0–100) is computed from four dimensions:
| Factor | Weight | How It's Measured |
|---|---|---|
| Complexity | –1/pt above 10, –2/pt above 30 | Cyclomatic complexity for JavaScript/TypeScript, Python, and Go (regex, not AST) |
| Function complexity | –2/pt above 8 per function | Highest complexity function in the file |
| Coupling | –1/5 units above 20 | Fan-in × Fan-out (import connections) |
| Documentation | –10 if <50%, –5 if <80% | JSDoc/TSDoc coverage of exports |
| Security | –10/high, –5/medium finding | Security anti-pattern findings in file |
Generated by RepoLens code health analysis. Complexity covers JavaScript/TypeScript, Python, and Go. It is regex-based and may differ from AST-based tools. Scores are relative indicators, not absolute quality measures.
<!-- repolens:docs-badge -->  · Examples