# khalidechchahid/deploy_pfe architecture

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

- Interactive diagram: https://gitdiagram.com/khalidechchahid/deploy_pfe
- Repository: https://github.com/khalidechchahid/deploy_pfe

## Overview

##### Project Type & Purpose
- The README makes it clear that this is a full-stack web platform with a microservices architecture designed for university services. Its goals include document sharing, announcements, letter requests, blogging, and user management. It also includes a cross-platform desktop application built with Electron.
- The project uses several backend microservices (e.g., ApiGateway, Notification, announcement, letters, professorArticle, studentPublication, userManagement) along with support components like Eureka Server for service discovery, RabbitMQ (amqp) for asynchronous messaging, and a component using OpenFeign for inter-service HTTP client calls.

##### File Structure
- Notice separate directories for each microservice:
- ApiGateway: The API gateway that centralizes incoming requests.
- Notification, announcement, letters, professorArticle, studentPublication, userManagement: Individual microservices handling distinct domain functionalities.
- Eureka-server: A service registry to support the microservices architecture.
- amqp: Contains RabbitMQ configuration and messaging producer logic.
- openFeign: Likely responsible for consuming or delegating calls to external/internal services.
- Each of these modules follows a common Maven project structure, indicating consistent design and separation of concerns.
- The existence of a root-level pom.xml and multiple service-specific pom.xml files reinforces the idea of a robust multi-module system commonly used in microservices.

##### Key Information from the README
- The README outlines both the backend (Spring Boot based) and the frontend (React and Electron). It also emphasizes design decisions:
- Microservices for scalability and independent deployments.
- JWT for secure authentication.
- RabbitMQ for asynchronous message communication.
- Eureka for dynamic discovery of services.
- There is also mention of the desktop application developed using Electron, which will interface with backend services.

##### Final Advice – Capturing the Essential Architectural Elements
- Be as detailed as possible by mapping out every logical module present in the file tree. Do not be afraid to separate the system into its most granular components since clarity is key for maintenance and future scalability.
- To capture important interactions, such as the authentication flows, messaging queues, and service discovery, to ensure that every dependency is shown.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Client Layer"
        Web_Frontend["Web Frontend"]:::frontend
        Desktop_App["Desktop Application"]:::frontend
    end

    Web_Frontend -->|"HTTP/JWT"| API_Gateway
    Desktop_App -->|"HTTP/JWT"| API_Gateway

    API_Gateway["API Gateway (JWT Auth)"]:::gateway

    subgraph "Microservices"
        Notification["Notification Service"]:::service
        Announcement["Announcement Service"]:::service
        Letters["Letters Service"]:::service
        Professor_Article["Professor Article Service"]:::service
        Student_Publication["Student Publication Service"]:::service
        User_Management["User Management Service"]:::service
    end

    API_Gateway -->|"REST"| Notification
    API_Gateway -->|"REST"| Announcement
    API_Gateway -->|"REST"| Letters
    API_Gateway -->|"REST"| Professor_Article
    API_Gateway -->|"REST"| Student_Publication
    API_Gateway -->|"REST"| User_Management

    subgraph "Infrastructure"
        Eureka["Eureka Server"]:::infrastructure
        RabbitMQ["RabbitMQ (AMQP)"]:::infrastructure
        OpenFeign["OpenFeign"]:::infrastructure
        DB["PostgreSQL Database"]:::database
    end

    API_Gateway ---|"Register"| Eureka
    Notification ---|"Register"| Eureka
    Announcement ---|"Register"| Eureka
    Letters ---|"Register"| Eureka
    Professor_Article ---|"Register"| Eureka
    Student_Publication ---|"Register"| Eureka
    User_Management ---|"Register"| Eureka

    Notification -.->|"AMQP"| RabbitMQ
    Announcement -.->|"AMQP"| RabbitMQ
    Letters -.->|"AMQP"| RabbitMQ
    Professor_Article -.->|"AMQP"| RabbitMQ
    Student_Publication -.->|"AMQP"| RabbitMQ
    User_Management -.->|"AMQP"| RabbitMQ

    API_Gateway ---|"InterServiceHTTP"| OpenFeign
    Notification ---|"InterServiceHTTP"| OpenFeign
    Announcement ---|"InterServiceHTTP"| OpenFeign
    Letters ---|"InterServiceHTTP"| OpenFeign
    Professor_Article ---|"InterServiceHTTP"| OpenFeign
    Student_Publication ---|"InterServiceHTTP"| OpenFeign
    User_Management ---|"InterServiceHTTP"| OpenFeign

    %% Click Events for Component Mapping
    click API_Gateway "https://github.com/khalidechchahid/deploy_pfe/tree/main/ApiGateway/"
    click Notification "https://github.com/khalidechchahid/deploy_pfe/tree/main/Notification/"
    click Announcement "https://github.com/khalidechchahid/deploy_pfe/tree/main/announcement/"
    click Letters "https://github.com/khalidechchahid/deploy_pfe/tree/main/letters/"
    click Professor_Article "https://github.com/khalidechchahid/deploy_pfe/tree/main/professorArticle/"
    click Student_Publication "https://github.com/khalidechchahid/deploy_pfe/tree/main/studentPublication/"
    click User_Management "https://github.com/khalidechchahid/deploy_pfe/tree/main/userManagement/"
    click Eureka "https://github.com/khalidechchahid/deploy_pfe/tree/main/eureka-server/"
    click RabbitMQ "https://github.com/khalidechchahid/deploy_pfe/tree/main/amqp/"
    click OpenFeign "https://github.com/khalidechchahid/deploy_pfe/tree/main/openFeign/"

    %% Styles
    classDef frontend fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef gateway fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef service fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
    classDef infrastructure fill:#FDEBD0,stroke:#D35400,stroke-width:2px;
    classDef database fill:#F5EEF8,stroke:#8E44AD,stroke-width:2px;
```
