# cruglobal/conf-registration-web architecture

> Architecture diagram of the GitHub repository cruglobal/conf-registration-web, 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/cruglobal/conf-registration-web
- Repository: https://github.com/cruglobal/conf-registration-web

## Overview

##### Main Components

a. Frontend Architecture:
- Angular.js Application (Legacy)
- Controllers (/app/scripts/controllers)
- Services (/app/scripts/services)
- Directives (/app/scripts/directives)
- Views (/app/views)

- React/Next.js Components (Modern)
- Components (/app/scripts/components)
- Hooks (/app/scripts/hooks)
- Pages (/pages)

b. Backend Integration:
- API Services Layer
- Authentication Services (Okta integration)
- Payment Processing Systems

##### Key Architectural Elements

**[Client Layer]**
- Browser
- React/Next.js Components
- Angular.js Components
- Styles (SCSS)

**[Application Layer]**
- Routing (Next.js + Angular)
- State Management
- Services
- Hooks
- Controllers

**[Integration Layer]**
- API Services
- Authentication (Okta)
- Payment Processing
- Analytics Service

**[External Services]**
- ERT API Server
- Payment Gateways
- Authentication Provider

##### Important Flows to Highlight

- User Authentication Flow
- Event Registration Process
- Payment Processing
- Journal Upload/Review
- Promotion Management

##### Specific Implementation Details

- Hybrid nature of the application (Angular.js + React/Next.js)
- Separation between legacy and modern components
- Build/deployment pipeline (Webpack, Babel)
- Test coverage integration (Jest, Karma)

##### Component Relationships

- Data flow between components
- Service dependencies
- API calls
- Authentication flow
- State management patterns

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser"]
        subgraph Frontend
            React["React/Next.js Components"]:::react
            Angular["Angular.js Components"]:::angular
            Styles["Styles (SCSS)"]:::styles
        end
    end

    subgraph Application
        Routing["Routing Layer"]
        State["State Management"]
        
        subgraph Legacy
            Controllers["Controllers"]:::angular
            Directives["Directives"]:::angular
            AngularServices["Angular Services"]:::angular
            Views["Views"]:::angular
        end
        
        subgraph Modern
            Components["React Components"]:::react
            Hooks["React Hooks"]:::react
            Pages["Next.js Pages"]:::react
        end
    end

    subgraph Integration
        API["API Services"]:::service
        Auth["Authentication (Okta)"]:::auth
        Payment["Payment Processing"]:::payment
        Analytics["Analytics Service"]:::service
    end

    subgraph External
        ERTServer["ERT API Server"]:::external
        PaymentGW["Payment Gateways"]:::external
        OktaProvider["Okta Auth Provider"]:::external
    end

    subgraph Core_Features
        EventReg["Event Registration"]:::feature
        JournalMgmt["Journal Management"]:::feature
        PromoMgmt["Promotion Management"]:::feature
    end

    Browser --> React & Angular
    React & Angular --> Styles
    Angular --> Controllers & Directives & AngularServices & Views
    React --> Components & Hooks & Pages
    Controllers & Components --> API
    API --> ERTServer
    Auth --> OktaProvider
    Payment --> PaymentGW
    EventReg --> API
    JournalMgmt --> API
    PromoMgmt --> API

    %% Click Events
    click Controllers "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/controllers/"
    click Directives "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/directives/"
    click AngularServices "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/services/"
    click Views "https://github.com/CruGlobal/conf-registration-web/tree/master/app/views/"
    click Components "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/components/"
    click Hooks "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/hooks/"
    click Pages "https://github.com/CruGlobal/conf-registration-web/tree/master/pages/"
    click Auth "https://github.com/CruGlobal/conf-registration-web/blob/master/app/scripts/controllers/oktaDescription.js"
    click Payment "https://github.com/CruGlobal/conf-registration-web/blob/master/app/scripts/services/payment.js"
    click EventReg "https://github.com/CruGlobal/conf-registration-web/blob/master/app/scripts/services/registration.js"
    click JournalMgmt "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/components/JournalUploadPage/"
    click PromoMgmt "https://github.com/CruGlobal/conf-registration-web/tree/master/app/scripts/components/PromoUploadPage/"
    click Styles "https://github.com/CruGlobal/conf-registration-web/tree/master/app/styles/"

    %% Styling
    classDef react fill:#61dafb,stroke:#000
    classDef angular fill:#dd1b16,stroke:#000
    classDef service fill:#95d475,stroke:#000
    classDef auth fill:#ffd700,stroke:#000
    classDef payment fill:#b19cd9,stroke:#000
    classDef external fill:#gray,stroke:#000
    classDef feature fill:#87ceeb,stroke:#000
    classDef styles fill:#ff69b4,stroke:#000

    %% Legend
    subgraph Legend
        L1["React Components"]:::react
        L2["Angular Components"]:::angular
        L3["Services"]:::service
        L4["Authentication"]:::auth
        L5["Payment"]:::payment
        L6["External Services"]:::external
        L7["Core Features"]:::feature
        L8["Styles"]:::styles
    end
```
