# esic775/gestion-bibliothequem architecture

> Architecture diagram of the GitHub repository esic775/gestion-bibliothequem, 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/esic775/gestion-bibliothequem
- Repository: https://github.com/esic775/gestion-bibliothequem

## Overview

BOOKIN is a library-management application with a React interface and a NestJS REST API backed by relational models. The principal workflow is a member or librarian using the frontend to access the API, then managing catalogue records, member accounts, loans, and reservations. Circulation logic coordinates stock, loan limits, reservation queues, renewals, returns, and late fines. The README documents further capabilities such as book covers and Swagger; those details are not all visible in sampled source. Arrows use README or source-index evidence; unsampled connections are omitted.

Main entry points: [`library-frontend/src/App.tsx`](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/App.tsx) (Frontend app), [`src/main.ts`](https://github.com/esic775/gestion-bibliothequem/blob/main/src/main.ts) (NestJS API), [`src`](https://github.com/esic775/gestion-bibliothequem/tree/main/src) (MySQL data), [`src/circulation/circulation.service.ts`](https://github.com/esic775/gestion-bibliothequem/blob/main/src/circulation/circulation.service.ts) (Circulation rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Library interface"]
  node_app["Frontend app<br/>[App.tsx]"]
  node_catalogue_views["Catalogue views<br/>[BooksView.tsx]"]
  node_author_view["Author view<br/>[AuthorsView.tsx]"]
  node_member_views["Member views<br/>[UsersView.tsx]"]
  node_loan_view["Loan view<br/>[LoansView.tsx]"]
  node_reservation_view["Reservation view"]
  node_auth_view["Login view<br/>[LoginView.tsx]"]
  node_http_client["API client<br/>[index.ts]"]
end

subgraph group_api["REST API"]
  node_rest_api["NestJS API<br/>[main.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
end

subgraph group_domain["Library operations"]
  node_catalogue["Books and categories<br/>[books.service.ts]"]
  node_authors["Author management<br/>[authors.service.ts]"]
  node_users["Member accounts<br/>[users.service.ts]"]
  node_profiles["Member profiles"]
  node_loans["Loans and returns<br/>[loans.service.ts]"]
  node_reservations["Reservations"]
  node_circulation["Circulation rules"]
end

subgraph group_data["Relational data"]
  node_relational_store[("MySQL data")]
end

node_member(("Member or librarian"))
node_api_service["API server"]

node_member -->|"uses"| node_app
node_app -->|"renders"| node_catalogue_views
node_app -->|"renders"| node_author_view
node_app -->|"renders"| node_member_views
node_app -->|"renders"| node_loan_view
node_app -->|"renders"| node_reservation_view
node_app -->|"renders"| node_auth_view
node_app -->|"uses"| node_http_client
node_author_view -->|"requests data"| node_http_client
node_http_client -->|"sends HTTP"| node_api_service
node_api_service -->|"serves"| node_rest_api
node_rest_api -->|"registers"| node_auth
node_rest_api -->|"registers"| node_catalogue
node_rest_api -->|"registers"| node_authors
node_rest_api -->|"registers"| node_users
node_rest_api -->|"registers"| node_profiles
node_rest_api -->|"registers"| node_loans
node_rest_api -->|"registers"| node_reservations
node_auth -->|"reads and writes"| node_relational_store
node_catalogue -->|"reads and writes"| node_relational_store
node_authors -->|"reads and writes"| node_relational_store
node_users -->|"reads and writes"| node_relational_store
node_profiles -->|"reads and writes"| node_relational_store
node_loans -->|"reads and writes"| node_relational_store
node_reservations -->|"reads and writes"| node_relational_store
node_loans -->|"delegates to"| node_circulation
node_reservations -->|"delegates to"| node_circulation
node_catalogue -->|"delegates to"| node_circulation
node_circulation -->|"updates stock"| node_relational_store

click node_app "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/App.tsx"
click node_catalogue_views "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/BooksView.tsx"
click node_author_view "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/AuthorsView.tsx"
click node_member_views "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/UsersView.tsx"
click node_loan_view "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/LoansView.tsx"
click node_reservation_view "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/ReservationsView.tsx"
click node_auth_view "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/LoginView.tsx"
click node_http_client "https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/api/index.ts"
click node_rest_api "https://github.com/esic775/gestion-bibliothequem/blob/main/src/main.ts"
click node_auth "https://github.com/esic775/gestion-bibliothequem/blob/main/src/auth/auth.service.ts"
click node_catalogue "https://github.com/esic775/gestion-bibliothequem/blob/main/src/books/books.service.ts"
click node_authors "https://github.com/esic775/gestion-bibliothequem/blob/main/src/authors/authors.service.ts"
click node_users "https://github.com/esic775/gestion-bibliothequem/blob/main/src/users/users.service.ts"
click node_profiles "https://github.com/esic775/gestion-bibliothequem/blob/main/src/profiles/profiles.service.ts"
click node_loans "https://github.com/esic775/gestion-bibliothequem/blob/main/src/loans/loans.service.ts"
click node_reservations "https://github.com/esic775/gestion-bibliothequem/blob/main/src/reservations/reservations.service.ts"
click node_circulation "https://github.com/esic775/gestion-bibliothequem/blob/main/src/circulation/circulation.service.ts"
click node_relational_store "https://github.com/esic775/gestion-bibliothequem/tree/main/src"

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_catalogue_views,node_author_view,node_member_views,node_loan_view,node_reservation_view,node_auth_view,node_http_client toneBlue
class node_rest_api,node_auth toneAmber
class node_catalogue,node_authors,node_users,node_profiles,node_loans,node_reservations,node_circulation,node_api_service toneMint
class node_relational_store toneRose
class node_member toneIndigo
```

## Components

### Library interface

- [Frontend app](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/App.tsx): `library-frontend/src/App.tsx`
- [Catalogue views](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/BooksView.tsx): `library-frontend/src/views/BooksView.tsx`
- [Author view](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/AuthorsView.tsx): `library-frontend/src/views/AuthorsView.tsx`
- [Member views](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/UsersView.tsx): `library-frontend/src/views/UsersView.tsx`
- [Loan view](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/LoansView.tsx): `library-frontend/src/views/LoansView.tsx`
- [Reservation view](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/ReservationsView.tsx): `library-frontend/src/views/ReservationsView.tsx`
- [Login view](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/views/LoginView.tsx): `library-frontend/src/views/LoginView.tsx`
- [API client](https://github.com/esic775/gestion-bibliothequem/blob/main/library-frontend/src/api/index.ts): `library-frontend/src/api/index.ts`

### REST API

- [NestJS API](https://github.com/esic775/gestion-bibliothequem/blob/main/src/main.ts): `src/main.ts`
- [Authentication](https://github.com/esic775/gestion-bibliothequem/blob/main/src/auth/auth.service.ts): `src/auth/auth.service.ts`

### Library operations

- [Books and categories](https://github.com/esic775/gestion-bibliothequem/blob/main/src/books/books.service.ts): `src/books/books.service.ts`
- [Author management](https://github.com/esic775/gestion-bibliothequem/blob/main/src/authors/authors.service.ts): `src/authors/authors.service.ts`
- [Member accounts](https://github.com/esic775/gestion-bibliothequem/blob/main/src/users/users.service.ts): `src/users/users.service.ts`
- [Member profiles](https://github.com/esic775/gestion-bibliothequem/blob/main/src/profiles/profiles.service.ts): `src/profiles/profiles.service.ts`
- [Loans and returns](https://github.com/esic775/gestion-bibliothequem/blob/main/src/loans/loans.service.ts): `src/loans/loans.service.ts`
- [Reservations](https://github.com/esic775/gestion-bibliothequem/blob/main/src/reservations/reservations.service.ts): `src/reservations/reservations.service.ts`
- [Circulation rules](https://github.com/esic775/gestion-bibliothequem/blob/main/src/circulation/circulation.service.ts): `src/circulation/circulation.service.ts`

### Relational data

- [MySQL data](https://github.com/esic775/gestion-bibliothequem/tree/main/src): `src`

### Other components

- **Member or librarian**
- **API server**

## Connections

- Member or librarian → Frontend app: uses
- Frontend app → Catalogue views: renders (evidence: `library-frontend/src/App.tsx`)
- Frontend app → Author view: renders (evidence: `library-frontend/src/App.tsx`)
- Frontend app → Member views: renders (evidence: `library-frontend/src/App.tsx`)
- Frontend app → Loan view: renders (evidence: `library-frontend/src/App.tsx`)
- Frontend app → Reservation view: renders (evidence: `library-frontend/src/App.tsx`)
- Frontend app → Login view: renders (evidence: `library-frontend/src/App.tsx`)
- Frontend app → API client: uses (evidence: `library-frontend/src/App.tsx`)
- Author view → API client: requests data (evidence: `library-frontend/src/views/AuthorsView.tsx`)
- API client → API server: sends HTTP
- API server → NestJS API: serves
- NestJS API → Authentication: registers
- NestJS API → Books and categories: registers
- NestJS API → Author management: registers
- NestJS API → Member accounts: registers
- NestJS API → Member profiles: registers
- NestJS API → Loans and returns: registers
- NestJS API → Reservations: registers
- Authentication → MySQL data: reads and writes (evidence: `src/auth/auth.service.ts`)
- Books and categories → MySQL data: reads and writes (evidence: `src/books/books.service.ts`)
- Author management → MySQL data: reads and writes (evidence: `src/authors/authors.service.ts`)
- Member accounts → MySQL data: reads and writes (evidence: `src/users/users.service.ts`)
- Member profiles → MySQL data: reads and writes (evidence: `src/profiles/profiles.service.ts`)
- Loans and returns → MySQL data: reads and writes (evidence: `src/loans/loans.service.ts`)
- Reservations → MySQL data: reads and writes (evidence: `src/reservations/reservations.service.ts`)
- Loans and returns → Circulation rules: delegates to (evidence: `src/loans/loans.service.ts`)
- Reservations → Circulation rules: delegates to (evidence: `src/reservations/reservations.service.ts`)
- Books and categories → Circulation rules: delegates to (evidence: `src/books/books.service.ts`)
- Circulation rules → MySQL data: updates stock (evidence: `src/circulation/circulation.service.ts`)
