# ingenieria-web-uma/frontend architecture

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

- Interactive diagram: https://gitdiagram.com/ingenieria-web-uma/frontend
- Repository: https://github.com/ingenieria-web-uma/frontend

## Overview

##### Main Architecture Overview

Core Components:
- Present the Angular application as the central element
- Clear separation between core, features, and shared modules
- Authentication and authorization flow
- External service integrations (like Google Auth)

##### Detailed Component Structure

A. Application Layer (Top Level)
- App Component (root)
- App Configuration
- Routing Module

B. Core Layer
- Authentication Services
- Guards
- User Services

C. Feature Modules (Group these functionally)
1. Content Management
- Wiki Management (new-wiki, editar-wiki, wikis)
- Entry Management (editor-entradas, entradas, new-entrada)
- Version Control (historial-versiones, version)

2. User Features
- User Management (administrar-usuarios, usuario, perfil)
- Authentication (login)
- Notifications

3. Interactive Features
- Comments (comentarios)
- Ratings (valoraciones, new-valoracion)
- Maps (mapas)

D. Shared Layer
- Common Components (search bar, navigation bar, back button)
- Reusable Services
- Models

##### Data Flow Representation

- User authentication flow
- CRUD operations flow
- Component communication paths
- Service interactions

**┌─────────────────────────────────────────┐**
- External Services          │
- ┤
- Core Layer               │
- ┤
- Feature Modules             │
- ┤
- Shared Modules              │
- ┘

##### Additional Notes

- Component relationships
- Service dependencies
- Authentication flow
- Data flow patterns
- External service integration points

- The modular architecture of the application
- Clear separation of concerns
- Security implementation (guards and authentication)
- Feature organization
- Shared resource management

Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that impact the system's overall structure while avoiding overwhelming detail at the component level.

- How different parts of the application interact
- Where to find specific functionality
- How data flows through the system
- Security implementation points
- Integration points with external services

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef external fill:#FF9900,stroke:#333,stroke-width:2px
    classDef core fill:#4A90E2,stroke:#333,stroke-width:2px
    classDef feature fill:#82C91E,stroke:#333,stroke-width:2px
    classDef shared fill:#9775FA,stroke:#333,stroke-width:2px
    classDef auth fill:#FF6B6B,stroke:#333,stroke-width:2px
    classDef service fill:#15AABF,stroke:#333,stroke-width:2px

    %% External Services
    subgraph ExternalServices
        GoogleAuth["Google Authentication"]:::external
        TinyMCE["TinyMCE Editor"]:::external
    end

    %% Application Core
    subgraph AppCore
        AppComponent["App Component"]:::core
        AppConfig["App Configuration"]:::core
        AppRoutes["Routing Module"]:::core
    end
    click AppComponent "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/app.component.ts"
    click AppConfig "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/app.config.ts"
    click AppRoutes "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/app.routes.ts"

    %% Core Services & Guards
    subgraph CoreLayer
        AuthGoogle["Google Auth Service"]:::service
        LoginService["Login Service"]:::service
        AuthGuards["Auth Guards"]:::auth
        UserService["User Service"]:::service
    end
    click AuthGoogle "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/core/services/auth-google.service.ts"
    click LoginService "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/core/services/login.service.ts"
    click AuthGuards "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/core/guards/auth.guards.ts"
    click UserService "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/core/services/user.service.ts"

    %% Feature Modules
    subgraph FeatureModules
        subgraph ContentManagement
            WikiManagement["Wiki Management"]:::feature
            EntryManagement["Entry Management"]:::feature
            VersionControl["Version Control"]:::feature
        end
        click WikiManagement "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/wikis"
        click EntryManagement "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/entradas"
        click VersionControl "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/historial-versiones"

        subgraph UserFeatures
            UserManagement["User Management"]:::feature
            Login["Login"]:::feature
            Notifications["Notifications"]:::feature
        end
        click UserManagement "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/administrar-usuarios"
        click Login "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/login"
        click Notifications "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/notificaciones"

        subgraph InteractiveFeatures
            Comments["Comments"]:::feature
            Ratings["Ratings"]:::feature
            Maps["Maps"]:::feature
            ImageUpload["Image Upload"]:::feature
        end
        click Comments "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/comentarios"
        click Ratings "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/valoraciones"
        click Maps "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/mapas"
        click ImageUpload "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/features/subir-imagenes"
    end

    %% Shared Components
    subgraph SharedLayer
        SearchBar["Search Bar"]:::shared
        NavBar["Navigation Bar"]:::shared
        BackButton["Back Button"]:::shared
        EditButton["Edit Button"]:::shared
        UserModel["User Model"]:::shared
        I18n["i18n Resources"]:::shared
    end
    click SearchBar "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/shared/components/barra-busqueda"
    click NavBar "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/shared/components/barra-navegacion"
    click BackButton "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/shared/components/boton-atras"
    click EditButton "https://github.com/ingenieria-web-uma/frontend/tree/main/src/app/shared/components/boton-editar"
    click UserModel "https://github.com/ingenieria-web-uma/frontend/blob/main/src/app/models/user.model.ts"
    click I18n "https://github.com/ingenieria-web-uma/frontend/blob/main/public/i18n/es.json"

    %% Relationships
    GoogleAuth --> AuthGoogle
    AuthGoogle --> LoginService
    LoginService --> UserService
    AppComponent --> AppRoutes
    AppComponent --> AppConfig
    AppRoutes --> AuthGuards
    AuthGuards --> UserService
    TinyMCE --> EntryManagement
    TinyMCE --> WikiManagement

    %% Legend
    subgraph Legend
        L1["External Services"]:::external
        L2["Core Components"]:::core
        L3["Feature Modules"]:::feature
        L4["Shared Components"]:::shared
        L5["Auth Components"]:::auth
        L6["Services"]:::service
    end
```
