# ozansyk/human-resource-management-system-project architecture

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

- Interactive diagram: https://gitdiagram.com/ozansyk/human-resource-management-system-project
- Repository: https://github.com/ozansyk/human-resource-management-system-project

## Overview

##### Project type and purpose
– This is the back-end (monolithic) REST API for a full-stack Human Resource Management System (HRMS) platform (similar to Kariyer.net). It exposes endpoints to manage cities, employers, job seekers, job postings, CVs, photos, etc., stores data in PostgreSQL, and integrates with external services (cloudinary, mail check, Mernis).

##### File structure analysis
– src/main/java/com/ozansyk/hrms/api/controllers → REST controllers (one per resource).
– src/main/java/com/ozansyk/hrms/business/abstracts + concretes → Service interfaces and implementations (business logic).
– src/main/java/com/ozansyk/hrms/dataAccess/abstracts → Spring Data JPA repositories (DAOs).
– src/main/java/com/ozansyk/hrms/entities → JPA entities and DTOs.
– src/main/java/com/ozansyk/hrms/core/adapters → Adapter pattern for external identity (Mernis) and mail checks.
– src/main/java/com/ozansyk/hrms/core/services → Cloudinary file‐upload service.
– src/main/java/com/ozansyk/hrms/core/utilities/results → Unified Result/Response wrappers.
– src/main/resources → application.yml (dev/production profiles).
– hrms.sql → initial DB schema; Dockerfile for containerization; pom.xml + Maven wrappers.

A. External Client (React frontend)
B. API Layer (Spring MVC controllers)
C. Service Layer (business managers)
D. Data Access Layer (Spring Data Repositories)
E. Domain Model (JPA Entities + DTOs)
F. Persistence Store (PostgreSQL)
G. External Systems
– Cloudinary (photo storage)
– MailCheckService
– MernisCheckService
H. Infrastructure
– Spring Security filters (authentication/authorization)
– Docker container / application profiles

- Blue for server-side layers
- Green for external services
- Orange for database
- Gray for client
- Purple outline for Docker/container boundary

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Zone
    React["React Frontend"]:::frontend

    %% Backend Container
    subgraph "Backend Container" 
        direction TB
        Application["HrmsApplication (Entry Point)"]:::server
        Tests["Integration Tests"]:::server

        subgraph "Configuration & Infrastructure"
            direction TB
            ConfigYml["application.yml / application-dev.yml"]:::config
            DockerfileNode["Dockerfile"]:::config
            HrmsSql["hrms.sql"]:::config
        end

        subgraph "API Layer"
            direction TB
            Controllers["REST Controllers\n(com.ozansyk.hrms.api.controllers)"]:::server
        end

        subgraph "Security"
            direction TB
            SecurityFilters["Spring Security Filters"]:::server
        end

        subgraph "Service Layer"
            direction TB
            ServiceInterfaces["Service Interfaces\n(com.ozansyk.hrms.business.abstracts)"]:::server
            ServiceImpl["Service Implementations\n(com.ozansyk.hrms.business.concretes)"]:::server
            Constants["Business Constants\n(Messages.java)"]:::server
        end

        subgraph "Domain Model"
            direction TB
            EntitiesAbs["Abstract Entities\n(entities/abstracts)"]:::server
            EntitiesCon["Concrete Entities\n(entities/concretes)"]:::server
            DTOs["DTOs\n(entities/dtos)"]:::server
            ResponseDTOs["Response DTOs\n(dtos/responseDtos)"]:::server
        end

        subgraph "Data Access Layer"
            direction TB
            Repositories["Spring Data JPA Repositories\n(dataAccess/abstracts)"]:::server
        end

        subgraph "Core Services & Adapters"
            direction TB
            AdaptersAbs["Adapter Interfaces\n(core/adapters/abstracts)"]:::server
            AdaptersCon["Adapter Implementations\n(core/adapters/concretes)"]:::server
            CloudinaryService["CloudinaryService\n(core/services)"]:::server
            ResultWrappers["Result/Response Wrappers\n(core/utilities/results)"]:::server
        end

        PostgreSQL["PostgreSQL"]:::db
    end

    %% External Systems
    subgraph "External Systems"
        direction TB
        Cloudinary["Cloudinary SDK"]:::external
        MailCheck["MailCheckService"]:::external
        Mernis["MernisCheckService"]:::external
    end

    %% Connections
    React -->|"HTTP/HTTPS"| Controllers
    SecurityFilters -.->|Intercepts| Controllers
    Controllers -->|"calls"| ServiceImpl
    ServiceImpl -->|"uses"| ServiceInterfaces
    ServiceImpl -->|"uses Constants"| Constants
    ServiceImpl -->|"calls"| Repositories
    Repositories -->|"SQL"| PostgreSQL
    ServiceImpl -->|"adapts"| AdaptersCon
    AdaptersCon -->|"implements"| AdaptersAbs
    ServiceImpl -->|"uploads photos"| CloudinaryService
    ServiceImpl -->|"wraps results"| ResultWrappers
    ServiceImpl -->|"calls"| MailCheck
    ServiceImpl -->|"calls"| Mernis
    ServiceImpl -->|"calls"| Cloudinary
    Application -.->|configures| ConfigYml
    Application -.->|containerized by| DockerfileNode
    Application -.->|DB init| HrmsSql
    Tests -->|tests| Application

    %% Arrows styling
    classDef frontend fill:#e0e0e0,stroke:#999;
    classDef server fill:#d0ebff,stroke:#0171b6;
    classDef external fill:#d4f4dd,stroke:#2d8f32;
    classDef db fill:#ffe0b3,stroke:#cc7a00;
    classDef config fill:#f0f0f0,stroke:#666;
    classDef container stroke:#c084fc,stroke-width:2px;

    %% Click events
    click Controllers "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/api/controllers"
    click ServiceInterfaces "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/business/abstracts"
    click ServiceImpl "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/business/concretes"
    click Constants "https://github.com/ozansyk/human-resource-management-system-project/blob/dev/src/main/java/com/ozansyk/hrms/business/constants/Messages.java"
    click Repositories "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/dataAccess/abstracts"
    click EntitiesAbs "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/entities/abstracts"
    click EntitiesCon "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/entities/concretes"
    click DTOs "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/entities/dtos"
    click ResponseDTOs "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/entities/dtos/responseDtos"
    click AdaptersAbs "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/core/adapters/abstracts"
    click AdaptersCon "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/core/adapters/concretes"
    click CloudinaryService "https://github.com/ozansyk/human-resource-management-system-project/blob/dev/src/main/java/com/ozansyk/hrms/core/services/CloudinaryService.java"
    click ResultWrappers "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/src/main/java/com/ozansyk/hrms/core/utilities/results"
    click ConfigYml "https://github.com/ozansyk/human-resource-management-system-project/blob/dev/src/main/resources/application.yml"
    click DockerfileNode "https://github.com/ozansyk/human-resource-management-system-project/tree/dev/Dockerfile"
    click HrmsSql "https://github.com/ozansyk/human-resource-management-system-project/blob/dev/hrms.sql"
    click Application "https://github.com/ozansyk/human-resource-management-system-project/blob/dev/src/main/java/com/ozansyk/hrms/HrmsApplication.java"
    click Tests "https://github.com/ozansyk/human-resource-management-system-project/blob/dev/src/test/java/com/ozansyk/hmrs/HmrsApplicationTests.java"
```
