# kucharze-kodu/gamegatherui architecture

> Architecture diagram of the GitHub repository kucharze-kodu/gamegatherui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kucharze-kodu/gamegatherui
- Repository: https://github.com/kucharze-kodu/gamegatherui

## Overview

##### Project type and purpose
- This is a single-page web application (SPA) built with Angular (v19) that serves as the “GameGather” UI.
- It focuses on user authentication (login, register, verify email) and provides a home-page and navigation menu.
- It communicates with one or more backend services over HTTP (for auth, data fetching, etc.).

##### File structure
- Top-level Angular CLI config files: angular.json, tsconfig*.json, tailwind.config.js
- Public assets folder: public/ (static content like images)
- src/
- app/
– app.component.*: root component
– app.routes.ts: root routes config
– app.config.ts: global configuration values (API URLs, feature flags)
– authentication/ (Auth Module)
· data-access/: AuthenticationService (HTTP calls)
· guards/: AuthenticationGuard (route protection)
· model/: DTOs for login/register/resend/verify flows
· ui/: LoginPage, RegisterPage, VerifyEmailPage
– ui/ (Core UI Module)
· home-page/: HomePageComponent
· menu/: MenuComponent
- environments/: dev & prod environment settings
- main.ts & index.html: Angular bootstrap

##### README for extra insights
- Standard Angular CLI project with local dev server, build, test, e2e steps
- No built-in backend—expects one or more RESTful services

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Browser Layer
    Browser["Browser / User"]:::external

    %% Angular Bootstrap
    subgraph "Bootstrap"
        Main["main.ts"]:::serv
        Index["index.html"]:::serv
    end

    Browser -->|"opens"| Index
    Index -->|"boots Angular"| Main

    %% Angular Application
    subgraph "Angular Application"
        subgraph "App Core" 
            AppComponent["AppComponent"]:::front
            AppRoutes["app.routes.ts"]:::serv
            AppConfig["app.config.ts"]:::serv
        end

        subgraph "Authentication Module"
            AuthService["AuthenticationService"]:::serv
            AuthGuard["AuthGuard"]:::serv
            AuthModels["Models (DTOs)"]:::serv
            subgraph "Auth UI Pages"
                LoginPage["LoginPageComponent"]:::front
                RegisterPage["RegisterPageComponent"]:::front
                VerifyEmailPage["VerifyEmailPageComponent"]:::front
            end
        end

        subgraph "UI Module"
            HomePage["HomePageComponent"]:::front
            MenuComp["MenuComponent"]:::front
        end

        subgraph "Shared Services"
            HTTPInterceptor["HTTP Interceptor"]:::serv
            ConfigProvider["Config Provider"]:::serv
        end

        subgraph "Environment Configuration"
            EnvDev["environment.development.ts"]:::serv
            EnvProd["environment.ts"]:::serv
        end
    end

    %% External Services
    AuthAPI["Auth API"]:::external
    GameAPI["Game Data API"]:::external
    AuthEmail["Email Service"]:::external

    %% Data Flows & Interactions
    Main --> AppComponent
    AppComponent --> AppRoutes
    AppComponent --> AppConfig
    EnvDev -->|"provides config"| AppConfig
    EnvProd -->|"provides config"| AppConfig

    AppRoutes --> AuthGuard
    AuthGuard -->|protects| LoginPage
    LoginPage -->|navigates via Router| AppRoutes
    RegisterPage -->|navigates via Router| AppRoutes
    VerifyEmailPage -->|navigates via Router| AppRoutes

    LoginPage -->|uses| AuthService
    RegisterPage -->|uses| AuthService
    VerifyEmailPage -->|uses| AuthService

    AuthService -->|"POST /api/auth/login"| AuthAPI
    AuthService -->|"POST /api/auth/register"| AuthAPI
    AuthService -->|"POST /api/auth/verify-email"| AuthAPI
    AuthService -->|sends email| AuthEmail

    HomePage -->|uses| ConfigProvider
    HomePage -->|"GET /api/games/home-data"| GameAPI
    MenuComp -->|navigates| AppRoutes

    HTTPInterceptor -->|intercepts| AuthService
    HTTPInterceptor -->|intercepts| HomePage

    %% Click Events
    click AppComponent "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/app.component.ts"
    click AppRoutes "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/app.routes.ts"
    click AppConfig "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/app.config.ts"
    click AuthService "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/authentication/data-access/authentication.service.ts"
    click AuthGuard "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/authentication/guards/authentication.guard.ts"
    click AuthModels "https://github.com/kucharze-kodu/gamegatherui/tree/main/src/app/authentication/model/"
    click LoginPage "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/authentication/ui/login-page/login-page.component.ts"
    click RegisterPage "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/authentication/ui/register-page/register-page.component.ts"
    click VerifyEmailPage "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/authentication/ui/verify-email-page/verify-email-page.component.ts"
    click HomePage "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/ui/home-page/home-page.component.ts"
    click MenuComp "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/app/ui/menu/menu.component.ts"
    click EnvDev "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/environments/environment.development.ts"
    click EnvProd "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/environments/environment.ts"
    click Main "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/main.ts"
    click Index "https://github.com/kucharze-kodu/gamegatherui/blob/main/src/index.html"

    %% Styles
    classDef front fill:#D0E8FF,stroke:#0366d6,stroke-width:1px
    classDef serv fill:#DFF2BF,stroke:#4F8A10,stroke-width:1px
    classDef external fill:#FFE5B4,stroke:#C77600,stroke-width:1px
```
