# omprakash1101/cv-v1 architecture

> Architecture diagram of the GitHub repository omprakash1101/cv-v1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omprakash1101/cv-v1
- Repository: https://github.com/omprakash1101/cv-v1

## Overview

This Django application analyzes pasted Python code or uploaded project ZIPs and returns a control-flow SVG plus class, step, and summary information as JSON or HTML. The main path runs from the browser/client through URL routing and request validation, optionally extracts source files, then invokes AST analysis and formats the result. The graph captures the sampled calls; CFG rendering also shows its documented Graphviz and Kroki dependencies. The README is empty, and unsampled modules are not expanded.

Main entry points: [`code_parser/views.py`](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py) (Page and API handlers), [`code_parser/cfg_builder.py`](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/cfg_builder.py) (Control-flow builder), [`code_parser/urls.py`](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/urls.py) (URL routing), [`templates/index.html`](https://github.com/omprakash1101/cv-v1/blob/main/templates/index.html) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["URL routing<br/>[urls.py]"]
  node_handlers["Page and API handlers<br/>[views.py]"]
  node_home["Home page<br/>[index.html]"]
end

subgraph group_input["Input handling"]
  node_validator["Payload validation<br/>[serializers.py]"]
  node_zipreader["ZIP source extraction<br/>[utils.py]"]
end

subgraph group_analysis["Code analysis"]
  node_astinsights["Classes, steps, summary<br/>[views.py]"]
  node_cfg["Control-flow builder<br/>[cfg_builder.py]"]
end

subgraph group_render["Rendering"]
  node_graphviz["Graphviz library"]
  node_kroki["Kroki service"]
  node_diagramtemplate["Diagram page<br/>[diagram.html]"]
  node_response["Analysis response<br/>[views.py]"]
end

node_client(("User or client"))

node_client -->|"requests"| node_routes
node_routes -->|"routes to"| node_handlers
node_handlers -->|"renders"| node_home
node_handlers -->|"validates with"| node_validator
node_handlers -->|"extracts ZIP via"| node_zipreader
node_handlers -->|"generates diagram via"| node_cfg
node_handlers -->|"computes insights"| node_astinsights
node_cfg -->|"builds graph with"| node_graphviz
node_cfg -->|"posts DOT to"| node_kroki
node_handlers -->|"renders HTML"| node_diagramtemplate
node_handlers -->|"returns JSON"| node_response

click node_routes "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/urls.py"
click node_handlers "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py"
click node_home "https://github.com/omprakash1101/cv-v1/blob/main/templates/index.html"
click node_validator "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/serializers.py"
click node_zipreader "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/utils.py"
click node_astinsights "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py"
click node_cfg "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/cfg_builder.py"
click node_diagramtemplate "https://github.com/omprakash1101/cv-v1/blob/main/templates/diagram.html"
click node_response "https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_handlers,node_home,node_client toneBlue
class node_validator,node_zipreader toneAmber
class node_astinsights,node_cfg toneMint
class node_graphviz,node_kroki,node_diagramtemplate,node_response toneRose
```

## Components

### Web interface

- [URL routing](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/urls.py): `code_parser/urls.py`
- [Page and API handlers](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py): `code_parser/views.py`
- [Home page](https://github.com/omprakash1101/cv-v1/blob/main/templates/index.html): `templates/index.html`

### Input handling

- [Payload validation](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/serializers.py): `code_parser/serializers.py`
- [ZIP source extraction](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/utils.py): `code_parser/utils.py`

### Code analysis

- [Classes, steps, summary](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py): `code_parser/views.py`
- [Control-flow builder](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/cfg_builder.py): `code_parser/cfg_builder.py`

### Rendering

- **Graphviz library**
- **Kroki service**
- [Diagram page](https://github.com/omprakash1101/cv-v1/blob/main/templates/diagram.html): `templates/diagram.html`
- [Analysis response](https://github.com/omprakash1101/cv-v1/blob/main/code_parser/views.py): `code_parser/views.py`

### Other components

- **User or client**

## Connections

- User or client → URL routing: requests (evidence: `code_parser/urls.py`)
- URL routing → Page and API handlers: routes to (evidence: `code_parser/urls.py`)
- Page and API handlers → Home page: renders (evidence: `code_parser/views.py`)
- Page and API handlers → Payload validation: validates with (evidence: `code_parser/views.py`)
- Page and API handlers → ZIP source extraction: extracts ZIP via (evidence: `code_parser/views.py`)
- Page and API handlers → Control-flow builder: generates diagram via (evidence: `code_parser/views.py`)
- Page and API handlers → Classes, steps, summary: computes insights (evidence: `code_parser/views.py`)
- Control-flow builder → Graphviz library: builds graph with (evidence: `code_parser/cfg_builder.py`)
- Control-flow builder → Kroki service: posts DOT to (evidence: `code_parser/cfg_builder.py`)
- Page and API handlers → Diagram page: renders HTML (evidence: `code_parser/views.py`)
- Page and API handlers → Analysis response: returns JSON (evidence: `code_parser/views.py`)
