# vladislavfurdak/blazornexus architecture

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

- Interactive diagram: https://gitdiagram.com/vladislavfurdak/blazornexus
- Repository: https://github.com/vladislavfurdak/blazornexus

## Overview

##### Main Components

a) Core Navigation Module:
- INavigationManager<T> interface as the primary interaction point
- To the PathMapper and RouteMapper components

b) Storage Layer:
- SessionStorageRepository for maintaining navigation state
- To the core navigation module

c) URI Handling Layer:
- PathMapper and RouteMapper components
- Connection to UriUtils for URI manipulation

d) Integration Layer:
- DependencyInjection module
- Connection points to host Blazor applications

**[Host Blazor Application]**
- ↑

**[DependencyInjection Module]**
- ↑

- Navigation    |
- Manager     |←--------[Session Storage]

- ↑

**[PathMapper]  [RouteMapper]**

- ↓
- [URI Utils]

##### Key Elements to Highlight

a) Public Interface Layer:
- INavigationManager<T>
- NavigationManagerExt
- NexusNavigationOptions

b) Implementation Details:
- Relationship between Routes enum and actual Blazor pages
- Back navigation capability
- Query string parameter handling

##### Integration Points

- How the library integrates with Blazor's built-in NavigationManager
- Dependency injection setup
- Connection points for unit testing

##### Query string parameter management

Remember to include a small example showing the transformation from enum-based routing to actual URI paths, as this is a key feature of the library.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Host["Host Blazor Application"]
        App[Blazor App]
    end

    subgraph Integration["Integration Layer"]
        DI["Dependency Injection"]:::integration
        NavReg["Navigation Registration"]:::integration
    end

    subgraph Core["Core Navigation Layer"]
        INav["INavigationManager Interface"]:::core
        NavExt["Navigation Manager Extensions"]:::core
        NavOpt["Navigation Options"]:::core
    end

    subgraph Storage["Storage Layer"]
        Session["Session Storage Repository"]:::storage
        BackNav["Back Navigation Repository"]:::storage
    end

    subgraph URI["URI Handling Layer"]
        PathMap["Path Mapper"]:::uri
        RouteMap["Route Mapper"]:::uri
        RouteInfo["Route Information DTO"]:::uri
        UriUtil["URI Utilities"]:::uri
    end

    %% Relationships
    App --> DI
    DI --> INav
    NavReg --> DI

    INav --> Session
    INav --> BackNav
    INav --> PathMap
    INav --> RouteMap

    PathMap --> UriUtil
    RouteMap --> UriUtil
    RouteMap --> RouteInfo

    NavExt --> INav
    NavOpt --> INav

    %% Styling
    classDef core fill:#a2d2ff,stroke:#333,stroke-width:2px
    classDef storage fill:#caffbf,stroke:#333,stroke-width:2px
    classDef uri fill:#ffd6a5,stroke:#333,stroke-width:2px
    classDef integration fill:#e9ecef,stroke:#333,stroke-width:2px

    %% Click Events
    click INav "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/Public/INavigationManager.cs"
    click NavExt "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/Public/NavigationManagerExt.cs"
    click NavOpt "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/Public/Models/NexusNavigationOptions.cs"
    click Session "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/BrowserSpecific/SessionStorageRepository.cs"
    click PathMap "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/URIMapping/PathMapper.cs"
    click RouteMap "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/URIMapping/RouteMapper.cs"
    click UriUtil "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/Utils/UriUtils.cs"
    click DI "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/DependencyInjection/DI.cs"
    click BackNav "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/Repositories/BackPageRepository.cs"
    click RouteInfo "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/URIMapping/RouteInfoDTO.cs"
    click NavReg "https://github.com/VladislavFurdak/BlazorNexus/blob/main/BlazorNexsus.Navigation/Public/NavigationManagerRegistrationExtensions.cs"
```
