# kushaldarne/angular-springboot_crud_app architecture

> Architecture diagram of the GitHub repository kushaldarne/angular-springboot_crud_app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kushaldarne/angular-springboot_crud_app
- Repository: https://github.com/kushaldarne/angular-springboot_crud_app

## Overview

#### Purpose and topology
A full-stack employee-management CRUD application. The Angular single-page UI runs separately from a Spring Boot REST API; the API persists employees through Hibernate/JPA to MySQL. The browser UI is expected at `localhost:4200`, and the API at `localhost:8080/api/v1/employees`.

#### Frontend bootstrap and routing
Angular starts from `angular-frontend/src/main.ts`, bootstraps the root module in `angular-frontend/src/app/app.module.ts`, and renders the shell in `angular-frontend/src/app/app.component.ts`. Client-side navigation is centralized in `angular-frontend/src/app/app-routing.module.ts`, which selects list, create, detail, and update workflows without server-side page rendering.

#### Employee client boundary
`angular-frontend/src/app/employee.service.ts` is the frontend’s API boundary, responsible for HTTP CRUD calls to the backend. `angular-frontend/src/app/employee.ts` defines the shared client-side employee shape. Components should depend on this service rather than directly coupling UI behavior to HTTP endpoints.

#### UI CRUD stages
The primary UI flow begins with employee browsing in `angular-frontend/src/app/employee-list/employee-list.component.ts`. From there, users enter creation through `angular-frontend/src/app/create-employee/create-employee.component.ts`, inspect one record in `angular-frontend/src/app/employee-details/employee-details.component.ts`, or edit it in `angular-frontend/src/app/update-employee/update-employee.component.ts`. These route-level components own form/display state and invoke the employee service for mutations and retrieval.

#### Backend application and REST layer
The JVM service boots through `springboot-backend/src/main/java/net/javaguides/springboot/SpringbootBackendApplication.java`. `springboot-backend/src/main/java/net/javaguides/springboot/controller/EmployeeController.java` exposes the employee REST resource under the documented `/api/v1/employees` API namespace. This is the central cross-runtime boundary consumed by Angular.

#### Persistence model and error path
`springboot-backend/src/main/java/net/javaguides/springboot/model/Employee.java` is the JPA/Hibernate entity representing persisted employee data. `springboot-backend/src/main/java/net/javaguides/springboot/repository/EmployeeRepository.java` provides database access used by the controller. Missing-record behavior is represented by `springboot-backend/src/main/java/net/javaguides/springboot/exception/ResourceNotFoundException.java`, separating not-found handling from normal CRUD flow.

#### Runtime and infrastructure
Frontend runtime/build dependencies are managed in `angular-frontend/package.json` and require Node.js plus Angular CLI for development. Backend is a Maven Spring Boot application configured by `springboot-backend/pom.xml`; it uses embedded Tomcat, Hibernate, and MySQL. Database connectivity and credentials are deployment-bound settings in `springboot-backend/src/main/resources/application.properties`, targeting a MySQL `crudappdb` database.

Main entry points: [`angular-frontend/src/app/employee.service.ts`](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee.service.ts) (Employee API client), [`angular-frontend/src/app/app-routing.module.ts`](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app-routing.module.ts) (Employee routes), [`springboot-backend/src/main/java/net/javaguides/springboot/controller/EmployeeController.java`](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/controller/EmployeeController.java) (Employee REST resource), [`angular-frontend/src/app/app.module.ts`](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app.module.ts) (Root module)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular frontend"]
  node_ng_main{{"Angular bootstrap<br/>entrypoint<br/>[main.ts]"}}
  node_ng_module["Root module<br/>Angular module<br/>[app.module.ts]"]
  node_ng_shell["App shell<br/>Angular component<br/>[app.component.ts]"]
  node_ng_routes["Employee routes<br/>Angular routing"]
  node_employee_list["Employee list<br/>route component"]
  node_employee_create["Create employee<br/>route component"]
  node_employee_details["Employee details<br/>route component"]
  node_employee_update["Update employee<br/>route component"]
  node_employee_client["Employee API client<br/>Angular service"]
  node_employee_client_model["Employee shape<br/>TypeScript model<br/>[employee.ts]"]
end

subgraph group_backend["Spring Boot API"]
  node_spring_app{{"Spring Boot bootstrap<br/>JVM entrypoint"}}
  node_employee_controller["Employee REST resource<br/>Spring controller"]
  node_not_found["Not-found error<br/>exception"]
  node_backend_build["Maven backend build<br/>Maven project<br/>[pom.xml]"]
end

subgraph group_persistence["Persistence"]
  node_employee_repository["Employee repository<br/>JPA repository"]
  node_employee_entity["Employee entity<br/>JPA entity<br/>[Employee.java]"]
  node_mysql[("crudappdb<br/>MySQL database")]
  node_db_config["Database settings<br/>Spring configuration"]
end

node_ng_main -->|"bootstraps"| node_ng_module
node_ng_module -->|"renders"| node_ng_shell
node_ng_module -->|"configures"| node_ng_routes
node_ng_routes -->|"routes to"| node_employee_list
node_ng_routes -->|"routes to"| node_employee_create
node_ng_routes -->|"routes to"| node_employee_details
node_ng_routes -->|"routes to"| node_employee_update
node_employee_list -->|"CRUD calls"| node_employee_client
node_employee_create -->|"creates"| node_employee_client
node_employee_details -->|"retrieves"| node_employee_client
node_employee_update -->|"updates"| node_employee_client
node_employee_client -->|"uses"| node_employee_client_model
node_employee_client -->|"HTTP /api/v1/employees"| node_employee_controller
node_spring_app -->|"serves"| node_employee_controller
node_backend_build -.->|"builds runtime"| node_spring_app
node_employee_controller -->|"persists through"| node_employee_repository
node_employee_controller -.->|"throws when absent"| node_not_found
node_employee_repository -->|"manages"| node_employee_entity
node_employee_repository -->|"reads and writes"| node_mysql
node_db_config -.->|"connects to"| node_mysql

