# kevinbrgl/ensai-it-project-2a-team-27- architecture

> Architecture diagram of the GitHub repository kevinbrgl/ensai-it-project-2a-team-27-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kevinbrgl/ensai-it-project-2a-team-27-
- Repository: https://github.com/kevinbrgl/ensai-it-project-2a-team-27-

## Overview

Ex-Libris is a reading tracker with a React web app and FastAPI/PostgreSQL backend. A reader enters through the routed app, then uses catalog discovery, a personal library, playlists, reviews, social profiles, and reading-progress features. The backend exposes these capabilities through API routes, with services mediating business rules and DAOs accessing PostgreSQL; book services also integrate with Open Library. The README and sampled sources establish the runtime shape, but most feature pages, routes, and services were not inspected, so some feature links are intentionally unverified.

Main entry points: [`src/api/routes`](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/api/routes) (Feature routes), [`src/api/deps.py`](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/api/deps.py) (Request dependencies), [`src/dao`](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/dao) (Data access), [`frontend/src/App.jsx`](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/frontend/src/App.jsx) (React router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_react["React router<br/>[App.jsx]"]
  node_feature_pages["Feature pages"]
  node_web_api["API client"]
  node_web_host["App server<br/>[app.py]"]
end

subgraph group_api["API layer"]
  node_backend["API runtime<br/>[main.py]"]
  node_router["API router<br/>[main.py]"]
  node_route_features["Feature routes"]
  node_dependencies["Request dependencies<br/>[deps.py]"]
end

subgraph group_domain["Domain services"]
  node_book_logic["Catalog and recommendations"]
  node_library_logic["Library and playlists"]
  node_review_logic["Reviews and ratings<br/>[reviews_service.py]"]
  node_user_logic["Accounts and community<br/>[users_service.py]"]
  node_progress_logic["Progress and achievements"]
end

subgraph group_storage["Persistence"]
  node_data_access["Data access"]
  node_postgres[("PostgreSQL")]
end

subgraph group_integrations["External systems"]
  node_open_library["Open Library"]
end

node_reader(("Reader"))

node_reader -->|"uses"| node_react
node_react -->|"routes to"| node_feature_pages
node_react -->|"served by"| node_web_host
node_web_host -->|"forwards API"| node_backend
node_backend -->|"starts"| node_router
node_router -->|"registers routes"| node_route_features
node_route_features -.->|"resolves services"| node_dependencies
node_dependencies -->|"builds review service"| node_review_logic
node_route_features -->|"invokes"| node_review_logic
node_dependencies -->|"builds user service"| node_user_logic
node_route_features -->|"uses"| node_user_logic
node_route_features -.->|"uses"| node_book_logic
node_route_features -.->|"uses"| node_library_logic
node_route_features -.->|"uses"| node_progress_logic
node_dependencies -->|"constructs DAOs"| node_data_access
node_review_logic -->|"queries through"| node_data_access
node_user_logic -->|"queries through"| node_data_access
node_data_access -->|"reads and writes"| node_postgres
node_book_logic -.->|"looks up books"| node_open_library

click node_react "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/frontend/src/App.jsx"
click node_feature_pages "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/frontend/src/pages"
click node_web_api "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/frontend/src/api"
click node_web_host "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/frontend/app.py"
click node_backend "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/main.py"
click node_router "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/api/main.py"
click node_route_features "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/api/routes"
click node_dependencies "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/api/deps.py"
click node_book_logic "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/services"
click node_library_logic "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/services"
click node_review_logic "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/services/reviews_service.py"
click node_user_logic "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/services/users_service.py"
click node_progress_logic "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/services"
click node_data_access "https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/dao"

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_react,node_feature_pages,node_web_api,node_web_host toneBlue
class node_backend,node_router,node_route_features,node_dependencies toneAmber
class node_book_logic,node_library_logic,node_review_logic,node_user_logic,node_progress_logic toneMint
class node_data_access,node_postgres toneRose
class node_open_library,node_reader toneIndigo
```

## Components

### Web app

- [React router](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Feature pages](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/frontend/src/api): `frontend/src/api`
- [App server](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/frontend/app.py): `frontend/app.py`

### API layer

- [API runtime](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/main.py): `src/main.py`
- [API router](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/api/main.py): `src/api/main.py`
- [Feature routes](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/api/routes): `src/api/routes`
- [Request dependencies](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/api/deps.py): `src/api/deps.py`

### Domain services

- [Catalog and recommendations](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/services): `src/services`
- [Library and playlists](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/services): `src/services`
- [Reviews and ratings](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/services/reviews_service.py): `src/services/reviews_service.py`
- [Accounts and community](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/blob/main/src/services/users_service.py): `src/services/users_service.py`
- [Progress and achievements](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/services): `src/services`

### Persistence

- [Data access](https://github.com/kevinbrgl/ensai-it-project-2a-team-27-/tree/main/src/dao): `src/dao`
- **PostgreSQL**

### External systems

- **Open Library**

### Other components

- **Reader**

## Connections

- Reader → React router: uses (evidence: `README.md`)
- React router → Feature pages: routes to (evidence: `frontend/src/App.jsx`)
- React router → App server: served by (evidence: `README.md`)
- App server → API runtime: forwards API (evidence: `README.md`)
- API runtime → API router: starts (evidence: `src/main.py`)
- API router → Feature routes: registers routes (evidence: `src/api/main.py`)
- Feature routes → Request dependencies: resolves services (evidence: `src/api/routes/reviews_routes.py`)
- Request dependencies → Reviews and ratings: builds review service (evidence: `src/api/deps.py`)
- Feature routes → Reviews and ratings: invokes (evidence: `src/api/routes/reviews_routes.py`)
- Request dependencies → Accounts and community: builds user service (evidence: `src/api/deps.py`)
- Feature routes → Accounts and community: uses (evidence: `src/api/routes/users_routes.py`)
- Feature routes → Catalog and recommendations: uses (evidence: `src/api/routes/users_routes.py`)
- Feature routes → Library and playlists: uses (evidence: `src/api/routes/users_routes.py`)
- Feature routes → Progress and achievements: uses (evidence: `src/api/routes/users_routes.py`)
- Request dependencies → Data access: constructs DAOs (evidence: `src/api/deps.py`)
- Reviews and ratings → Data access: queries through (evidence: `src/services/reviews_service.py`)
- Accounts and community → Data access: queries through (evidence: `src/services/users_service.py`)
- Data access → PostgreSQL: reads and writes (evidence: `src/dao/reviews_dao.py`)
- Catalog and recommendations → Open Library: looks up books (evidence: `README.md`)
