Gallery ยท Architecture explained ยท Score ยท Python
Django architecture: modules, API surface, dependency graph
The web framework for perfectionists with deadlines. Generated from django/django at 0b4aaa7, BSD-3-Clause.
Scanned the HTTP stack: http, urls, middleware, views, forms, apps, and dispatch. The ORM, admin, and contrib packages are not included.
- Files
- 59
- Modules
- 8
- API routes
- 0
- Documents
- 17
PythonDjango
Executive Summary
At a Glance
| Aspect | Summary |
|---|---|
| What | Django is a early-stage command-line tool |
| Built With | Django + Python |
| Scale | 8 modules across 59 files |
| Maturity | Early-stage (1/3 indicators) |
What This System Does
Django is a Django command-line tool built with Python. 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 4 functional domains, each representing a distinct business capability:
| Domain | Capability | Scale |
|---|---|---|
| Other | Uncategorized module | 5 modules, 38 files |
| API Layer | path django/middleware matches middleware | 1 modules, 10 files |
| UI Components | path django/forms matches form | 1 modules, 9 files |
| Delivery | path django/dispatch matches dispatch | 1 modules, 2 files |
Technical Foundation
| Layer | Technologies | Purpose |
|---|---|---|
| Application | Django | Core runtime framework |
| Language | Python | Primary development language |
Module Composition
The codebase follows a layered architecture with clear separation of concerns:
| Layer | Count | Key Modules | Responsibility |
|---|---|---|---|
| Route/Page Modules | 1 | views | Maps URL paths to page components and handles navigation |
| middleware | 1 | middleware | Supporting application functionality |
| Other Modules | 4 | forms, urls | General purpose functionality |
| Application Core | 1 | apps | Orchestrates application initialization and core bootstrapping |
| delivery | 1 | dispatch | Supporting application functionality |
Codebase Health
Overall Health: ๐ก 75/100
| Metric | Value | Status |
|---|---|---|
| Internal imports | 19 edges | โ Connected |
| External Packages | 2 | โ Manageable |
| Circular Dependencies | cycle-free | โ None |
| Orphan Files | 44 | โ ๏ธ 44 unused |
Key Insights
- โ Clean module boundaries โ No circular dependencies detected, enabling safe refactoring and testing.
- โ ๏ธ Potential dead code โ 44 files (75%) are not imported anywhere.
Key Data Flows
The system processes information through 2 identified flows:
- __init__.py Request Flow (critical) โ Import chain starting from
django/urls/__init__.pyโ traces how this entry point depends on 1 downstream module - __init__.py Request Flow โ Import chain starting from
django/apps/__init__.pyโ traces how this entry point depends on 1 downstream module
Strategic Observations
- The codebase follows Middleware pipeline โ `django/middleware`, Delivery pipeline โ `django/dispatch`, Acyclic dependency graph โ clean layering architectural patterns, providing a familiar structure for developers.
- 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
Django is a focused codebase with a clear purpose, containing 8 modules spread across 59 files.
| Dimension | Details |
|---|---|
| Total Files | 59 |
| Module Count | 8 |
| Functional Domains | 4 |
| Interface Type | Command-Line Tool |
Technology Stack
The system is built on a modern technology foundation:
| Layer | Technologies | Purpose |
|---|---|---|
| Runtime | Django | Application runtime |
| Language | Python | Primary development language |
Architecture Patterns
The codebase follows 3 identified architectural patterns:
- Middleware pipeline โ `django/middleware` โ A structured approach to organizing code and managing complexity.
- Delivery pipeline โ `django/dispatch` โ The UI is rendered client-side as a single-page application, with dynamic content updates without full page reloads.
- 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 5 architectural layers:
| Layer | Modules | Key Examples | Responsibility |
|---|---|---|---|
| Route/Page Modules | 1 | views | Maps URL paths to page components and handles navigation |
| middleware | 1 | middleware | Supporting application functionality |
| Other Modules | 4 | forms, urls | General purpose functionality |
| Application Core | 1 | apps | Orchestrates application initialization and core bootstrapping |
| delivery | 1 | dispatch | Supporting application functionality |
Layer Details
Route/Page Modules โ 1 module
django/viewsโ 22 files โ Application pages and views
middleware โ 1 module
django/middlewareโ 10 files โ Request/response middleware
Other Modules โ 4 modules
django/formsโ 9 files โ Core application moduledjango/urlsโ 7 files โ Core application moduledjango/httpโ 5 files โ Core application moduledjango/shortcuts.pyโ 1 files โ Core application module
Application Core โ 1 module
django/appsโ 3 files โ Core application module
delivery โ 1 module
django/dispatchโ 2 files โ Core application module
Functional Domains
The following domains represent the largest functional areas by file count:
| Rank | Domain | Scale | Business Capability |
|---|---|---|---|
| 1 | Other | 38 files | Uncategorized module |
| 2 | API Layer | 10 files | path django/middleware matches middleware |
| 3 | UI Components | 9 files | path django/forms matches form |
| 4 | Delivery | 2 files | path django/dispatch matches dispatch |
Dependency Graph
Codebase Health: ๐ก 75/100
| Metric | Value | Assessment |
|---|---|---|
| Internal Imports | 19 | Modules are connected |
| External Packages | 2 | Lean dependencies |
| Circular Dependencies | 0 | โ Clean |
| Orphan Files | 44 | โ ๏ธ 44 unused |
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
Django is organized into 4 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 |
|---|---|---|---|
| Other | 5 | 38 | Supporting business operations |
| API Layer | 1 | 10 | External API interface layer |
| UI Components | 1 | 9 | Reusable visual interface elements |
| Delivery | 1 | 2 | Supporting business operations |
1. Other
Business Capability
Uncategorized module
This is a significant domain with 5 modules and 38 source files.
Key Modules
| Module | Purpose |
|---|---|
django/views | Application pages and views |
django/urls | Core application module |
django/http | Core application module |
django/apps | Core application module |
django/shortcuts.py | Core application module |
Business Impact
- Change Frequency Impact: Medium โ Changes here affect 38 files
- Domain Complexity: Moderate
2. API Layer
Business Capability
path django/middleware matches middleware
This is a focused domain with 1 module and 10 source files.
Key Modules
| Module | Purpose |
|---|---|
django/middleware | Request/response middleware |
Business Impact
- Change Frequency Impact: Low โ Changes here affect 10 files
- Domain Complexity: Simple
3. UI Components
Business Capability
path django/forms matches form
This is a focused domain with 1 module and 9 source files.
Key Modules
| Module | Purpose |
|---|---|
django/forms | Core application module |
Business Impact
- Change Frequency Impact: Low โ Changes here affect 9 files
- Domain Complexity: Simple
4. Delivery
Business Capability
path django/dispatch matches dispatch
This is a focused domain with 1 module and 2 source files.
Key Modules
| Module | Purpose |
|---|---|
django/dispatch | Core application module |
Business Impact
- Change Frequency Impact: Low โ Changes here affect 2 files
- Domain Complexity: Simple
Domain Health Summary
| Metric | Value | Assessment |
|---|---|---|
| Total Domains | 4 | Well-balanced |
| Avg Files/Domain | 15 | Appropriate size |
| Largest Domain | Other (38 files) | Consider breaking down |
| Domain Concentration | 64% in largest | โ ๏ธ High concentration |
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
Django follows a Middleware pipeline โ `django/middleware` architecture with elements of Delivery pipeline โ `django/dispatch`, Acyclic dependency graph โ clean layering.
Pattern Analysis
Middleware pipeline โ `django/middleware`
A structured approach to organizing code and managing complexity.
Benefits: Structured organization, maintainability, clarity
Delivery pipeline โ `django/dispatch`
The UI is rendered client-side as a single-page application, with dynamic content updates without full page reloads.
Benefits: Fast navigation, rich interactivity, offline capabilities
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 4 functional layers, each encapsulating a distinct area of responsibility:
| Layer | Responsibility | Scale | Key Insight |
|---|---|---|---|
| Other | Uncategorized module | 38 files | Standard domain |
| API Layer | path django/middleware matches middleware | 10 files | External interface โ versioning important |
| UI Components | path django/forms matches form | 9 files | Standard domain |
| Delivery | path django/dispatch matches dispatch | 2 files | Standard domain |
Module Layers
Modules are classified into 5 architectural roles:
Route/Page Modules
Role: Maps URL paths to page components and handles navigation
| Module | Files | Description |
|---|---|---|
django/views | 22 | Application pages and views |
middleware
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
django/middleware | 10 | Request/response middleware |
Other Modules
Role: General purpose functionality
| Module | Files | Description |
|---|---|---|
django/forms | 9 | Core application module |
django/urls | 7 | Core application module |
django/http | 5 | Core application module |
django/shortcuts.py | 1 | Core application module |
Application Core
Role: Orchestrates application initialization and core bootstrapping
| Module | Files | Description |
|---|---|---|
django/apps | 3 | Core application module |
delivery
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
django/dispatch | 2 | Core application module |
Technology Foundation
| Layer | Technologies | Architectural Implication |
|---|---|---|
| Application | Django | Standard application patterns |
| Language | Python | Readable syntax, rich ecosystem |
Scale & Complexity Analysis
| Dimension | Value | Assessment |
|---|---|---|
| Total Files | 59 | medium project |
| Module Count | 8 | low complexity |
| Domain Spread | 4 domains | Focused scope |
| Interface | CLI | Terminal-driven interaction |
Dependency Health
Architecture Health Score: ๐ก 75/100
| Metric | Value | Status | Recommendation |
|---|---|---|---|
| Import Edges | 19 | โ | Healthy module connectivity |
| External Packages | 2 | โ | Lean dependency set |
| Circular Deps | 0 | โ | Clean module boundaries |
| Orphan Files | 44 | โ ๏ธ | Review for dead code |
Architectural Strengths
- Clean module boundaries โ No circular dependencies detected. This enables safe refactoring, isolated testing, and clear ownership boundaries.
Concerns
- High orphan file ratio โ 44/59 files (75%) are not imported. Consider removing dead code. Priority: Medium.
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: 8
Module Inventory
| Module | Files | Role |
|---|---|---|
django/views | 22 | Application module ยท Isolated (no imports or importers) |
django/middleware | 10 | Request middleware and interceptors ยท Isolated (no imports or importers) |
django/forms | 9 | Application module ยท Isolated (no imports or importers) |
django/urls | 7 | Application module ยท Isolated (no imports or importers) |
django/http | 5 | Application module ยท Isolated (no imports or importers) |
django/apps | 3 | Application module ยท Isolated (no imports or importers) |
django/dispatch | 2 | Application module ยท Isolated (no imports or importers) |
django/shortcuts.py | 1 | Application module ยท Isolated (no imports or importers) |
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 Django โ from external inputs through processing layers to storage or presentation. Understanding these flows is essential for debugging, performance optimization, and architectural decisions.
Flow Summary
5 data flows identified in the codebase:
| Flow | Type | Complexity | Critical |
|---|---|---|---|
| __init__.py Request Flow | Integration | Low (2 steps) | ๐ด Yes |
| __init__.py Request Flow | Integration | Low (2 steps) | โ |
| exceptions.py Integration Flow | Integration | Medium (3 steps) | โ |
| resolvers.py Integration Flow | Integration | Medium (4 steps) | โ |
| utils.py Integration Flow | Integration | Medium (3 steps) | โ |
1. __init__.py Request Flow ๐ด CRITICAL FLOW
Description
Import chain starting from django/urls/__init__.py โ 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 | __init__.py (entry point, imports 6 modules) | Data acquisition |
| 2 | exceptions.py (leaf โ no further dependencies) | Processing step |
Flow Diagram
โโ START โโ
โ `__init__.py` (entry point, imports 6 modules) โ
โ โ
โ `exceptions.py` (leaf โ no further dependencies) โ
โโ END โโโโ
Involved Modules
| Module | Role |
|---|---|
__init__.py | Core application module |
exceptions.py | Core application module |
Insights
- โ ๏ธ Critical path โ Failures here have significant business impact
- ๐ Consider adding monitoring and alerting
- ๐งช Ensure comprehensive test coverage
2. __init__.py Request Flow
Description
Import chain starting from django/apps/__init__.py โ traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | __init__.py (entry point, imports 2 modules) | Data acquisition |
| 2 | config.py (leaf โ no further dependencies) | Processing step |
Flow Diagram
โโ START โโ
โ `__init__.py` (entry point, imports 2 modules) โ
โ โ
โ `config.py` (leaf โ no further dependencies) โ
โโ END โโโโ
Involved Modules
| Module | Role |
|---|---|
__init__.py | Core application module |
config.py | Configuration management |
Insights
- Standard integration flow with 2 processing steps
3. exceptions.py Integration Flow
Description
django/urls/exceptions.py is a central module imported by 3 files, acting as an integration point for data and logic
Characteristics
| Property | Value |
|---|---|
| Steps | 3 |
| Modules Involved | 4 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | __init__.py imports exceptions.py | Data acquisition |
| 2 | base.py imports exceptions.py | Data acquisition |
| 3 | resolvers.py imports exceptions.py | Data acquisition |
Flow Diagram
โโ START โโ
โ `__init__.py` imports `exceptions.py` โ
โ โ
โ `base.py` imports `exceptions.py` โ
โ โ
โ `resolvers.py` imports `exceptions.py` โ
โโ END โโโโ
Involved Modules
| Module | Role |
|---|---|
exceptions.py | Core application module |
__init__.py | Core application module |
base.py | Core application module |
resolvers.py | Core application module |
Insights
- Standard integration flow with 3 processing steps
4. resolvers.py Integration Flow
Description
django/urls/resolvers.py is a central module imported by 3 files, acting as an integration point for data and logic
Characteristics
| Property | Value |
|---|---|
| Steps | 4 |
| Modules Involved | 4 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | __init__.py imports resolvers.py | Data acquisition |
| 2 | base.py imports resolvers.py | Data acquisition |
| 3 | conf.py imports resolvers.py | Data acquisition |
| 4 | resolvers.py depends on converters.py, exceptions.py, utils.py | Data transformation |
Flow Diagram
โโ START โโ
โ `__init__.py` imports `resolvers.py` โ
โ โ
โ `base.py` imports `resolvers.py` โ
โ โ
โ `conf.py` imports `resolvers.py` โ
โ โ
โ `resolvers.py` depends on `converters.py`, `exc... โ
โโ END โโโโ
Involved Modules
| Module | Role |
|---|---|
resolvers.py | Core application module |
__init__.py | Core application module |
base.py | Core application module |
conf.py | Core application module |
Insights
- Standard integration flow with 4 processing steps
5. utils.py Integration Flow
Description
django/urls/utils.py is a central module imported by 3 files, acting as an integration point for data and logic
Characteristics
| Property | Value |
|---|---|
| Steps | 3 |
| Modules Involved | 4 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | __init__.py imports utils.py | Data acquisition |
| 2 | base.py imports utils.py | Data acquisition |
| 3 | resolvers.py imports utils.py | Data acquisition |
Flow Diagram
โโ START โโ
โ `__init__.py` imports `utils.py` โ
โ โ
โ `base.py` imports `utils.py` โ
โ โ
โ `resolvers.py` imports `utils.py` โ
โโ END โโโโ
Involved Modules
| Module | Role |
|---|---|
utils.py | Utility and helper functions |
__init__.py | Core application module |
base.py | Core application module |
resolvers.py | Core application module |
Insights
- Standard integration flow with 3 processing steps
Import Network
The system has 19 internal import edges connecting 59 source files.
Network Topology
| Metric | Value | Meaning |
|---|---|---|
| Total Edges | 19 | Direct import relationships |
| Hub Count | 0 | Central integration points |
| Avg Connections | ~0.3 per file | Coupling density |
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: 8 modules and 0 relationships
Source: Real import analysis
Architecture Diagram
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐๏ธ SYSTEM ARCHITECTURE MAP โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฌ DELIVERY
โ
โโโ dispatch (2 files)
โ
๐ PAGES / ROUTES
โ
โโโ views (22 files)
โ
๐ MIDDLEWARE
โ
โโโ middleware (10 files)
โ
๐ฆ OTHER
โ
โโโ forms (9 files)
โโโ urls (7 files)
โโโ http (5 files)
โโโ apps (3 files)
โโโ shortcuts.py (1 file)
โ
Legend:
โ imports / depends on
โโ tests
<!-- repolens:docs-badge -->  ยท Examples
Developer Onboarding
Welcome to Django! ๐
This guide will help you get up to speed quickly. Django is a Django project built with Python, containing 8 modules across 59 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 | Python |
| Frameworks | Django |
| Build Tools | Standard toolchain |
| Size | 8 modules, 59 files |
| Domains | 4 functional areas |
| Type | Command-line interface |
Repository Structure
Understanding the directory layout is your first step to navigating the codebase:
| Directory | Purpose | Start Here? |
|---|---|---|
django | 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 | Django | Review the framework documentation |
| Language | Python | Read docstrings and type hints |
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 | django/views | 22 | Route/Page Modules | Large module โ core functionality |
| โญ High | django/middleware | 10 | middleware | Key system component |
| โญ High | django/forms | 9 | Other Modules | Key system component |
| Medium | django/urls | 7 | Other Modules | Key system component |
| Medium | django/http | 5 | Other Modules | Key system component |
| Medium | django/apps | 3 | Application Core | Central logic โ understand data flow |
| Low | django/dispatch | 2 | delivery | Key system component |
| Low | django/shortcuts.py | 1 | Other Modules | Key system component |
How Data Flows
Understanding these flows helps you see how the system processes information end-to-end:
| Flow | Description | Key Modules |
|---|---|---|
| __init__.py Request Flow | Import chain starting from django/urls/__init__.py โ trace... | __init__.py, exceptions.py |
| __init__.py Request Flow | Import chain starting from django/apps/__init__.py โ trace... | __init__.py, config.py |
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 django
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:
- 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
59 files ยท 19 imports ยท 2 external packages ยท โ no circular dependencies ยท 44 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 | 59 |
| Import edges | 19 |
| External packages | 2 |
| Circular dependencies | 0 |
| Orphan files (no imports or importers) | 44 |
External Dependencies
The codebase imports 2 external packages. These are third-party modules (not the language standard library):
| Package |
| --------- |
PIL |
asgiref |
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
59 files analyzed ยท Average health: 80/100 ยท 38 A, 4 B, 17 C, 0 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 | 59 |
| Average health score | 80/100 |
| Average complexity | 38 |
| Hotspots (score < 60) | 17 |
Grade Distribution
| Grade | Count | Meaning |
|---|---|---|
| ๐ข A (80โ100) | 38 | Healthy โ low complexity, well-documented |
| ๐ต B (60โ79) | 4 | Acceptable โ minor improvements possible |
| ๐ก C (40โ59) | 17 | Needs attention โ elevated complexity or coupling |
| ๐ D (20โ39) | 0 | 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 |
|---|---|---|---|---|---|---|
django/apps/config.py | 45 | ๐ก C | 44 | 2โ 0โ | โ | โ |
django/dispatch/dispatcher.py | 45 | ๐ก C | 73 | 0โ 0โ | โ | โ |
django/forms/boundfield.py | 45 | ๐ก C | 67 | 0โ 0โ | โ | โ |
django/forms/fields.py | 45 | ๐ก C | 230 | 0โ 0โ | โ | โ |
django/forms/forms.py | 45 | ๐ก C | 71 | 0โ 1โ | โ | โ |
django/forms/models.py | 45 | ๐ก C | 292 | 0โ 0โ | โ | โ |
django/http/multipartparser.py | 45 | ๐ก C | 93 | 0โ 0โ | โ | โ |
django/urls/resolvers.py | 45 | ๐ก C | 120 | 3โ 3โ | โ | โ |
django/views/debug.py | 45 | ๐ก C | 104 | 0โ 0โ | โ | โ |
django/forms/formsets.py | 46 | ๐ก C | 84 | 0โ 0โ | โ | โ |
django/http/response.py | 48 | ๐ก C | 91 | 0โ 0โ | โ | โ |
django/apps/registry.py | 50 | ๐ก C | 52 | 1โ 1โ | โ | โ |
django/middleware/csrf.py | 52 | ๐ก C | 62 | 0โ 0โ | โ | โ |
django/views/i18n.py | 54 | ๐ก C | 39 | 0โ 0โ | โ | โ |
django/views/generic/dates.py | 54 | ๐ก C | 55 | 0โ 0โ | โ | โ |
django/forms/widgets.py | 56 | ๐ก C | 176 | 0โ 1โ | โ | โ |
django/http/request.py | 56 | ๐ก C | 120 | 0โ 0โ | โ | โ |
Most Complex Functions
These functions have the highest cyclomatic complexity and are the most likely sources of bugs:
| Function | File | Line | Complexity |
|---|---|---|---|
_parse() | django/http/multipartparser.py | 133 | 38 |
fields_for_model() | django/forms/models.py | 141 | 37 |
create() | django/apps/config.py | 100 | 28 |
validate_unique() | django/forms/models.py | 832 | 25 |
_reverse_with_prefix() | django/urls/resolvers.py | 757 | 24 |
set_choices() | django/forms/fields.py | 1202 | 22 |
clean() | django/forms/fields.py | 1099 | 21 |
_get_foreign_key() | django/forms/models.py | 1236 | 21 |
reverse() | django/urls/base.py | 28 | 20 |
get_traceback_data() | django/views/debug.py | 344 | 19 |
label_tag() | django/forms/boundfield.py | 167 | 17 |
process_response() | django/middleware/cache.py | 90 | 17 |
_live_receivers() | django/dispatch/dispatcher.py | 476 | 16 |
build_widget_attrs() | django/forms/boundfield.py | 272 | 16 |
__init__() | django/forms/forms.py | 73 | 16 |
All Modules by Health Score
Showing 50 of 59 modules (sorted worst-first)
| Module | Score | Grade | Lines | Complexity | Fan-In | Fan-Out |
|---|---|---|---|---|---|---|
django/apps/config.py | 45 | ๐ก C | 275 | 44 | 2 | 0 |
django/dispatch/dispatcher.py | 45 | ๐ก C | 559 | 73 | 0 | 0 |
django/forms/boundfield.py | 45 | ๐ก C | 372 | 67 | 0 | 0 |
django/forms/fields.py | 45 | ๐ก C | 1402 | 230 | 0 | 0 |
django/forms/forms.py | 45 | ๐ก C | 440 | 71 | 0 | 1 |
django/forms/models.py | 45 | ๐ก C | 1728 | 292 | 0 | 0 |
django/http/multipartparser.py | 45 | ๐ก C | 760 | 93 | 0 | 0 |
django/urls/resolvers.py | 45 | ๐ก C | 845 | 120 | 3 | 3 |
django/views/debug.py | 45 | ๐ก C | 684 | 104 | 0 | 0 |
django/forms/formsets.py | 46 | ๐ก C | 585 | 84 | 0 | 0 |
django/http/response.py | 48 | ๐ก C | 791 | 91 | 0 | 0 |
django/apps/registry.py | 50 | ๐ก C | 439 | 52 | 1 | 1 |
django/middleware/csrf.py | 52 | ๐ก C | 487 | 62 | 0 | 0 |
django/views/i18n.py | 54 | ๐ก C | 254 | 39 | 0 | 0 |
django/views/generic/dates.py | 54 | ๐ก C | 824 | 55 | 0 | 0 |
django/forms/widgets.py | 56 | ๐ก C | 1325 | 176 | 0 | 1 |
django/http/request.py | 56 | ๐ก C | 881 | 120 | 0 | 0 |
django/urls/utils.py | 63 | ๐ต B | 212 | 35 | 3 | 0 |
django/middleware/cache.py | 65 | ๐ต B | 243 | 30 | 0 | 0 |
django/urls/base.py | 66 | ๐ต B | 209 | 29 | 1 | 3 |
django/middleware/common.py | 67 | ๐ต B | 196 | 33 | 0 | 0 |
django/views/generic/base.py | 81 | ๐ข A | 292 | 29 | 0 | 0 |
django/forms/utils.py | 83 | ๐ข A | 247 | 27 | 0 | 0 |
django/shortcuts.py | 84 | ๐ข A | 215 | 24 | 0 | 0 |
django/views/generic/detail.py | 85 | ๐ข A | 192 | 23 | 0 | 0 |
django/middleware/locale.py | 87 | ๐ข A | 82 | 15 | 0 | 0 |
django/middleware/security.py | 87 | ๐ข A | 69 | 17 | 0 | 0 |
django/views/generic/list.py | 87 | ๐ข A | 225 | 23 | 0 | 0 |
django/urls/conf.py | 88 | ๐ข A | 98 | 16 | 1 | 1 |
django/views/generic/edit.py | 93 | ๐ข A | 275 | 17 | 0 | 0 |
django/views/decorators/http.py | 94 | ๐ข A | 169 | 16 | 0 | 0 |
django/views/decorators/debug.py | 95 | ๐ข A | 147 | 15 | 0 | 0 |
django/middleware/gzip.py | 96 | ๐ข A | 68 | 10 | 0 | 0 |
django/views/static.py | 96 | ๐ข A | 123 | 14 | 0 | 0 |
django/middleware/csp.py | 98 | ๐ข A | 45 | 9 | 0 | 0 |
django/views/defaults.py | 99 | ๐ข A | 151 | 11 | 0 | 0 |
django/apps/__init__.py | 100 | ๐ข A | 5 | 1 | 0 | 2 |
django/dispatch/__init__.py | 100 | ๐ข A | 11 | 1 | 0 | 0 |
django/forms/__init__.py | 100 | ๐ข A | 12 | 1 | 0 | 0 |
django/forms/renderers.py | 100 | ๐ข A | 78 | 1 | 2 | 0 |
django/http/__init__.py | 100 | ๐ข A | 53 | 1 | 1 | 0 |
django/http/cookie.py | 100 | ๐ข A | 24 | 5 | 0 | 1 |
django/middleware/__init__.py | 100 | ๐ข A | 65 | 10 | 0 | 0 |
django/middleware/clickjacking.py | 100 | ๐ข A | 51 | 3 | 0 | 0 |
django/middleware/http.py | 100 | ๐ข A | 44 | 7 | 0 | 0 |
django/urls/__init__.py | 100 | ๐ข A | 54 | 1 | 0 | 6 |
django/urls/converters.py | 100 | ๐ข A | 69 | 3 | 2 | 0 |
django/urls/exceptions.py | 100 | ๐ข A | 10 | 1 | 3 | 0 |
django/views/__init__.py | 100 | ๐ข A | 4 | 1 | 0 | 0 |
django/views/csrf.py | 100 | ๐ข A | 82 | 3 | 0 | 0 |
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