# department-for-transport-bods/abods-frontend architecture

> Architecture diagram of the GitHub repository department-for-transport-bods/abods-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/department-for-transport-bods/abods-frontend
- Repository: https://github.com/department-for-transport-bods/abods-frontend

## Overview

##### Project Type & Purpose
- This is a full‐front-end Angular application. The extensive modular directory structure shows that it is intended to manage many different aspects including authentication, dashboards, user management, feed monitoring, corridors, on-time performance tracking, and more.
- The project uses GraphQL (see several *.graphql files) to fetch data and integrates with external services (e.g., Mapbox for mapping, ag-grid for data grids, and the GOV.UK Design System for UI consistency).

##### Analyzing the File Structure
- Each module contains its own components, services, GraphQL files, guards, and routing configuration, indicating a modular, component-driven architecture.
- The “assets” directory indicates static assets (styles, scripts, images) and the “environments” folder shows different deployment configurations.
- Configuration files at the root (angular.json, package.json, tsconfig.json, etc.) along with testing setups (Karma, Protractor in “e2e”) indicate standard Angular development practices.

- For this full-stack front-end application (it is not a back-end service), focus on illustrating how the various Angular modules integrate via routing and shared services.
- Separation between feature modules (e.g., Authentication, Dashboard, Feed Monitoring) and core modules (e.g., Shared, Layout).
- Middleware or API integration layers (GraphQL clients) that connect the UI components with external APIs or back-end systems.

##### Additional Details
- With key configuration files (e.g., angular.json, tsconfig.json) that ensure consistency in development and build processes.

Remember to be as detailed as possible—each module/submodule, its responsibilities, and its interactions should be visibly mapped to facilitate both current understanding and future maintenance.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry Point Subgraph
    subgraph "Entry Point"
        I1["index.html"]:::entry
        I2["main.ts"]:::entry
    end

    %% Core Modules
    AM["AppModule"]:::core
    AR["App Routing"]:::core

    %% Feature Modules Subgraph
    subgraph "Feature Modules"
        AUM["Authentication Module"]:::feature
        CM["Corridors Module"]:::feature
        DM["Dashboard Module"]:::feature
        FMM["Feed Monitoring Module"]:::feature
        OTM["On-Time Module"]:::feature
        OM["Organisation Module"]:::feature
        UM["User Module"]:::feature
        VJM["Vehicle Journeys Module"]:::feature
        VM["Version Module"]:::feature
    end

    %% Common Modules Subgraph
    subgraph "Common Modules"
        SM["Shared Module"]:::common
        LC["Layout Components"]:::common
    end

    %% External Services Subgraph
    subgraph "External Services"
        GC["GraphQL Client"]:::external
        GA["GraphQL API"]:::external
        MB["Mapbox Service"]:::external
        AG["ag-grid"]:::external
        GOVUK["GOV.UK Design System"]:::external
    end

    %% Connections from Entry Point to Core
    I2 --> AM
    AM --> AR

    %% Routing from App Routing to Feature Modules
    AR --> AUM
    AR --> CM
    AR --> DM
    AR --> FMM
    AR --> OTM
    AR --> OM
    AR --> UM
    AR --> VJM
    AR --> VM

    %% Core Modules providing Common Modules
    AM --> SM
    AM --> LC

    %% Feature Modules depend on Shared Module
    AUM --> SM
    CM --> SM
    DM --> SM
    FMM --> SM
    OTM --> SM
    OM --> SM
    UM --> SM
    VJM --> SM
    VM --> SM

    %% Shared Module integrates with External Services
    SM --> GC
    GC --> GA
    SM --> MB
    SM --> AG
    SM --> GOVUK

    %% Style Definitions
    classDef entry fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef core fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef feature fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef common fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef external fill:#f8d7da,stroke:#721c24,stroke-width:2px;

    %% Click Events
    click I1 "https://github.com/department-for-transport-bods/abods-frontend/blob/main/src/index.html"
    click I2 "https://github.com/department-for-transport-bods/abods-frontend/blob/main/src/main.ts"
    click AM "https://github.com/department-for-transport-bods/abods-frontend/blob/main/src/app/app.module.ts"
    click AR "https://github.com/department-for-transport-bods/abods-frontend/blob/main/src/app/app-routing.module.ts"
    click AUM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/authentication"
    click CM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/corridors"
    click DM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/dashboard"
    click FMM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/feed-monitoring"
    click OTM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/on-time"
    click OM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/organisation"
    click UM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/user"
    click VJM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/vehicle-journeys"
    click VM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/version"
    click SM "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/shared"
    click LC "https://github.com/department-for-transport-bods/abods-frontend/tree/main/src/app/layout"
    click GC "https://github.com/department-for-transport-bods/abods-frontend/blob/main/src/app/graphql.module.ts"
```
