# maxwellrodrigues/free_5g_core architecture

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

- Interactive diagram: https://gitdiagram.com/maxwellrodrigues/free_5g_core
- Repository: https://github.com/maxwellrodrigues/free_5g_core

## Overview

free5GC is a 5G mobile-core implementation. Its principal user-facing outcome is connectivity for a UE: access signaling, authentication and subscription checks, session and policy setup, then user-plane traffic. The tree identifies the core network functions, but the sampled source only covers shared configuration and initialization; service-to-service workflow links below are therefore dashed and unverified, not claims about inspected call sites.

Main entry points: [`src/app/context.go`](https://github.com/maxwellrodrigues/free_5g_core/blob/master/src/app/context.go) (Shared app config), [`src/amf`](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/amf) (AMF), [`src/smf`](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/smf) (SMF), [`src/n3iwf`](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/n3iwf) (N3IWF)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Network access"]
  node_amf["AMF"]
  node_n3iwf["N3IWF"]
end

subgraph group_control["Core control plane"]
  node_nrf["NRF"]
  node_nssf["NSSF"]
  node_ausf["AUSF"]
  node_udm["UDM"]
  node_smf["SMF"]
  node_pcf["PCF"]
end

subgraph group_data["Subscriber and traffic data"]
  node_udr["UDR"]
  node_upf["UPF"]
  node_webui["Web console"]
end

subgraph group_platform["Shared platform"]
  node_app["Shared app config<br/>[context.go]"]
end

node_ue(("UE"))
node_ran["RAN"]

node_ue -.->|"sends access"| node_ran
node_ran -.->|"signals access"| node_amf
node_ue -.->|"uses non-3GPP"| node_n3iwf
node_n3iwf -.->|"forwards signaling"| node_amf
node_amf -.->|"discovers services"| node_nrf
node_amf -.->|"selects slice"| node_nssf
node_amf -.->|"requests authentication"| node_ausf
node_ausf -.->|"checks subscription"| node_udm
node_amf -.->|"requests session"| node_smf
node_smf -.->|"requests policy"| node_pcf
node_udm -.->|"accesses subscriber data"| node_udr
node_smf -.->|"configures traffic"| node_upf
node_ue -.->|"exchanges user traffic"| node_upf
node_app -.->|"configures logging"| node_amf
node_app -.->|"configures logging"| node_ausf
node_app -.->|"configures logging"| node_nrf
node_app -.->|"configures logging"| node_nssf
node_app -.->|"configures logging"| node_smf
node_app -.->|"configures logging"| node_pcf
node_app -.->|"configures logging"| node_udm
node_app -.->|"configures logging"| node_udr
node_app -.->|"configures logging"| node_n3iwf

click node_amf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/amf"
click node_n3iwf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/n3iwf"
click node_nrf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/nrf"
click node_nssf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/nssf"
click node_ausf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/ausf"
click node_udm "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/udm"
click node_smf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/smf"
click node_pcf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/pcf"
click node_udr "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/udr"
click node_upf "https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/upf"
click node_webui "https://github.com/maxwellrodrigues/free_5g_core/tree/master/webconsole"
click node_app "https://github.com/maxwellrodrigues/free_5g_core/blob/master/src/app/context.go"

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_amf,node_n3iwf toneBlue
class node_nrf,node_nssf,node_ausf,node_udm,node_smf,node_pcf toneAmber
class node_udr,node_upf,node_webui toneMint
class node_app toneRose
class node_ue,node_ran toneIndigo
```

## Components

### Network access

- [AMF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/amf): `src/amf`
- [N3IWF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/n3iwf): `src/n3iwf`

### Core control plane

- [NRF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/nrf): `src/nrf`
- [NSSF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/nssf): `src/nssf`
- [AUSF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/ausf): `src/ausf`
- [UDM](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/udm): `src/udm`
- [SMF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/smf): `src/smf`
- [PCF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/pcf): `src/pcf`

### Subscriber and traffic data

- [UDR](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/udr): `src/udr`
- [UPF](https://github.com/maxwellrodrigues/free_5g_core/tree/master/src/upf): `src/upf`
- [Web console](https://github.com/maxwellrodrigues/free_5g_core/tree/master/webconsole): `webconsole`

### Shared platform

- [Shared app config](https://github.com/maxwellrodrigues/free_5g_core/blob/master/src/app/context.go): `src/app/context.go`

### Other components

- **UE**
- **RAN**

## Connections

- UE → RAN: sends access
- RAN → AMF: signals access
- UE → N3IWF: uses non-3GPP
- N3IWF → AMF: forwards signaling
- AMF → NRF: discovers services
- AMF → NSSF: selects slice
- AMF → AUSF: requests authentication
- AUSF → UDM: checks subscription
- AMF → SMF: requests session
- SMF → PCF: requests policy
- UDM → UDR: accesses subscriber data
- SMF → UPF: configures traffic
- UE → UPF: exchanges user traffic
- Shared app config → AMF: configures logging
- Shared app config → AUSF: configures logging
- Shared app config → NRF: configures logging
- Shared app config → NSSF: configures logging
- Shared app config → SMF: configures logging
- Shared app config → PCF: configures logging
- Shared app config → UDM: configures logging
- Shared app config → UDR: configures logging
- Shared app config → N3IWF: configures logging
