# thebestofakb/springboot3-postgresql-angular14-crud architecture

> Architecture diagram of the GitHub repository thebestofakb/springboot3-postgresql-angular14-crud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thebestofakb/springboot3-postgresql-angular14-crud
- Repository: https://github.com/thebestofakb/springboot3-postgresql-angular14-crud

## Overview

This is a Spring Boot and Angular user-CRUD application. Users enter through Angular routes to add, list, edit, or delete users; the UI components call a shared HTTP service, which targets the backend’s `/api/v1/users` API. The backend tree identifies controller, repository, and entity layers, and the README names PostgreSQL, but their implementation links were not sampled. Those backend links are therefore shown as unverified rather than asserted.

Main entry points: [`frontend/crud-application/src/app/app-routing.module.ts`](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app-routing.module.ts) (App routes), [`frontend/crud-application/src/app/service/crud.service.ts`](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/service/crud.service.ts) (CRUD HTTP service), [`frontend/crud-application/src/app/app.module.ts`](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app.module.ts) (App module), [`backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/controller/UserController.java`](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/controller/UserController.java) (User API controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular interface"]
  node_user["User<br/>[User.ts]"]
  node_environment["Environment config<br/>[environment.ts]"]
  node_bootstrap["App bootstrap<br/>[main.ts]"]
  node_app["Root app<br/>[app.component.ts]"]
  node_module["App module<br/>[app.module.ts]"]
  node_routes["App routes"]
  node_add["Add user"]
  node_list["Users list"]
  node_detail["Edit user"]
  node_service["CRUD HTTP service<br/>[crud.service.ts]"]
end

subgraph group_backend["Spring backend"]
  node_api["User API controller"]
  node_errors["Error handling"]
  node_notfound["Not found error"]
  node_errorresponse["Error response"]
end

subgraph group_persistence["Persistence"]
  node_repository[("User repository")]
  node_entity["User entity<br/>[User.java]"]
end

node_postgres[("PostgreSQL")]
node_browser(("User"))

node_bootstrap -->|"reads config"| node_environment
node_bootstrap -->|"bootstraps"| node_module
node_module -->|"registers"| node_app
node_module -->|"registers"| node_routes
node_routes -->|"routes to"| node_list
node_routes -->|"routes to"| node_add
node_routes -->|"routes to"| node_detail
node_add -->|"calls"| node_service
node_list -->|"calls"| node_service
node_detail -->|"calls"| node_service
node_service -->|"uses model"| node_user
node_service -->|"sends HTTP"| node_api
node_browser -.->|"navigates"| node_routes
node_api -.->|"accesses data"| node_repository
node_repository -.->|"uses entity"| node_entity
node_repository -.->|"persists to"| node_postgres
node_api -.->|"handles errors"| node_errors
node_errors -.->|"handles"| node_notfound
node_errors -.->|"builds response"| node_errorresponse

click node_user "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/service/User.ts"
click node_environment "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/environments/environment.ts"
click node_bootstrap "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/main.ts"
click node_app "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app.component.ts"
click node_module "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app.module.ts"
click node_routes "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app-routing.module.ts"
click node_add "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/components/add-user/add-user.component.ts"
click node_list "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/components/users-list/users-list.component.ts"
click node_detail "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/components/user-detail/user-detail.component.ts"
click node_service "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/service/crud.service.ts"
click node_api "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/controller/UserController.java"
click node_errors "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/GlobalExceptionHandler.java"
click node_notfound "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/ResourceNotFoundException.java"
click node_errorresponse "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/CustomErrorResponse.java"
click node_repository "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/repository/UserRepository.java"
click node_entity "https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/entity/User.java"

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_user,node_environment,node_bootstrap,node_app,node_module,node_routes,node_add,node_list,node_detail,node_service,node_browser toneBlue
class node_api,node_errors,node_notfound,node_errorresponse,node_postgres toneAmber
class node_repository,node_entity toneMint
```

## Components

### Angular interface

- [User](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/service/User.ts): `frontend/crud-application/src/app/service/User.ts`
- [Environment config](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/environments/environment.ts): `frontend/crud-application/src/environments/environment.ts`
- [App bootstrap](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/main.ts): `frontend/crud-application/src/main.ts`
- [Root app](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app.component.ts): `frontend/crud-application/src/app/app.component.ts`
- [App module](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app.module.ts): `frontend/crud-application/src/app/app.module.ts`
- [App routes](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/app-routing.module.ts): `frontend/crud-application/src/app/app-routing.module.ts`
- [Add user](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/components/add-user/add-user.component.ts): `frontend/crud-application/src/app/components/add-user/add-user.component.ts`
- [Users list](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/components/users-list/users-list.component.ts): `frontend/crud-application/src/app/components/users-list/users-list.component.ts`
- [Edit user](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/components/user-detail/user-detail.component.ts): `frontend/crud-application/src/app/components/user-detail/user-detail.component.ts`
- [CRUD HTTP service](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/frontend/crud-application/src/app/service/crud.service.ts): `frontend/crud-application/src/app/service/crud.service.ts`

### Spring backend

- [User API controller](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/controller/UserController.java): `backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/controller/UserController.java`
- [Error handling](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/GlobalExceptionHandler.java): `backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/GlobalExceptionHandler.java`
- [Not found error](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/ResourceNotFoundException.java): `backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/ResourceNotFoundException.java`
- [Error response](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/CustomErrorResponse.java): `backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/exception/CustomErrorResponse.java`

### Persistence

- [User repository](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/repository/UserRepository.java): `backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/repository/UserRepository.java`
- [User entity](https://github.com/thebestofakb/springboot3-postgresql-angular14-crud/blob/main/backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/entity/User.java): `backend/crud-application/src/main/java/com/knf/dev/demo/crudapplication/entity/User.java`

### Other components

- **PostgreSQL**
- **User**

## Connections

- App bootstrap → Environment config: reads config (evidence: `frontend/crud-application/src/main.ts`)
- App bootstrap → App module: bootstraps (evidence: `frontend/crud-application/src/main.ts`)
- App module → Root app: registers (evidence: `frontend/crud-application/src/app/app.module.ts`)
- App module → App routes: registers (evidence: `frontend/crud-application/src/app/app.module.ts`)
- App routes → Users list: routes to (evidence: `frontend/crud-application/src/app/app-routing.module.ts`)
- App routes → Add user: routes to (evidence: `frontend/crud-application/src/app/app-routing.module.ts`)
- App routes → Edit user: routes to (evidence: `frontend/crud-application/src/app/app-routing.module.ts`)
- Add user → CRUD HTTP service: calls (evidence: `frontend/crud-application/src/app/components/add-user/add-user.component.ts`)
- Users list → CRUD HTTP service: calls (evidence: `frontend/crud-application/src/app/components/users-list/users-list.component.ts`)
- Edit user → CRUD HTTP service: calls (evidence: `frontend/crud-application/src/app/components/user-detail/user-detail.component.ts`)
- CRUD HTTP service → User: uses model (evidence: `frontend/crud-application/src/app/service/crud.service.ts`)
- CRUD HTTP service → User API controller: sends HTTP (evidence: `frontend/crud-application/src/app/service/crud.service.ts`)
- User → App routes: navigates
- User API controller → User repository: accesses data
- User repository → User entity: uses entity
- User repository → PostgreSQL: persists to
- User API controller → Error handling: handles errors
- Error handling → Not found error: handles
- Error handling → Error response: builds response
