# maikiuwu/frontbibliotk architecture

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

- Interactive diagram: https://gitdiagram.com/maikiuwu/frontbibliotk
- Repository: https://github.com/maikiuwu/frontbibliotk

## Overview

This is a React frontend for BiblioTK, a library-account application. The main user flow is registration or login, session verification and role-based routing, then access to a personal profile or the admin user overview. Profile editing and account deletion are separate profile-service operations; the home screen also displays user-role statistics. The README describes only a minimal React/Vite template, so additional library capabilities are not documented. Several page implementations were not sampled; their route relationships are supported by App.jsx, but their internal behavior is not inferred.

Main entry points: [`src/app/pages/App.jsx`](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/App.jsx) (App router), [`src/app/pages/Profile.jsx`](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Profile.jsx) (Profile editor), [`src/service/ProfileService.js`](https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/ProfileService.js) (Profile service), [`src/app/pages/Register.jsx`](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Register.jsx) (Registration form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["App router<br/>[App.jsx]"]
  node_entry["React entry<br/>[main.jsx]"]
end

subgraph group_identity["Account access"]
  node_login["Login form<br/>[Login.jsx]"]
  node_login_dto["Login DTO<br/>[loginUser.dto.js]"]
  node_register["Registration form<br/>[Register.jsx]"]
  node_register_dto["Registration DTO"]
  node_validation["User validation<br/>[userValidation.js]"]
end

subgraph group_account["Account and overview"]
  node_home["Home overview<br/>[Home.jsx]"]
  node_profile["Profile editor<br/>[Profile.jsx]"]
  node_profile_dto["Profile DTO"]
  node_user_dashboard["User dashboard<br/>[UserDashboard.jsx]"]
  node_dashboard["Dashboard page<br/>[Dashboard.jsx]"]
  node_construction["Construction page<br/>[Construccion.jsx]"]
end

subgraph group_services["Backend services"]
  node_auth_service["Login service<br/>[LoginService.js]"]
  node_registration_service["Registration service<br/>[RegisterService.js]"]
  node_profile_service["Profile service<br/>[ProfileService.js]"]
  node_user_stats["User statistics service<br/>[UserService.js]"]
end

node_visitor(("Visitor"))
node_auth_backend{{"Auth backend"}}
node_registration_backend{{"Registration backend"}}
node_profile_backend{{"Profile backend"}}
node_stats_backend{{"Statistics backend"}}

node_visitor -->|"opens app"| node_app
node_entry -->|"renders"| node_app
node_app -->|"checks session"| node_auth_service
node_app -->|"logs out"| node_auth_service
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_user_dashboard
node_app -->|"routes to"| node_construction
node_login -->|"creates"| node_login_dto
node_login -->|"submits login"| node_auth_service
node_auth_service -->|"sends requests"| node_auth_backend
node_register -->|"validates data"| node_validation
node_register -->|"creates"| node_register_dto
node_register -->|"submits registration"| node_registration_service
node_registration_service -->|"posts registration"| node_registration_backend
node_home -->|"loads statistics"| node_user_stats
node_user_stats -->|"fetches statistics"| node_stats_backend
node_home -->|"loads profile"| node_profile_service
node_home -->|"deletes account"| node_profile_service
node_profile -->|"loads profile"| node_profile_service
node_profile -->|"updates profile"| node_profile_service
node_profile -->|"creates"| node_profile_dto
node_profile -->|"validates data"| node_validation
node_profile_service -->|"sends requests"| node_profile_backend

click node_app "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/App.jsx"
click node_entry "https://github.com/maikiuwu/frontbibliotk/blob/main/src/main.jsx"
click node_login "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Login.jsx"
click node_login_dto "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/dto/loginUser.dto.js"
click node_register "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Register.jsx"
click node_register_dto "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/dto/registerUser.dto.js"
click node_validation "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/utils/userValidation.js"
click node_auth_service "https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/LoginService.js"
click node_registration_service "https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/RegisterService.js"
click node_home "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Home.jsx"
click node_profile "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Profile.jsx"
click node_profile_dto "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/dto/updateProfile.dto.js"
click node_profile_service "https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/ProfileService.js"
click node_user_stats "https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/UserService.js"
click node_user_dashboard "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/UserDashboard.jsx"
click node_dashboard "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Dashboard.jsx"
click node_construction "https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Construccion.jsx"

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_app,node_entry toneBlue
class node_login,node_login_dto,node_register,node_register_dto,node_validation toneAmber
class node_home,node_profile,node_profile_dto,node_user_dashboard,node_dashboard,node_construction toneMint
class node_auth_service,node_registration_service,node_profile_service,node_user_stats toneRose
class node_visitor,node_auth_backend,node_registration_backend,node_profile_backend,node_stats_backend toneIndigo
```

## Components

### App shell

- [App router](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/App.jsx): `src/app/pages/App.jsx`
- [React entry](https://github.com/maikiuwu/frontbibliotk/blob/main/src/main.jsx): `src/main.jsx`

### Account access

- [Login form](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Login.jsx): `src/app/pages/Login.jsx`
- [Login DTO](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/dto/loginUser.dto.js): `src/app/dto/loginUser.dto.js`
- [Registration form](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Register.jsx): `src/app/pages/Register.jsx`
- [Registration DTO](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/dto/registerUser.dto.js): `src/app/dto/registerUser.dto.js`
- [User validation](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/utils/userValidation.js): `src/app/utils/userValidation.js`

### Account and overview

- [Home overview](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Home.jsx): `src/app/pages/Home.jsx`
- [Profile editor](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Profile.jsx): `src/app/pages/Profile.jsx`
- [Profile DTO](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/dto/updateProfile.dto.js): `src/app/dto/updateProfile.dto.js`
- [User dashboard](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/UserDashboard.jsx): `src/app/pages/UserDashboard.jsx`
- [Dashboard page](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Dashboard.jsx): `src/app/pages/Dashboard.jsx`
- [Construction page](https://github.com/maikiuwu/frontbibliotk/blob/main/src/app/pages/Construccion.jsx): `src/app/pages/Construccion.jsx`

### Backend services

- [Login service](https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/LoginService.js): `src/service/LoginService.js`
- [Registration service](https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/RegisterService.js): `src/service/RegisterService.js`
- [Profile service](https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/ProfileService.js): `src/service/ProfileService.js`
- [User statistics service](https://github.com/maikiuwu/frontbibliotk/blob/main/src/service/UserService.js): `src/service/UserService.js`

### Other components

- **Visitor**
- **Auth backend**
- **Registration backend**
- **Profile backend**
- **Statistics backend**

## Connections

- Visitor → App router: opens app
- React entry → App router: renders (evidence: `src/main.jsx`)
- App router → Login service: checks session (evidence: `src/app/pages/App.jsx`)
- App router → Login service: logs out (evidence: `src/app/pages/App.jsx`)
- App router → Login form: routes to (evidence: `src/app/pages/App.jsx`)
- App router → Registration form: routes to (evidence: `src/app/pages/App.jsx`)
- App router → Home overview: routes to (evidence: `src/app/pages/App.jsx`)
- App router → Profile editor: routes to (evidence: `src/app/pages/App.jsx`)
- App router → User dashboard: routes to (evidence: `src/app/pages/App.jsx`)
- App router → Construction page: routes to (evidence: `src/app/pages/App.jsx`)
- Login form → Login DTO: creates (evidence: `src/app/pages/Login.jsx`)
- Login form → Login service: submits login (evidence: `src/app/pages/Login.jsx`)
- Login service → Auth backend: sends requests (evidence: `src/service/LoginService.js`)
- Registration form → User validation: validates data (evidence: `src/app/pages/Register.jsx`)
- Registration form → Registration DTO: creates (evidence: `src/app/pages/Register.jsx`)
- Registration form → Registration service: submits registration (evidence: `src/app/pages/Register.jsx`)
- Registration service → Registration backend: posts registration (evidence: `src/service/RegisterService.js`)
- Home overview → User statistics service: loads statistics (evidence: `src/app/pages/Home.jsx`)
- User statistics service → Statistics backend: fetches statistics (evidence: `src/service/UserService.js`)
- Home overview → Profile service: loads profile (evidence: `src/app/pages/Home.jsx`)
- Home overview → Profile service: deletes account (evidence: `src/app/pages/Home.jsx`)
- Profile editor → Profile service: loads profile (evidence: `src/app/pages/Profile.jsx`)
- Profile editor → Profile service: updates profile (evidence: `src/app/pages/Profile.jsx`)
- Profile editor → Profile DTO: creates (evidence: `src/app/pages/Profile.jsx`)
- Profile editor → User validation: validates data (evidence: `src/app/pages/Profile.jsx`)
- Profile service → Profile backend: sends requests (evidence: `src/service/ProfileService.js`)
