# ashish7889/end-to-end-5g-core-management architecture

> Architecture diagram of the GitHub repository ashish7889/end-to-end-5g-core-management, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashish7889/end-to-end-5g-core-management
- Repository: https://github.com/ashish7889/end-to-end-5g-core-management

## Overview

This is a 5G Core management prototype: independent FastAPI services implement network-function discovery, subscriber authentication and UE registration, plus PDU-session setup across slice selection, policy lookup and user-plane tunnel creation. Management APIs expose overview and advanced observability endpoints; a frontend dashboard is present, though its wiring to those APIs is not established by the evidence shown. Shared configuration and database utilities underpin the backend. Several service capabilities are identified by the README or source index, but unsampled implementation details and inter-service links are omitted where not supported.

Main entry points: [`backend/management/main.py`](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/main.py) (Management API), [`backend/smf/services/clients.py`](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/services/clients.py) (Core service clients), [`backend/common/db.py`](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/common/db.py) (Database), [`backend/udm_ausf/main.py`](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/main.py) (UDM/AUSF API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared backend"]
  node_common_config["Configuration<br/>[config.py]"]
  node_database[("Database<br/>[db.py]")]
end

subgraph group_access["Subscriber access"]
  node_amf_app["AMF API<br/>[main.py]"]
  node_ue_routes["UE registration routes<br/>[ue.py]"]
  node_auth_client["UE auth client<br/>[auth.py]"]
  node_udm_app["UDM/AUSF API<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_subscriber_store["Subscriber data<br/>[subscriber.py]"]
end

subgraph group_discovery["Function discovery"]
  node_nrf_app["NRF API<br/>[main.py]"]
  node_nrf_routes["NF registry routes<br/>[nf.py]"]
  node_nrf_store["NF registry data<br/>[nf.py]"]
end

subgraph group_sessions["Session control"]
  node_smf_app["SMF API<br/>[main.py]"]
  node_session_routes["PDU session routes<br/>[session.py]"]
  node_session_manager["Session orchestration<br/>[manager.py]"]
  node_session_clients["Core service clients<br/>[clients.py]"]
  node_nssf["Slice selection<br/>[slice.py]"]
  node_pcf["Policy control<br/>[policy.py]"]
  node_upf["User-plane tunnels<br/>[session.py]"]
end

subgraph group_observability["Management and UI"]
  node_management_app["Management API<br/>[main.py]"]
  node_overview["Overview endpoints<br/>[overview.py]"]
  node_advanced["Advanced observability<br/>[advanced.py]"]
  node_management_clients["Management clients<br/>[clients.py]"]
  node_dashboard["Dashboard frontend<br/>[app.js]"]
end

node_operator(("Operator"))

node_operator -->|"registers and discovers"| node_nrf_app
node_nrf_app -->|"routes to"| node_nrf_routes
node_nrf_routes -->|"accesses registry"| node_nrf_store
node_nrf_app -->|"initializes"| node_database
node_operator -->|"registers UE"| node_amf_app
node_amf_app -->|"routes to"| node_ue_routes
node_ue_routes -->|"requests authentication"| node_auth_client
node_auth_client -->|"authenticates UE"| node_udm_app
node_udm_app -->|"routes to"| node_auth_routes
node_auth_routes -->|"reads and creates"| node_subscriber_store
node_udm_app -->|"initializes"| node_database
node_operator -.->|"requests sessions"| node_smf_app
node_smf_app -->|"routes to"| node_session_routes
node_session_routes -->|"delegates orchestration"| node_session_manager
node_session_manager -->|"calls service clients"| node_session_clients
node_session_clients -->|"requests slice"| node_nssf
node_session_clients -->|"fetches policy"| node_pcf
node_session_clients -->|"sets up tunnel"| node_upf
node_smf_app -->|"initializes"| node_database
node_operator -.->|"queries observability"| node_management_app
node_management_app -->|"routes to"| node_overview
node_management_app -->|"routes to"| node_advanced
node_management_app -->|"initializes"| node_database
node_dashboard -.->|"uses API"| node_management_app
node_management_clients -->|"reads settings"| node_common_config

click node_common_config "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/common/config.py"
click node_database "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/common/db.py"
click node_nrf_app "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nrf/main.py"
click node_nrf_routes "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nrf/routers/nf.py"
click node_nrf_store "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nrf/crud/nf.py"
click node_amf_app "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/amf/main.py"
click node_ue_routes "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/amf/routers/ue.py"
click node_auth_client "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/amf/services/auth.py"
click node_udm_app "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/main.py"
click node_auth_routes "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/routers/auth.py"
click node_subscriber_store "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/crud/subscriber.py"
click node_smf_app "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/main.py"
click node_session_routes "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/routers/session.py"
click node_session_manager "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/services/manager.py"
click node_session_clients "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/services/clients.py"
click node_nssf "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nssf/routers/slice.py"
click node_pcf "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/pcf/routers/policy.py"
click node_upf "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/upf/routers/session.py"
click node_management_app "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/main.py"
click node_overview "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/routers/overview.py"
click node_advanced "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/routers/advanced.py"
click node_management_clients "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/services/clients.py"
click node_dashboard "https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/frontend/static/app.js"

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_common_config,node_database toneBlue
class node_amf_app,node_ue_routes,node_auth_client,node_udm_app,node_auth_routes,node_subscriber_store toneAmber
class node_nrf_app,node_nrf_routes,node_nrf_store toneMint
class node_smf_app,node_session_routes,node_session_manager,node_session_clients,node_nssf,node_pcf,node_upf toneRose
class node_management_app,node_overview,node_advanced,node_management_clients,node_dashboard,node_operator toneIndigo
```

## Components

### Shared backend

- [Configuration](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/common/config.py): `backend/common/config.py`
- [Database](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/common/db.py): `backend/common/db.py`

### Subscriber access

- [AMF API](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/amf/main.py): `backend/amf/main.py`
- [UE registration routes](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/amf/routers/ue.py): `backend/amf/routers/ue.py`
- [UE auth client](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/amf/services/auth.py): `backend/amf/services/auth.py`
- [UDM/AUSF API](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/main.py): `backend/udm_ausf/main.py`
- [Authentication routes](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/routers/auth.py): `backend/udm_ausf/routers/auth.py`
- [Subscriber data](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/udm_ausf/crud/subscriber.py): `backend/udm_ausf/crud/subscriber.py`

### Function discovery

- [NRF API](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nrf/main.py): `backend/nrf/main.py`
- [NF registry routes](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nrf/routers/nf.py): `backend/nrf/routers/nf.py`
- [NF registry data](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nrf/crud/nf.py): `backend/nrf/crud/nf.py`

### Session control

- [SMF API](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/main.py): `backend/smf/main.py`
- [PDU session routes](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/routers/session.py): `backend/smf/routers/session.py`
- [Session orchestration](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/services/manager.py): `backend/smf/services/manager.py`
- [Core service clients](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/smf/services/clients.py): `backend/smf/services/clients.py`
- [Slice selection](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/nssf/routers/slice.py): `backend/nssf/routers/slice.py`
- [Policy control](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/pcf/routers/policy.py): `backend/pcf/routers/policy.py`
- [User-plane tunnels](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/upf/routers/session.py): `backend/upf/routers/session.py`

### Management and UI

- [Management API](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/main.py): `backend/management/main.py`
- [Overview endpoints](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/routers/overview.py): `backend/management/routers/overview.py`
- [Advanced observability](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/routers/advanced.py): `backend/management/routers/advanced.py`
- [Management clients](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/backend/management/services/clients.py): `backend/management/services/clients.py`
- [Dashboard frontend](https://github.com/ashish7889/end-to-end-5g-core-management/blob/master/frontend/static/app.js): `frontend/static/app.js`

### Other components

- **Operator**

## Connections

- Operator → NRF API: registers and discovers (evidence: `README.md`)
- NRF API → NF registry routes: routes to (evidence: `backend/nrf/main.py`)
- NF registry routes → NF registry data: accesses registry (evidence: `backend/nrf/routers/nf.py`)
- NRF API → Database: initializes (evidence: `backend/nrf/main.py`)
- Operator → AMF API: registers UE (evidence: `README.md`)
- AMF API → UE registration routes: routes to (evidence: `backend/amf/main.py`)
- UE registration routes → UE auth client: requests authentication (evidence: `backend/amf/routers/ue.py`)
- UE auth client → UDM/AUSF API: authenticates UE (evidence: `README.md`)
- UDM/AUSF API → Authentication routes: routes to (evidence: `backend/udm_ausf/main.py`)
- Authentication routes → Subscriber data: reads and creates (evidence: `backend/udm_ausf/routers/auth.py`)
- UDM/AUSF API → Database: initializes (evidence: `backend/udm_ausf/main.py`)
- Operator → SMF API: requests sessions
- SMF API → PDU session routes: routes to (evidence: `backend/smf/main.py`)
- PDU session routes → Session orchestration: delegates orchestration (evidence: `backend/smf/routers/session.py`)
- Session orchestration → Core service clients: calls service clients (evidence: `backend/smf/services/manager.py`)
- Core service clients → Slice selection: requests slice (evidence: `backend/smf/services/clients.py`)
- Core service clients → Policy control: fetches policy (evidence: `backend/smf/services/clients.py`)
- Core service clients → User-plane tunnels: sets up tunnel (evidence: `backend/smf/services/clients.py`)
- SMF API → Database: initializes (evidence: `backend/smf/main.py`)
- Operator → Management API: queries observability
- Management API → Overview endpoints: routes to (evidence: `backend/management/main.py`)
- Management API → Advanced observability: routes to (evidence: `backend/management/main.py`)
- Management API → Database: initializes (evidence: `backend/management/main.py`)
- Dashboard frontend → Management API: uses API
- Management clients → Configuration: reads settings (evidence: `backend/management/services/clients.py`)
