# rakeshgombi/employee-feedback-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/rakeshgombi/employee-feedback-management-system
- Repository: https://github.com/rakeshgombi/employee-feedback-management-system

## Overview

##### Main Components

A. Frontend Layer (Angular):
- Present as a client-side block with these key modules:
- Core Components (Dashboard, Profile, Signin)
- Employee Management (Employees, Departments, Designations)
- Feedback System (Evaluation, Evaluator, Tasks)
- Common Services Layer
- Authentication/Authorization Guards
- Error Handling Components

B. Backend Layer (FastAPI):
- Present as a server-side block with these components:
- API Routers (auth, departments, employees, evaluator, ratings, tasks)
- Database Interface (db.py)
- Schema Definitions (inputSchemas.py, resSchemas.py)
- Authentication System (token.py)
- System Settings

C. Database Layer:
- Although not explicitly shown in the file tree, the db.py suggests a database component

**[Client Tier (Angular Frontend)]**
- ↕
**[Application Tier (FastAPI Backend)]**
- ↕
**[Data Tier (Database)]**

##### Detailed Component Breakdown

Frontend (Angular) Section:
**[Core Module]**
- ↓
**[Feature Modules]**
- Departments
- Designations
- Employees
- Evaluation
- Tasks
- ↓
**[Services Layer]**
- Data Services
- Authentication
- API Integration

Backend (FastAPI) Section:
**[API Routes]**
- ↓
**[Business Logic]**
- ↓
**[Data Access Layer]**

##### Key Interactions to Highlight

- Authentication Flow:
- Frontend Auth Guard → Backend Auth Router → Token Service
- Data Flow:
- Frontend Services → Backend Routes → Database
- Error Handling:
- Global Error Handling → Component-specific Error Handling

##### Additional Elements

Specific components:
- Token Interceptor Service (for API authentication)
- Role Guard (for authorization)
- Error Handling System
- Input/Response Schema Validation

##### Technical Details to Note

Specific integrations:
- FastAPI REST endpoints
- Angular Services communication
- JWT Token flow
- Database transactions

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client["Frontend Layer"]
        direction TB
        CoreMod["Core Module"]
        FeatureMod["Feature Modules"]
        ServicesLayer["Services Layer"]
        AuthGuards["Auth Guards"]
        ErrorHandling["Error Handling"]

        subgraph Core["Core Components"]
            direction TB
            Dashboard["Dashboard"]:::component
            Profile["Profile"]:::component
            Signin["Signin"]:::component
        end

        subgraph Features["Employee Management"]
            direction TB
            Employees["Employees"]:::component
            Departments["Departments"]:::component
            Designations["Designations"]:::component
        end

        subgraph Feedback["Feedback System"]
            direction TB
            Evaluation["Evaluation"]:::component
            Evaluator["Evaluator"]:::component
            Tasks["Tasks"]:::component
        end

        subgraph Guards["Security"]
            direction TB
            AuthG["Auth Guard"]:::component
            RoleG["Role Guard"]:::component
            TokenServ["Token Service"]:::component
        end

        subgraph ErrorSystem["Error Components"]
            direction TB
            ErrHandler["Error Handler"]:::component
            ErrTypes["Error Types"]:::component
        end

        subgraph FrontendServices["Frontend Services"]
            direction TB
            DataService["Data Service"]:::component
            DeptService["Department Service"]:::component
            EmpService["Employee Service"]:::component
            EvalService["Evaluation Service"]:::component
            LoginService["Login Service"]:::component
        end
    end

    subgraph Server["Backend Layer"]
        direction TB
        APIRouters["API Routers"]
        DBInterface["Database Interface"]:::component
        SchemaDefinitions["Schema Definitions"]
        AuthSystem["Authentication System"]

        subgraph Routes["API Routes"]
            direction TB
            AuthRouter["Auth Router"]:::component
            TokenHandler["Token Handler"]:::component
            SystemSettings["System Settings"]:::component
        end

        subgraph Schemas["Schemas"]
            direction TB
            InputSchema["Input Schemas"]:::component
            ResSchema["Response Schemas"]:::component
        end
    end

    subgraph Data["Database Layer"]
        Database[(Database)]
    end

    %% Relationships
    CoreMod --> Core
    FeatureMod --> Features
    FeatureMod --> Feedback
    ServicesLayer --> FrontendServices
    AuthGuards --> Guards
    ErrorHandling --> ErrorSystem

    FrontendServices --> APIRouters
    APIRouters --> DBInterface
    DBInterface --> Database
    AuthSystem --> TokenHandler
    SchemaDefinitions --> Schemas

    %% Click Events
    click Dashboard "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/dashboard/"
    click Profile "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/profile/"
    click Signin "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/signin/"
    click Employees "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/employees/"
    click Departments "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/departments/"
    click Designations "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/designations/"
    click Evaluation "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/evaluation/"
    click Evaluator "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/evaluator/"
    click Tasks "https://github.com/Rakeshgombi/Employee-feedback-management-system/tree/master/frontend/src/app/components/tasks/"
    click AuthG "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/common/auth.guard.ts"
    click RoleG "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/common/role-guard.guard.ts"
    click TokenServ "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/services/token-interceptor.service.ts"
    click ErrHandler "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/common/app-error-handler.ts"
    click ErrTypes "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/common/app-error.ts"
    click DBInterface "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/backend/db.py"
    click AuthRouter "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/backend/routers/auth.py"
    click TokenHandler "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/backend/routers/token.py"
    click SystemSettings "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/backend/routers/systemSettings.py"
    click InputSchema "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/backend/inputSchemas.py"
    click ResSchema "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/backend/resSchemas.py"
    click DataService "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/services/data.service.ts"
    click DeptService "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/services/departments.service.ts"
    click EmpService "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/services/employees.service.ts"
    click EvalService "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/services/evaluation.service.ts"
    click LoginService "https://github.com/Rakeshgombi/Employee-feedback-management-system/blob/master/frontend/src/app/components/services/login.service.ts"

    %% Styling
    classDef component fill:#f9f,stroke:#333,stroke-width:2px
    classDef default fill:#fff,stroke:#333,stroke-width:2px
```
