# satyam131/employee-management-system-using-spring-boot-and-angular architecture

> Architecture diagram of the GitHub repository satyam131/employee-management-system-using-spring-boot-and-angular, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/satyam131/employee-management-system-using-spring-boot-and-angular
- Repository: https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular

## Overview

##### Project type and purpose
- This is a full-stack web application (“Employee Management System”) split into:
- A Spring Boot backend exposing RESTful APIs
- An Angular frontend SPA consuming those APIs
- Purpose: allow HR/admin users to create, read, update, delete, and view employee records via a user-friendly interface.

##### File structure
- Top-level directories:
- Backend/Employee.project – a Maven‐based Spring Boot service
- Fronted/Employee-Mangement – an Angular application
- Backend components:
- src/main/java/com/nagarro/Employee/project/controller – REST controllers
- …/model – JPA @Entity classes (Employee.java)
- …/repository – Spring Data JPA interfaces
- application.properties – DB and server config
- Frontend components:
- src/app – root module (AppModule) and routing (AppRoutingModule)
- src/app/*-employee – feature folders for create, list, details, update
- src/app/employee.service.ts – HTTP client to backend
- package.json – Angular CLI and library versions

##### README for additional insights
- Confirms CRUD features, UI pages, REST API, tech stack
- No external services beyond standard RDBMS (configured via Spring Boot)

a. Main components
1. Browser / User Agent
2. Angular Frontend
3. Spring Boot REST API Server
4. Relational Database (MySQL/H2/PostgreSQL)
5. (Optional) Authentication service or external logging/monitoring
b. Relationships & interactions
- Browser requests Angular assets via HTTP → served by a static file server or CDN
- Angular app issues HTTP GET/POST/PUT/DELETE → Spring Boot controllers
- Controllers invoke JPA repositories → Database
- DB returns results → controllers → Angular → UI
c. Architectural patterns
- Frontend: Component-based MVC (or MVVM), Angular modules, services for data access
- Backend: Layered architecture – Controller → Service (if exists) → Repository → DB
- RESTful API contract between frontend and backend
d. Key technologies
- Angular CLI, TypeScript, RxJS for async HTTP calls
- Spring Boot, Spring Web (REST), Spring Data JPA, Maven
- Database (configured in application.properties)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        Browser["Browser / User Agent"]
    end

    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        Index["index.html"]:::frontend
        MainTs["main.ts"]:::frontend
        AppModule["AppModule"]:::frontend
        AppRouting["AppRoutingModule"]:::frontend
        Service["EmployeeService"]:::frontend
        Model["Employee (TS Model)"]:::frontend
        Create["CreateEmployeeComponent"]:::frontend
        List["EmployeeListComponent"]:::frontend
        Details["EmployeeDetailsComponent"]:::frontend
        Update["UpdateEmployeeComponent"]:::frontend
        Styles["styles.css"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend Layer"
        direction TB
        MainApp["EmployeeProjectApplication"]:::backend
        Controller["EmployeeController"]:::backend
        Exception["ResourceNotFoundException"]:::exception
        Repository["EmployeeRepository"]:::backend
        Entity["Employee (JPA Entity)"]:::backend
        Config["application.properties"]:::backend
        Pom["pom.xml"]:::backend
        Maven["mvnw / mvnw.cmd"]:::backend
        Help["HELP.md"]:::backend
    end

    %% Data Layer
    subgraph "Data Layer"
        Database[(Relational Database)]:::database
    end

    %% Connections
    Browser --> Index
    Index --> MainTs
    MainTs --> AppModule
    AppModule --> AppRouting
    AppModule --> Service
    AppModule --> Create
    AppModule --> List
    AppModule --> Details
    AppModule --> Update
    Service --> Controller
    Service --> Model
    Create --> Service
    List --> Service
    Details --> Service
    Update --> Service
    Controller --> Repository
    Controller --> Entity
    Controller --> Exception
    Repository --> Database
    Entity --> Repository
    Config -.-> MainApp

    %% Click Events
    click Index "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/index.html"
    click MainTs "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/main.ts"
    click Styles "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/styles.css"
    click AppModule "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/app.module.ts"
    click AppRouting "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/app-routing.module.ts"
    click Create "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/create-employee/create-employee.component.ts"
    click List "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/employee-list/employee-list.component.ts"
    click Details "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/employee-details/employee-details.component.ts"
    click Update "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/update-employee/update-employee.component.ts"
    click Service "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/employee.service.ts"
    click Model "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Fronted/Employee-Mangement/src/app/employee.ts"
    click MainApp "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/src/main/java/com/nagarro/Employee/project/EmployeeProjectApplication.java"
    click Controller "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/src/main/java/com/nagarro/Employee/project/controller/EmployeeController.java"
    click Exception "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/src/main/java/com/nagarro/Employee/project/exception/ResourceNotFoundException.java"
    click Entity "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/src/main/java/com/nagarro/Employee/project/model/Employee.java"
    click Repository "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/src/main/java/com/nagarro/Employee/project/repository/EmployeeRepository.java"
    click Config "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/src/main/resources/application.properties"
    click Pom "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/pom.xml"
    click Maven "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/tree/main/Backend/Employee.project/mvnw"
    click Maven "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/mvnw.cmd"
    click Help "https://github.com/satyam131/employee-management-system-using-spring-boot-and-angular/blob/main/Backend/Employee.project/HELP.md"

    %% Styles
    classDef frontend fill:#D0E1F9,stroke:#333,stroke-width:1px
    classDef backend fill:#C8E6C9,stroke:#333,stroke-width:1px
    classDef database fill:#F2F2F2,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
    classDef exception fill:#FFDCC2,stroke:#333,stroke-width:1px
    class Index,MainTs,AppModule,AppRouting,Service,Model,Create,List,Details,Update,Styles frontend
    class MainApp,Controller,Repository,Entity,Config,Pom,Maven,Help backend
    class Database database
    class Exception exception
```
