# mizcausevic-dev/curriculum-knowledge-graph architecture

> Architecture diagram of the GitHub repository mizcausevic-dev/curriculum-knowledge-graph, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mizcausevic-dev/curriculum-knowledge-graph
- Repository: https://github.com/mizcausevic-dev/curriculum-knowledge-graph

## Overview

#### Purpose and principal workflow

Curriculum Knowledge Graph is a small FastAPI application for exploring course prerequisites, skill dependencies, and pathway bottlenecks using a seeded degree-program graph. An **HTTP client** initiates the main workflow by requesting a page or API endpoint; the application then renders a view or returns graph analysis. The README documents use by faculty and academic operations teams, and positions the API as a potential input to catalog, pathway, and advising tools.

#### Components

##### HTTP application and presentation
- **HTTP client** — *(external; no repository path)* A browser or API consumer initiates requests to the service; the README documents browser routes and machine-readable endpoints.
- **Uvicorn runtime** — *(external; no repository path)* The documented local launch runs the application through Uvicorn, which serves the HTTP interface.
- **FastAPI application and routes** — `app/main.py` Defines the app, exposes HTML and JSON routes, calls the graph service, and starts Uvicorn when run as a module.
- **Curriculum page renderer** — `app/render.py` Builds the overview, capstone pathway, skill-dependency, and API-summary HTML pages; the sampled functions obtain their display data from the graph service.

##### Graph data and analysis
- **Seed curriculum graph** — `app/data/sample_curriculum.json` Supplies the local course, prerequisite, skill-dependency, and program data read by the graph service.
- **Curriculum graph analysis** — `app/services/graph_service.py` Loads the seed, constructs forward and reverse prerequisite adjacency maps, computes course bottleneck scores and skill mappings, and finds pathways with breadth-first search; it also assembles summary and sample payloads.

#### Relationships

- **HTTP client -> Uvicorn runtime:** sends an HTTP request to the locally served application; the README documents the local URL and routes.
- **Uvicorn runtime -> FastAPI application and routes:** serves the application launched by the `uvicorn.run("app.main:app", ...)` call.
- **FastAPI application and routes -> Curriculum graph analysis:** constructs the service at module initialization and invokes its methods from the JSON endpoints.
- **FastAPI application and routes -> Curriculum page renderer:** calls the corresponding renderer for the overview, pathway, skills, and API-summary page routes.
- **Curriculum page renderer -> Curriculum graph analysis:** builds a service and reads summary, bottleneck, pathway, skill-map, or sample-payload results for page content.
- **Curriculum graph analysis -> Seed curriculum graph:** reads and parses the JSON file as the input to graph construction and analysis.

#### Coverage limits

The source excerpts do not include the full renderer or seed dataset, so page details beyond the sampled functions and exact graph contents are not established. The repository demonstrates local seeded analysis; no external database, persistence layer, or deployed consumer integration is evidenced.

Main entry points: [`app/main.py`](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/main.py) (FastAPI Routes), [`app/services/graph_service.py`](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/services/graph_service.py) (Graph Analysis), [`app/render.py`](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/render.py) (Curriculum Renderer), [`app/data/sample_curriculum.json`](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/data/sample_curriculum.json) (Seed Curriculum Graph)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["HTTP Application"]
  node_fastapi["FastAPI Routes<br/>Web application"]
  node_renderer["Curriculum Renderer<br/>HTML renderer"]
end

subgraph group_graph["Graph Analysis"]
  node_analysis["Graph Analysis<br/>Domain service"]
  node_seed["Seed Curriculum Graph<br/>JSON data"]
end

node_http_client["HTTP Client<br/>External client"]
node_uvicorn["Uvicorn Runtime<br/>External runtime"]

node_http_client -->|"sends request"| node_uvicorn
node_uvicorn -->|"serves app"| node_fastapi
node_fastapi -->|"invokes analysis"| node_analysis
node_fastapi -->|"renders pages"| node_renderer
node_renderer -->|"reads results"| node_analysis
node_analysis -->|"reads data"| node_seed

click node_fastapi "https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/main.py"
click node_renderer "https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/render.py"
click node_analysis "https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/services/graph_service.py"
click node_seed "https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/data/sample_curriculum.json"

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_fastapi,node_renderer,node_http_client toneBlue
class node_analysis,node_seed toneAmber
class node_uvicorn toneIndigo
```

## Components

### HTTP Application

- [FastAPI Routes](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/main.py): Web application · `app/main.py`
- [Curriculum Renderer](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/render.py): HTML renderer · `app/render.py`

### Graph Analysis

- [Graph Analysis](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/services/graph_service.py): Domain service · `app/services/graph_service.py`
- [Seed Curriculum Graph](https://github.com/mizcausevic-dev/curriculum-knowledge-graph/blob/main/app/data/sample_curriculum.json): JSON data · `app/data/sample_curriculum.json`

### Other components

- **HTTP Client**: External client
- **Uvicorn Runtime**: External runtime

## Connections

- HTTP Client → Uvicorn Runtime: sends request
- Uvicorn Runtime → FastAPI Routes: serves app
- FastAPI Routes → Graph Analysis: invokes analysis
- FastAPI Routes → Curriculum Renderer: renders pages
- Curriculum Renderer → Graph Analysis: reads results
- Graph Analysis → Seed Curriculum Graph: reads data
