# backbase/golden-sample-app architecture

> Architecture diagram of the GitHub repository backbase/golden-sample-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/backbase/golden-sample-app
- Repository: https://github.com/backbase/golden-sample-app

## Overview

##### Main Architecture Components

a) Frontend Application Layer:
- Main App Container (golden-sample-app)
- Feature Journeys:
- Transactions Journey
- Transfer Journey
- ACH Positive Pay Journey
- Shared Components:
- Authentication Module
- Locale Selector
- Theme Switcher
- User Context

b) Journey Architecture Layer:
Each journey should be represented with its internal architecture:
- Feature Module
- Data Access Layer
- UI Components
- Shell Module
- Shared Data

c) Core Services Layer:
- Authentication Services
- Journey Communication Service
- Analytics Service
- Configuration Services

d) External Integration Layer:
- Mock Server
- API Services
- Authentication Server

##### Detailed Component Breakdown

**[External Systems Layer]**

- Authentication Server
- API Backend
- Mock Server (Development)

**[Core Application Layer]**

- App Shell
- Router
- Auth Guard
- Error Handler

- Feature Journeys
- Transactions Journey
- Feature Module
- Data Access
- UI Components

- Transfer Journey
- Feature Module
- Data Access
- UI Components

- ACH Positive Pay Journey
- Feature Module
- Data Access
- UI Components

- Shared Services
- Authentication
- Journey Communication
- Analytics
- Configuration

- Common Components
- Locale Selector
- Theme Switcher
- User Context

##### Important Architectural Patterns to Highlight

- Modular Architecture: Show how the application is divided into independent journey modules
- Lazy Loading: Indicate how journeys are lazy-loaded
- State Management: Show the flow of data between components
- Service Communication: Illustrate how journeys communicate through the Journey Communication Service
- Authentication Flow: Display the authentication process and guard implementation

##### Additional Elements

- Component types
- Connection types
- Module boundaries
- Data flow directions

##### Technical Details

- Angular version and key libraries
- Docker container boundaries
- E2E testing coverage
- Environment configurations
- Build pipeline integration points

This system design should effectively communicate both the high-level architecture and the detailed component interactions while highlighting the modular nature of the journey-based architecture pattern used in this Backbase application.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef external fill:#gray,stroke:#333
    classDef core fill:#blue,stroke:#333
    classDef journey fill:#green,stroke:#333
    classDef service fill:#yellow,stroke:#333
    classDef shared fill:#purple,stroke:#333

    %% External Systems Layer
    subgraph ExternalSystems
        AuthServer["Authentication Server"]:::external
        APIBackend["API Backend"]:::external
        MockServer["Mock Server"]:::external
    end

    %% Core Application Layer
    subgraph CoreApp["Core Application Layer"]
        AppShell["App Container"]:::core
        Router["Router"]:::core
        AuthGuard["Auth Guard"]:::core
        ErrorHandler["Error Handler"]:::core
    end

    %% Feature Journeys Layer
    subgraph Journeys["Feature Journeys"]
        subgraph TransactionsJ["Transactions Journey"]
            TFeature["Feature Module"]:::journey
            TData["Data Access"]:::journey
            TUI["UI Components"]:::journey
            TShell["Shell Module"]:::journey
        end

        subgraph TransferJ["Transfer Journey"]
            TRFeature["Feature Module"]:::journey
            TRData["Data Access"]:::journey
            TRUI["UI Components"]:::journey
            TRShell["Shell Module"]:::journey
        end

        subgraph ACHJ["ACH Positive Pay Journey"]
            AFeature["Feature Module"]:::journey
            AData["Data Access"]:::journey
            AUI["UI Components"]:::journey
            AShell["Shell Module"]:::journey
        end
    end

    %% Shared Services Layer
    subgraph SharedServices["Shared Services"]
        AuthService["Authentication Service"]:::service
        JourneyComm["Journey Communication"]:::service
        Analytics["Analytics Service"]:::service
        Config["Configuration"]:::service
    end

    %% Common Components Layer
    subgraph CommonComponents["Common Components"]
        LocaleSelector["Locale Selector"]:::shared
        ThemeSwitcher["Theme Switcher"]:::shared
        UserContext["User Context"]:::shared
    end

    %% Connections
    AppShell --> Router
    AppShell --> AuthGuard
    AppShell --> ErrorHandler
    
    AuthGuard --> AuthService
    AuthService --> AuthServer
    
    APIBackend --> MockServer
    
    JourneyComm --> TransactionsJ
    JourneyComm --> TransferJ
    JourneyComm --> ACHJ

    %% Click Events
    click AppShell "https://github.com/Backbase/golden-sample-app/tree/main//apps/golden-sample-app/src/app"
    click AuthService "https://github.com/Backbase/golden-sample-app/blob/main//apps/golden-sample-app/src/app/auth/auth-events-handler/auth-events-handler.service.ts"
    click JourneyComm "https://github.com/Backbase/golden-sample-app/blob/main//apps/golden-sample-app/src/app/services/journey-communication.service.ts"
    click Analytics "https://github.com/Backbase/golden-sample-app/blob/main//apps/golden-sample-app/src/app/services/analytics.service.ts"
    click LocaleSelector "https://github.com/Backbase/golden-sample-app/tree/main//apps/golden-sample-app/src/app/locale-selector"
    click ThemeSwitcher "https://github.com/Backbase/golden-sample-app/tree/main//apps/golden-sample-app/src/app/theme-switcher"
    click UserContext "https://github.com/Backbase/golden-sample-app/tree/main//apps/golden-sample-app/src/app/user-context"
    click MockServer "https://github.com/Backbase/golden-sample-app/tree/main//mock-server"
    click APIBackend "https://github.com/Backbase/golden-sample-app/tree/main//mock-server/mocks/golden-sample-app"
    
    %% Journey Components
    click TransactionsJ "https://github.com/Backbase/golden-sample-app/tree/main//libs/transactions-journey"
    click TFeature "https://github.com/Backbase/golden-sample-app/tree/main//libs/transactions-journey/feature"
    click TData "https://github.com/Backbase/golden-sample-app/tree/main//libs/transactions-journey/data-access"
    click TUI "https://github.com/Backbase/golden-sample-app/tree/main//libs/transactions-journey/ui"
    click TShell "https://github.com/Backbase/golden-sample-app/tree/main//libs/transactions-journey/shell"
    
    click TransferJ "https://github.com/Backbase/golden-sample-app/tree/main//libs/transfer-journey"
    click TRFeature "https://github.com/Backbase/golden-sample-app/tree/main//libs/transfer-journey/feature"
    click TRData "https://github.com/Backbase/golden-sample-app/tree/main//libs/transfer-journey/data-access"
    click TRUI "https://github.com/Backbase/golden-sample-app/tree/main//libs/transfer-journey/ui"
    click TRShell "https://github.com/Backbase/golden-sample-app/tree/main//libs/transfer-journey/shell"
    
    click ACHJ "https://github.com/Backbase/golden-sample-app/tree/main//libs/ach-positive-pay-journey"
    click AFeature "https://github.com/Backbase/golden-sample-app/tree/main//libs/ach-positive-pay-journey/feature"
    click AData "https://github.com/Backbase/golden-sample-app/tree/main//libs/ach-positive-pay-journey/data-access"
    click AUI "https://github.com/Backbase/golden-sample-app/tree/main//libs/ach-positive-pay-journey/ui"
    click AShell "https://github.com/Backbase/golden-sample-app/tree/main//libs/ach-positive-pay-journey/shell"
```
