# q4erty/ent-dev-mid architecture

> Architecture diagram of the GitHub repository q4erty/ent-dev-mid, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/q4erty/ent-dev-mid
- Repository: https://github.com/q4erty/ent-dev-mid

## Overview

##### Project type and purpose
- This is a full-stack, microservices-based task management application.
- It consists of two independent Spring Boot services (“orm-api” and “sql-api”) for REST APIs, plus a React+Vite SPA as the user interface.
- It uses PostgreSQL and MySQL for data persistence and is designed to scale horizontally.

##### File structure
- Top level:
- backend/orm-api (Gradle-built Spring Boot service with JPA entities, controllers, repositories)
- backend/sql-api (Maven-built Spring Boot service with JDBC/SQL-first style)
- frontend/ (React+Vite single-page app: pages, services/api.jsx, Vite config)
- Both backend folders follow the standard Spring Boot src/main/java and src/main/resources layout.
- No API gateway or message broker—clients call each service directly.

##### Key insights from README
- Microservices architecture: “modular architecture (frontend + backend separation).”
- Tech stack badges confirm Java 21, Spring Boot 3.3, React 18, Vite 5, PostgreSQL 16, MySQL 8.0.
- Build: Maven for sql-api, Gradle for orm-api.
- Run instructions show each service listening on its own port and the SPA on port 5173.

## Diagram (Mermaid)

```mermaid
flowchart TB
    Browser["Client Browser"]:::external
    subgraph "Frontend (React + Vite)" 
        direction TB
        SPA["SPA"]:::frontend
    end
    subgraph "Backend Services"
        direction TB
        subgraph "orm-api (Gradle)"
            direction TB
            ORMAPI["orm-api"]:::backend
            ControllerORM["Controller"]:::backend
            ServiceORM["Service"]:::backend
            RepoORM["Repository"]:::backend
            ORMAPI --> ControllerORM --> ServiceORM --> RepoORM --> PostgreSQL
        end
        subgraph "sql-api (Maven)"
            direction TB
            SQLAPI["sql-api"]:::backend
            ControllerSQL["Controller"]:::backend
            ServiceSQL["Service"]:::backend
            RepoSQL["Repository"]:::backend
            SQLAPI --> ControllerSQL --> ServiceSQL --> RepoSQL --> MySQL
        end
    end
    PostgreSQL["PostgreSQL"]:::database
    MySQL["MySQL"]:::database

    Browser -->|HTTPS 5173| SPA
    SPA -->|REST API calls| ORMAPI
    SPA -->|REST API calls| SQLAPI

    click SPA "https://github.com/q4erty/ent-dev-mid/tree/main/frontend/"
    click SPA "https://github.com/q4erty/ent-dev-mid/blob/main/frontend/src/main.jsx"
    click SPA "https://github.com/q4erty/ent-dev-mid/blob/main/frontend/src/App.jsx"
    click SPA "https://github.com/q4erty/ent-dev-mid/blob/main/frontend/src/services/api.jsx"
    click ORMAPI "https://github.com/q4erty/ent-dev-mid/tree/main/backend/orm-api/"
    click ORMAPI "https://github.com/q4erty/ent-dev-mid/blob/main/backend/orm-api/src/main/java/com/example/ormapi/OrmApiApplication.java"
    click ControllerORM "https://github.com/q4erty/ent-dev-mid/blob/main/backend/orm-api/src/main/java/com/example/ormapi/TaskController.java"
    click ServiceORM "https://github.com/q4erty/ent-dev-mid/blob/main/backend/orm-api/src/main/java/com/example/ormapi/TaskServiceImpl.java"
    click RepoORM "https://github.com/q4erty/ent-dev-mid/blob/main/backend/orm-api/src/main/java/com/example/ormapi/TaskRepository.java"
    click PostgreSQL "https://github.com/q4erty/ent-dev-mid/blob/main/backend/orm-api/src/main/resources/application.properties"
    click SQLAPI "https://github.com/q4erty/ent-dev-mid/tree/main/backend/sql-api/"
    click SQLAPI "https://github.com/q4erty/ent-dev-mid/blob/main/backend/sql-api/src/main/java/org/narxoz/sqlapi/SqlApiApplication.java"
    click ControllerSQL "https://github.com/q4erty/ent-dev-mid/blob/main/backend/sql-api/src/main/java/org/narxoz/sqlapi/controller/TaskController.java"
    click ServiceSQL "https://github.com/q4erty/ent-dev-mid/blob/main/backend/sql-api/src/main/java/org/narxoz/sqlapi/service/TaskService.java"
    click RepoSQL "https://github.com/q4erty/ent-dev-mid/blob/main/backend/sql-api/src/main/java/org/narxoz/sqlapi/repository/TaskRepository.java"
    click MySQL "https://github.com/q4erty/ent-dev-mid/blob/main/backend/sql-api/src/main/resources/application.properties"

    classDef external fill:#eef,stroke:#333
    classDef frontend fill:#bbf,stroke:#333
    classDef backend fill:#bfb,stroke:#333
    classDef database fill:#fbb,stroke:#333
```
