# juanjosell/microservice-app-example architecture

> Architecture diagram of the GitHub repository juanjosell/microservice-app-example, 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/juanjosell/microservice-app-example
- Repository: https://github.com/juanjosell/microservice-app-example

## Overview

##### Main Components
- Users API (Java / Spring Boot): Provides user profile information and basic user queries.
- Auth API (Go): Manages authorization and generates JWT tokens for secure communication.
- TODOs API (NodeJS): Provides CRUD operations for TODO items; also logs 'create' and 'delete' operations.
- Log Message Processor (Python): Acts as a consumer that reads from a Redis queue and processes log messages.
- Frontend (Vue JS): The user interface that communicates with the backend services via APIs.
- Supporting Services: Include any configuration/deployment tools visible in the project such as the Azure Pipelines configuration (azure-pipelines.yml) and integration with Redis (used by TODOS API and Log Message Processor).

##### Relationships and Interactions
- Frontend communicates with the Auth API, Users API, and TODOs API via RESTful calls.
- Auth API provides JWT tokens that secure access to other APIs.
- TODOs API interacts with a Redis queue to log specific operations (CRUD events).
- Log Message Processor consumes messages from the Redis queue and outputs log details.

##### Architectural Patterns and Components
- Microservices Architecture: Highlight the separation of concerns as each service is a standalone component that can be built, deployed, and scaled independently.
- API Gateway or Frontend as API Consumer: While not explicitly mentioned, the Frontend plays the role of aggregating data from the different backend services.
- JWT for Authentication: Emphasize the role of Auth API in token generation and validation as part of secure communication.

##### Relevant Technologies and Frameworks
- Users API: Spring Boot, Java.
- Auth API: Go.
- TODOs API: NodeJS, Express (if applicable), Redis integration.
- Log Message Processor: Python (using standard libraries or message queue packages).
- Frontend: Vue.js, webpack configuration (note the build and config directories).
- Additional DevOps tools: Azure Pipelines for CI/CD integration.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Frontend Layer
    subgraph "Frontend Layer"
        FE("Frontend (Vue.js)"):::frontend
    end

    %% Backend Services
    subgraph "Backend Services"
        Auth("Auth API (Go)"):::backend
        Users("Users API (Spring Boot)"):::backend
        TODOS("TODOs API (NodeJS)"):::backend
    end

    %% Messaging Layer
    subgraph "Messaging Layer"
        Redis("Redis Queue"):::messaging
        LogProc("Log Message Processor (Python)"):::messaging
    end

    %% CI/CD Layer
    subgraph "CI/CD"
        Azure("Azure Pipelines"):::devops
    end

    %% Interactions
    FE -->|"authenticate"| Auth
    FE -->|"fetchUser"| Users
    FE -->|"manageTodos"| TODOS
    Auth -->|"providesJWT"| Users
    TODOS -->|"log_create/delete"| Redis
    Redis -->|"processLogs"| LogProc

    Azure -.->|"deploys"| FE
    Azure -.->|"deploys"| Auth
    Azure -.->|"deploys"| Users
    Azure -.->|"deploys"| TODOS
    Azure -.->|"deploys"| LogProc

    %% Click Events
    click FE "https://github.com/juanjosell/microservice-app-example/tree/master/frontend/"
    click Auth "https://github.com/juanjosell/microservice-app-example/tree/master/auth-api/"
    click Users "https://github.com/juanjosell/microservice-app-example/tree/master/users-api/"
    click TODOS "https://github.com/juanjosell/microservice-app-example/tree/master/todos-api/"
    click LogProc "https://github.com/juanjosell/microservice-app-example/tree/master/log-message-processor/"
    click Azure "https://github.com/juanjosell/microservice-app-example/blob/master/azure-pipelines.yml"

    %% Styles
    classDef frontend fill:#c1f0ff,stroke:#007acc,stroke-width:2px;
    classDef backend fill:#d0f0c0,stroke:#2e8b57,stroke-width:2px;
    classDef messaging fill:#fff2cc,stroke:#d2b48c,stroke-width:2px;
    classDef devops fill:#ffd1dc,stroke:#ff69b4,stroke-width:2px;
```
