# aressalvatruch/interactions-avanc-es---angular---spring-ai architecture

> Architecture diagram of the GitHub repository aressalvatruch/interactions-avanc-es---angular---spring-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aressalvatruch/interactions-avanc-es---angular---spring-ai
- Repository: https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai

## Overview

##### Project type and purpose
- This repository is an educational “Interactions Avancées – Angular & Spring AI” workspace containing multiple independent homework projects (TP1, TP2, etc.).
- TP1 is a full-stack demo: an Angular single-page-app frontend + Spring Boot backend exposing web MVC pages and a REST API for products.
- TP2 is a more elaborate multi-module chat demo combining:
- An Angular chat frontend
- A Java “MCP Client” Spring Boot microservice
- A Java “MCP Server” Spring Boot microservice
- A Python chat server alternative

##### File structure
- Top-level “TP1” and “TP2” folders each contain a self-contained project with its own README, build scripts, source, tests.
- TP1/frontend (TP1/src, angular.json, package.json) is a standard Angular CLI app.
- TP1/backend (products-service-main/Backend) is a Maven-based Spring Boot web MVC + REST project, with controllers, entities, repository, templates.
- TP2/mcp-demo-spring-python is a multi-module Maven reactor (pom.xml at root) with sub-folders:
- chat-frontend (Angular app)
- mcp-Client (Java Spring Boot microservice)
- mcp-server (Java Spring Boot microservice)
- python-mcp-server (Python FastAPI/uvicorn server)

