# davidreinon/pi_edelmiro_monros architecture

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

- Interactive diagram: https://gitdiagram.com/davidreinon/pi_edelmiro_monros
- Repository: https://github.com/davidreinon/pi_edelmiro_monros

## Overview

##### Project Overview and Main Components
- The project is a full-stack web application aimed at modernizing the digital presence of a workshop specializing in fallera meshes. Its purpose is to provide clients with information on services and products while allowing administrators to manage website content.
- There are two principal parts:
- Frontend: Built with Angular (version 19) and Bootstrap. This is a single-page application (SPA) that handles rapid client-side interactions.
- Backend: A Symfony (version 7) application set up as an API (using API Platform) that handles business logic, data management (using Doctrine), and serves dynamic content.
- Additional components include CI/CD configurations (GitHub workflows), Docker configuration files for containerization (nginx and php), and testing scripts (PHPUnit and Angular test specs).

##### Relationships and Data Flows
- API calls (HTTP/HTTPS) from the Angular application to various API endpoints provided by Symfony.
- A segment for CI/CD:
- That Docker orchestrates the deployment:

##### Important Architectural Patterns and Technologies
- MVC pattern prevalent in the Symfony project (Controllers, Entities/Models, and Views using Twig).
- RESTful API design (or API Platform’s hypermedia design) for the backend.
- That the project utilizes various configuration files to separate development, testing, and production setups (e.g., .env.dev, .env.test).
- Ancillary services:
- Testing frameworks (PHPUnit for backend and Angular test specs for frontend).
- Build tools (Webpack for Symfony’s assets and Angular’s build process).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Subgraph
    subgraph "Frontend (Angular Application)"
        F1["App Module & Routing (app.routes.ts)"]
        F2["Components (src/app/components)"]
        F3["Services (src/app/services)"]
        F4a["angular.json"]
        F4b["package.json"]
        F5["Angular Test Specs"]
    end

    %% Backend Subgraph
    subgraph "Backend (Symfony API Application)"
        B1["Controllers (src/Controller)"]
        B2["Entities (src/Entity)"]
        B3["Repositories (src/Repository)"]
        B4["Configurations (config)"]
        B5["Public Assets (public)"]
        B6["PHPUnit Tests (phpunit.xml.dist)"]
    end

    %% Additional Components
    D["Database"]
    CI["CI/CD Pipeline"]
    DC["Docker Config"]

    %% Data Flows
    F1 -->|"HTTP_API"| B1
    B2 -->|"ORM/CRUD"| D
    CI -->|"deploys_to"| DC
    DC -->|"Hosts"| B5

    %% Click Events for Frontend Components
    click F1 "https://github.com/davidreinon/pi_edelmiro_monros/blob/main/frontend/app_edelmiro_monros/src/app/app.routes.ts"
    click F2 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/frontend/app_edelmiro_monros/src/app/components"
    click F3 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/frontend/app_edelmiro_monros/src/app/services"
    click F4a "https://github.com/davidreinon/pi_edelmiro_monros/blob/main/frontend/app_edelmiro_monros/angular.json"
    click F4b "https://github.com/davidreinon/pi_edelmiro_monros/blob/main/frontend/app_edelmiro_monros/package.json"

    %% Click Events for Backend Components
    click B1 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/backend/EdelmiroMonros/src/Controller"
    click B2 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/backend/EdelmiroMonros/src/Entity"
    click B3 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/backend/EdelmiroMonros/src/Repository"
    click B4 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/backend/EdelmiroMonros/config"
    click B5 "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/backend/EdelmiroMonros/public"
    click B6 "https://github.com/davidreinon/pi_edelmiro_monros/blob/main/backend/EdelmiroMonros/phpunit.xml.dist"

    %% Click Events for Infrastructure Components
    click CI "https://github.com/davidreinon/pi_edelmiro_monros/blob/main/.github/workflows/deploy.yml"
    click DC "https://github.com/davidreinon/pi_edelmiro_monros/tree/main/backend/EdelmiroMonros/docker"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef infrastructure fill:#FFD700,stroke:#000,stroke-width:1px;
    classDef database fill:#D3D3D3,stroke:#000,stroke-width:1px;

    class F1,F2,F3,F4a,F4b,F5 frontend;
    class B1,B2,B3,B4,B5,B6 backend;
    class CI,DC infrastructure;
    class D database;
```
