# symihad/hr-management-system---advance-dot-net architecture

> Architecture diagram of the GitHub repository symihad/hr-management-system---advance-dot-net, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/symihad/hr-management-system---advance-dot-net
- Repository: https://github.com/symihad/hr-management-system---advance-dot-net

## Overview

##### Main Architectural Components

The system follows a three-tier architecture with clear separation of concerns:
- Presentation Layer (HR_Management_System)
- Business Logic Layer (BLL)
- Data Access Layer (DAL)

##### Key Components

a) Client Layer:
- Web API Controllers (AuthController, JobController, NoticeController, SecureDocumentController)
- Authentication/Authorization Components (EmployeeAccess, ManagerAccess, SuperAdminAccess)

b) Business Layer:
- Service Components (AuthService, JobService, NoticeService, SecureDocumentService)
- DTOs (Data Transfer Objects) for various entities
- Business Logic Implementation

c) Data Access Layer:
- Entity Models (User, Organization, JobCategories, etc.)
- Repositories (UserRepo, OrganizationRepo, etc.)
- Database Context (HRContext)

**┌─────────────────────────────────────┐**
- Client Layer              │
- (Web API & Authentication)         │
- ┘
- ↕
**┌─────────────────────────────────────┐**
- Business Layer              │
- (Services & Business Logic)        │
- ┘
- ↕
**┌─────────────────────────────────────┐**
- Data Access Layer           │
- (Repositories & Entity Framework)  │
- ┘
- ↕
**┌─────────────────────────────────────┐**
- Database                    │
- ┘

##### Detailed Component Breakdown

For each layer, include:

a) Client Layer:
- API Controllers with their respective endpoints
- Authentication middleware
- Request/Response flow

b) Business Layer:
- Service interfaces and implementations
- DTO mappings
- Business logic components
- Cross-cutting concerns (security, logging)

c) Data Layer:
- Entity models with relationships
- Repository pattern implementation
- Database context and configurations

##### Additional Elements

Specific components:
- Security components (EncryptionTable, Authorization)
- Job management flow
- Notice system
- User management system
- Organization management

##### Interactions

Following flows:
- Authentication flow
- Job application process
- Document security handling
- Notice distribution
- User-Organization relationships

Remember to:
- Use clear, consistent naming conventions
- Both synchronous and asynchronous operations
- Error handling and validation flows
- Document all external system integrations

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client_Layer
        direction TB
        API[API Controllers]:::client
        Auth[Authentication]:::client
        
        subgraph Controllers
            direction TB
            AuthC["AuthController"]:::controller
            JobC["JobController"]:::controller
            NoticeC["NoticeController"]:::controller
            SecureC["SecureDocumentController"]:::controller
        end
        
        subgraph AuthComponents
            direction TB
            EmpAcc["EmployeeAccess"]:::auth
            MgrAcc["ManagerAccess"]:::auth
            AdminAcc["SuperAdminAccess"]:::auth
            Logged["Logged"]:::auth
        end
    end

    subgraph Business_Layer
        direction TB
        Services[Services]:::business
        DTOs[DTOs]:::business
        
        subgraph ServiceComponents
            direction TB
            AuthS["AuthService"]:::service
            JobS["JobService"]:::service
            NoticeS["NoticeService"]:::service
            SecureS["SecureDocumentService"]:::service
        end
        
        subgraph DataTransferObjects
            direction TB
            AuthDTO["AuthorizationDTO"]:::dto
            JobDTO["JobApplicationDTO"]:::dto
            NoticeDTO["NoticeDTO"]:::dto
            UserDTO["UserDTO"]:::dto
            OrgDTO["OrganizationDTO"]:::dto
        end
    end

    subgraph Data_Layer
        direction TB
        Models[Models]:::data
        Repos[Repositories]:::data
        Context["HR Context"]:::data
        
        subgraph Entities
            direction TB
            User["User"]:::entity
            Org["Organization"]:::entity
            Job["JobCategories"]:::entity
            Notice["Notice"]:::entity
            Auth["Authorization"]:::entity
        end
        
        subgraph Repositories
            direction TB
            UserR["UserRepo"]:::repo
            OrgR["OrganizationRepo"]:::repo
            JobR["JobCategoryRepo"]:::repo
            NoticeR["NoticeRepo"]:::repo
            AuthR["AuthorizationRepo"]:::repo
        end
        
        subgraph Interfaces
            direction TB
            IAuth["IAuth"]:::interface
            IRepo["IRepo"]:::interface
            IFilter["IFilter"]:::interface
            INotice["INoticeFilter"]:::interface
            IUserOrg["IUserOrganization"]:::interface
        end
    end

    Database[(Database)]:::database

    %% Relationships
    Controllers --> AuthComponents
    Controllers --> ServiceComponents
    ServiceComponents --> DataTransferObjects
    ServiceComponents --> Repositories
    Repositories --> Entities
    Repositories --> Interfaces
    Context --> Database

    %% Click Events
    click API "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/tree/main/HR_Management_System/HR_Management_System/Controllers/"
    click AuthC "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Controllers/AuthController.cs"
    click JobC "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Controllers/JobController.cs"
    click NoticeC "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Controllers/NoticeController.cs"
    click SecureC "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Controllers/SecureDocumentController.cs"
    
    click EmpAcc "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Auth/EmployeeAccess.cs"
    click MgrAcc "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Auth/ManagerAccess.cs"
    click AdminAcc "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Auth/SuperAdminAccess.cs"
    click Logged "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/HR_Management_System/Auth/Logged.cs"
    
    click AuthS "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/Services/AuthService.cs"
    click JobS "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/Services/JobService.cs"
    click NoticeS "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/Services/NoticeService.cs"
    click SecureS "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/Services/SecureDocumentService.cs"
    
    click AuthDTO "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/DTOs/AuthorizationDTO.cs"
    click JobDTO "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/DTOs/JobApplicationDTO.cs"
    click NoticeDTO "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/DTOs/NoticeDTO.cs"
    click UserDTO "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/DTOs/UserDTO.cs"
    click OrgDTO "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/BLL/DTOs/OrganizationDTO.cs"
    
    click User "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Models/User.cs"
    click Org "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Models/Organization.cs"
    click Job "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Models/JobCategories.cs"
    click Notice "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Models/Notice.cs"
    click Auth "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Models/Authorization.cs"
    
    click UserR "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Repos/UserRepo.cs"
    click OrgR "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Repos/OrganizationRepo.cs"
    click JobR "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Repos/JobCategoryRepo.cs"
    click NoticeR "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Repos/NoticeRepo.cs"
    click AuthR "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Repos/AuthorizationRepo.cs"
    
    click Context "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/HRContext.cs"
    
    click IAuth "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Interfaces/IAuth.cs"
    click IRepo "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Interfaces/IRepo.cs"
    click IFilter "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Interfaces/IFilter.cs"
    click INotice "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Interfaces/INoticeFilter.cs"
    click IUserOrg "https://github.com/SyMihad/HR-Management-System---Advance-Dot-Net/blob/main/HR_Management_System/DAL/Interfaces/IUserOrganization.cs"

    %% Styling
    classDef client fill:#2374ab
    classDef controller fill:#2374ab,stroke:#333
    classDef auth fill:#2374ab,stroke:#333
    classDef business fill:#57a773
    classDef service fill:#57a773,stroke:#333
    classDef dto fill:#57a773,stroke:#333
    classDef data fill:#ff8c42
    classDef entity fill:#ff8c42,stroke:#333
    classDef repo fill:#ff8c42,stroke:#333
    classDef interface fill:#ff8c42,stroke:#333
    classDef database fill:#666666
```