##### Readme insights
- The README explains that each TP folder is independent, with its own detailed instructions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% TP1 Full-stack Demo
    subgraph "TP1 - Full-stack Demo"
        direction TB
        TP1_Angular["Angular SPA (Browser Frontend)"]:::frontend
        TP1_angular_json["angular.json"]:::config
        TP1_package_json["package.json"]:::config
        TP1_SpringBootApp["Spring Boot App Entry Point"]:::java
        TP1_MVCController["MVC Controller (ProductController)"]:::java
        TP1_RESTController["REST Controller (ProductRestAPI)"]:::java
        TP1_Entity["Entity (Product)"]:::data
        TP1_Repository["Repository (ProductRepository)"]:::data
        TP1_Template["Thymeleaf Template (products.html)"]:::template
        TP1_Properties["Application Properties"]:::config
        TP1_Database["Database"]:::db
    end

    %% TP2 Microservices Demo
    subgraph "TP2 - Microservices Demo"
        direction TB
        TP2_Angular["Angular Chat Frontend"]:::frontend
        TP2_chat_angular_json["angular.json"]:::config
        TP2_chat_package_json["package.json"]:::config
        TP2_MCP_Client_App["MCP Client App Entry Point"]:::java
        TP2_MCP_Client_Ctrs["MCP Client REST Controllers"]:::java
        TP2_MCP_Client_Agent["MCP Client AIAgent Interface"]:::java
        TP2_MCP_Client_Config["MCP Client Config (mcp-servers.json)"]:::config
        TP2_MCP_Server_App["MCP Server App Entry Point"]:::java
        TP2_MCP_Server_Tools["MCP Server Tools (StockTolls)"]:::java
        TP2_Python_Server["Python Chat Server"]:::python
        TP2_py_main["main.py"]:::python
        TP2_py_config["pyproject.toml"]:::config
    end

    %% Connections TP1
    TP1_Angular -->|"HTTP Requests"| TP1_RESTController
    TP1_Angular -->|"Page Requests"| TP1_MVCController
    TP1_MVCController -->|"renders"| TP1_Template
    TP1_RESTController -->|"uses"| TP1_Repository
    TP1_MVCController -->|"uses"| TP1_Repository
    TP1_Repository -->|"manages"| TP1_Entity
    TP1_Repository -->|"persists"| TP1_Database
    TP1_RESTController -->|"application starts"| TP1_SpringBootApp
    TP1_MVCController -->|"application starts"| TP1_SpringBootApp

    %% Connections TP2
    TP2_Angular -->|"HTTP /chat, /ai"| TP2_MCP_Client_Ctrs
    TP2_MCP_Client_Ctrs -->|"calls"| TP2_MCP_Server_App
    TP2_MCP_Server_App -->|"can call"| TP2_Python_Server
    TP2_MCP_Client_Ctrs -->|"loads"| TP2_MCP_Client_Config
    TP2_MCP_Server_App -->|"uses"| TP2_MCP_Server_Tools

    %% CLI Config usage
    TP1_Angular -->|"configured by"| TP1_angular_json
    TP1_Angular -->|"configured by"| TP1_package_json
    TP2_Angular -->|"configured by"| TP2_chat_angular_json
    TP2_Angular -->|"configured by"| TP2_chat_package_json

    %% Application Entry Points
    TP1_SpringBootApp -->|"configured by"| TP1_Properties

    %% Python Server scripts
    TP2_Python_Server -->|"entry"| TP2_py_main
    TP2_Python_Server -->|"configured by"| TP2_py_config

    %% Click Events
    click TP1_Angular "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/tree/main/TP1/src"
    click TP1_angular_json "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/angular.json"
    click TP1_package_json "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/package.json"
    click TP1_SpringBootApp "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/java/net/youssfi/webmvcproducts/WebMvcProductsApplication.java"
    click TP1_RESTController "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/java/net/youssfi/webmvcproducts/web/ProductRestAPI.java"
    click TP1_MVCController "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/java/net/youssfi/webmvcproducts/web/ProductController.java"
    click TP1_Entity "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/java/net/youssfi/webmvcproducts/entities/Product.java"
    click TP1_Repository "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/java/net/youssfi/webmvcproducts/repository/ProductRepository.java"
    click TP1_Template "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/resources/templates/products.html"
    click TP1_Properties "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP1/products-service-main Backend/src/main/resources/application.properties"

    click TP2_Angular "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/tree/main/TP2/mcp-demo-spring-python/chat-frontend/src/app"
    click TP2_chat_angular_json "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/chat-frontend/angular.json"
    click TP2_chat_package_json "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/chat-frontend/package.json"
    click TP2_MCP_Client_App "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/mcp-Client/src/main/java/org/example/mcpclient/McpClientApplication.java"
    click TP2_MCP_Client_Ctrs "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/tree/main/TP2/mcp-demo-spring-python/mcp-Client/src/main/java/org/example/mcpclient/controllers"
    click TP2_MCP_Client_Agent "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/mcp-Client/src/main/java/org/example/mcpclient/agents/AIAgent.java"
    click TP2_MCP_Client_Config "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/mcp-Client/src/main/resources/mcp-servers.json"
    click TP2_MCP_Server_App "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/mcp-server/src/main/java/org/example/mcpserver/McpServerApplication.java"
    click TP2_MCP_Server_Tools "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/mcp-server/src/main/java/org/example/mcpserver/tools/StockTolls.java"
    click TP2_Python_Server "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/python-mcp-server/server.py"
    click TP2_py_main "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/python-mcp-server/main.py"
    click TP2_py_config "https://github.com/aressalvatruch/interactions-avanc-es---angular---spring-ai/blob/main/TP2/mcp-demo-spring-python/python-mcp-server/pyproject.toml"

    %% Styles
    classDef frontend fill:#bbdefb,stroke:#0d47a1,color:#0d47a1;
    classDef java fill:#c8e6c9,stroke:#2e7d32,color:#2e7d32;
    classDef python fill:#fff9c4,stroke:#f9a825,color:#f57f17;
    classDef config fill:#eeeeee,stroke:#9e9e9e,color:#424242;
    classDef db fill:#e0e0e0,stroke:#424242,color:#212121;
    classDef template fill:#f3e5f5,stroke:#6a1b9a,color:#4a148c;
    classDef data fill:#dcedc8,stroke:#33691e,color:#1b5e20;
```