click node_ng_main "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/main.ts"
click node_ng_module "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app.module.ts"
click node_ng_shell "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app.component.ts"
click node_ng_routes "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app-routing.module.ts"
click node_employee_list "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee-list/employee-list.component.ts"
click node_employee_create "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/create-employee/create-employee.component.ts"
click node_employee_details "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee-details/employee-details.component.ts"
click node_employee_update "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/update-employee/update-employee.component.ts"
click node_employee_client "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee.service.ts"
click node_employee_client_model "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee.ts"
click node_spring_app "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/SpringbootBackendApplication.java"
click node_employee_controller "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/controller/EmployeeController.java"
click node_not_found "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/exception/ResourceNotFoundException.java"
click node_employee_repository "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/repository/EmployeeRepository.java"
click node_employee_entity "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/model/Employee.java"
click node_db_config "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/resources/application.properties"
click node_backend_build "https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/pom.xml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ng_main,node_ng_module,node_ng_shell,node_ng_routes,node_employee_list,node_employee_create,node_employee_details,node_employee_update,node_employee_client,node_employee_client_model toneBlue
class node_spring_app,node_employee_controller,node_not_found,node_backend_build toneAmber
class node_employee_repository,node_employee_entity,node_mysql,node_db_config toneMint
```

## Components

### Angular frontend

Browser SPA served on localhost:4200.

- [Angular bootstrap](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/main.ts): entrypoint · `angular-frontend/src/main.ts`
- [Root module](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app.module.ts): Angular module · `angular-frontend/src/app/app.module.ts`
- [App shell](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app.component.ts): Angular component · `angular-frontend/src/app/app.component.ts`
- [Employee routes](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/app-routing.module.ts): Angular routing · Selects client-side CRUD workflows. · `angular-frontend/src/app/app-routing.module.ts`
- [Employee list](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee-list/employee-list.component.ts): route component · `angular-frontend/src/app/employee-list/employee-list.component.ts`
- [Create employee](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/create-employee/create-employee.component.ts): route component · `angular-frontend/src/app/create-employee/create-employee.component.ts`
- [Employee details](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee-details/employee-details.component.ts): route component · `angular-frontend/src/app/employee-details/employee-details.component.ts`
- [Update employee](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/update-employee/update-employee.component.ts): route component · `angular-frontend/src/app/update-employee/update-employee.component.ts`
- [Employee API client](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee.service.ts): Angular service · HTTP CRUD boundary for route components. · `angular-frontend/src/app/employee.service.ts`
- [Employee shape](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/angular-frontend/src/app/employee.ts): TypeScript model · `angular-frontend/src/app/employee.ts`

### Spring Boot API

REST service served on localhost:8080.

- [Spring Boot bootstrap](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/SpringbootBackendApplication.java): JVM entrypoint · `springboot-backend/src/main/java/net/javaguides/springboot/SpringbootBackendApplication.java`
- [Employee REST resource](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/controller/EmployeeController.java): Spring controller · Exposes /api/v1/employees CRUD endpoints. · `springboot-backend/src/main/java/net/javaguides/springboot/controller/EmployeeController.java`
- [Not-found error](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/exception/ResourceNotFoundException.java): exception · Separates missing-record handling from normal CRUD flow. · `springboot-backend/src/main/java/net/javaguides/springboot/exception/ResourceNotFoundException.java`
- [Maven backend build](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/pom.xml): Maven project · Provides Spring Boot, embedded Tomcat, Hibernate, and MySQL dependencies. · `springboot-backend/pom.xml`

### Persistence

JPA/Hibernate storage backed by MySQL.

- [Employee repository](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/repository/EmployeeRepository.java): JPA repository · `springboot-backend/src/main/java/net/javaguides/springboot/repository/EmployeeRepository.java`
- [Employee entity](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/java/net/javaguides/springboot/model/Employee.java): JPA entity · `springboot-backend/src/main/java/net/javaguides/springboot/model/Employee.java`
- **crudappdb**: MySQL database
- [Database settings](https://github.com/kushaldarne/angular-springboot_crud_app/blob/main/springboot-backend/src/main/resources/application.properties): Spring configuration · Deployment-bound MySQL connectivity and credentials. · `springboot-backend/src/main/resources/application.properties`

## Connections

- Angular bootstrap → Root module: bootstraps
- Root module → App shell: renders
- Root module → Employee routes: configures
- Employee routes → Employee list: routes to
- Employee routes → Create employee: routes to
- Employee routes → Employee details: routes to
- Employee routes → Update employee: routes to
- Employee list → Employee API client: CRUD calls
- Create employee → Employee API client: creates
- Employee details → Employee API client: retrieves
- Update employee → Employee API client: updates
- Employee API client → Employee shape: uses
- Employee API client → Employee REST resource: HTTP /api/v1/employees
- Spring Boot bootstrap → Employee REST resource: serves
- Maven backend build → Spring Boot bootstrap: builds runtime
- Employee REST resource → Employee repository: persists through
- Employee REST resource → Not-found error: throws when absent
- Employee repository → Employee entity: manages
- Employee repository → crudappdb: reads and writes
- Database settings → crudappdb: connects to
