# 1asi0729-2510-4307-g2-influmatch/influmatch-webapplication architecture

> Architecture diagram of the GitHub repository 1asi0729-2510-4307-g2-influmatch/influmatch-webapplication, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication
- Repository: https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication

## Overview

##### Project type and purpose
- This is an Angular single‐page application (SPA) named “InfluMatchWebApplication” that connects brands and influencers via a dashboard.
- It is purely a front‐end client delivered as a static site (deployed via Azure Static Web Apps) that communicates with back‐end REST APIs for auth, profile and dashboard data.

##### File structure
- Top‐level directories:
- src/app/core – app‐wide services, guards, interceptors
- src/app/shared – shared modules, utilities, validators
- src/app/domain – entities, value‐objects, repository interfaces (clean architecture core)
- src/app/application – use‐cases that orchestrate business rules
- src/app/infrastructure – HTTP API adapters, DTOs, assemblers, repository implementations
- src/app/features – feature modules (auth, dashboard) each with presentation, domain, application, infrastructure sub‐folders
- Config/deployment: .github/workflows (CI→Azure), angular.json, vite.config.ts

##### README
- Standard Angular CLI project. No custom architecture docs—must infer layers from code organization.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User and Hosting
    Browser["User's Browser (Angular SPA)"]:::frontend
    GitHubActions["GitHub Actions"]:::external
    AzureHosting["Azure Static Web App"]:::external
    Browser ---|loads static site| AzureHosting
    GitHubActions -->|deploy| AzureHosting
    click GitHubActions "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/.github/workflows/azure-static-web-apps-influ-match-webapplication.yml"

    %% Core & Shared Cross-Cutting
    CoreModule["Core Module"]:::core
    AuthService["AuthService"]:::core
    ThemeService["ThemeService"]:::core
    AuthGuard["Auth Guard"]:::core
    ProfileGuard["Profile Incomplete Guard"]:::core
    AuthInterceptor["Auth Interceptor"]:::core
    CORSInterceptor["CORS Interceptor"]:::core
    SharedModule["Shared Module"]:::shared
    Utils["collaboration-status.utils"]:::shared
    Validator["password.validator"]:::shared

    click CoreModule "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/core.module.ts"
    click AuthService "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/services/auth.service.ts"
    click ThemeService "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/services/theme.service.ts"
    click AuthGuard "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/guards/auth.guard.ts"
    click ProfileGuard "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/guards/profile-incomplete.guard.ts"
    click AuthInterceptor "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/interceptors/auth.interceptor.ts"
    click CORSInterceptor "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/core/interceptors/cors.interceptor.ts"
    click SharedModule "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/shared/shared.module.ts"
    click Utils "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/shared/utils/collaboration-status.utils.ts"
    click Validator "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/shared/validators/password.validator.ts"

    %% Presentation Layer
    subgraph "Presentation Layer" 
        direction TB
        AuthUI["Auth Feature Module"]:::frontend
        DashUI["Dashboard Pages & Components"]:::frontend
    end
    click AuthUI "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/tree/main/src/app/features/auth"
    click DashUI "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/tree/main/src/app/features/dashboard/presentation/pages"

    Browser -->|navigates/clicks| AuthUI
    Browser -->|navigates/clicks| DashUI
    Browser -->|route guard check| AuthGuard
    Browser -->|route guard check| ProfileGuard

    %% Application Layer
    subgraph "Application Layer" 
        direction TB
        GlobalUC["Global Use-Cases"]:::application
        DashboardUC["Dashboard Use-Cases"]:::application
    end
    click GlobalUC "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/application/use-cases/*.usecase.ts"
    click DashboardUC "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/features/dashboard/application/use-cases/*.usecase.ts"

    AuthUI -->|calls use-case| GlobalUC
    DashUI -->|calls use-case| DashboardUC

    %% Domain Layer
    subgraph "Domain Layer" 
        direction TB
        Entities["Entities"]:::domain
        VOs["Value Objects"]:::domain
        RepoInterfaces["Repository Interfaces"]:::domain
    end
    click Entities "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/domain/entities/*.entity.ts"
    click VOs "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/domain/value-objects/**/*.vo.ts"
    click RepoInterfaces "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/domain/repositories/*.ts"

    GlobalUC -->|depends on| Entities
    DashboardUC -->|depends on| Entities
    GlobalUC -->|depends on| VOs
    DashboardUC -->|depends on| VOs
    GlobalUC -->|calls| RepoInterfaces
    DashboardUC -->|calls| RepoInterfaces

    %% Infrastructure Layer
    subgraph "Infrastructure Layer"
        direction TB
        APIAdapters["API Adapters"]:::infra
        DTOs["DTOs"]:::infra
        Assemblers["Assemblers"]:::infra
        RepoImpl["Repository Implementations"]:::infra
        InfraServices["Core Services"]:::infra
    end
    click APIAdapters "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/infrastructure/api/auth.api.ts"
    click DTOs "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/infrastructure/dtos/auth/*.dto.ts"
    click Assemblers "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/infrastructure/assemblers/*.assembler.ts"
    click RepoImpl "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/infrastructure/repositories/*.repository.ts"
    click InfraServices "https://github.com/1asi0729-2510-4307-g2-influmatch/influmatch-webapplication/blob/main/src/app/infrastructure/services/auth.service.ts"

    RepoInterfaces -->|implemented by| RepoImpl
    RepoImpl -->|uses| APIAdapters
    RepoImpl -->|uses| InfraServices
    APIAdapters -->|HttpClient| ExternalAPIs
    APIAdapters -->|intercepted by| AuthInterceptor
    APIAdapters -->|intercepted by| CORSInterceptor
    APIAdapters -->|transforms| DTOs
    Assemblers -->|convert DTO→VO| Entities

    %% External Services
    ExternalAPIs["REST APIs"]:::external
    Backend["Backend Services & Database"]:::external

    APIAdapters -->|REST calls| ExternalAPIs
    ExternalAPIs -->|data| Backend

    %% Cross-layer connections
    CoreModule --> AuthService
    CoreModule --> ThemeService
    CoreModule --> AuthGuard
    CoreModule --> ProfileGuard
    CoreModule --> AuthInterceptor
    CoreModule --> CORSInterceptor
    SharedModule --> Utils
    SharedModule --> Validator

    %% Styles
    classDef frontend fill:#AEDFF7,stroke:#036B99,color:#000
    classDef application fill:#C3F7A3,stroke:#2E7D32,color:#000
    classDef domain fill:#FFD59E,stroke:#E65100,color:#000
    classDef infra fill:#D1C4E9,stroke:#5E35B1,color:#000
    classDef core fill:#ECEFF1,stroke:#607D8B,color:#000
    classDef shared fill:#F1F8E9,stroke:#558B2F,color:#000
    classDef external fill:#CFD8DC,stroke:#37474F,color:#000
```
