# kellypitella/booklogimpacta architecture

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

- Interactive diagram: https://gitdiagram.com/kellypitella/booklogimpacta
- Repository: https://github.com/kellypitella/booklogimpacta

## Overview

BookLog is a Flutter reading-tracker backed by an ASP.NET Core API and MySQL. Its main workflow is account registration/login, then maintaining a personal book shelf and recording reading sessions; the app also presents reading summaries and statistics. The graph combines sampled backend call paths with capabilities documented in the README. Flutter implementation details were not sampled, so frontend links reflect documented API use rather than inspected call sites.

Main entry points: [`BackEnd/Data/BookLogContext.cs`](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Data/BookLogContext.cs) (EF data context), [`BackEnd/Program.cs`](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Program.cs) (API runtime), [`frontend/lib/main.dart`](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/main.dart) (App entry), [`frontend/lib/screens/auth/login_screen.dart`](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/auth/login_screen.dart) (Login screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter app"]
  node_app["App entry<br/>[main.dart]"]
  node_login["Login screen<br/>[login_screen.dart]"]
  node_register["Registration screen"]
  node_shelf["Book shelf<br/>[home_screen.dart]"]
  node_addbook["Add book"]
  node_details["Book details"]
  node_stats["Reading statistics"]
  node_theme["Theme settings"]
  node_authclient["Auth client<br/>[auth_service.dart]"]
  node_bookclient["Book client<br/>[livro_service.dart]"]
  node_progressclient["Progress client"]
end

subgraph group_api["REST API"]
  node_runtime["API runtime<br/>[Program.cs]"]
  node_authapi["Auth endpoints<br/>[AuthController.cs]"]
  node_booksapi["Book endpoints"]
  node_progressapi["Progress endpoints"]
end

subgraph group_domain["Reading domain"]
  node_authlogic["Authentication<br/>[AuthService.cs]"]
  node_booklogic["Shelf management<br/>[LivroService.cs]"]
  node_progresslogic["Progress analytics"]
  node_entities["Reading records<br/>[Livro.cs]"]
end

subgraph group_persistence["Persistence"]
  node_context["EF data context<br/>[BookLogContext.cs]"]
  node_mysql[("MySQL database")]
end

node_reader(("Reader"))

node_reader -->|"uses"| node_app
node_app -.->|"opens"| node_login
node_app -.->|"shows"| node_shelf
node_reader -->|"creates account"| node_register
node_reader -->|"authenticates"| node_login
node_login -->|"requests login"| node_authclient
node_register -->|"requests registration"| node_authclient
node_authclient -->|"HTTP auth"| node_authapi
node_reader -->|"views books"| node_shelf
node_shelf -.->|"loads shelf"| node_bookclient
node_reader -->|"adds book"| node_addbook
node_addbook -.->|"submits book"| node_bookclient
node_bookclient -->|"HTTP books"| node_booksapi
node_reader -->|"views details"| node_details
node_details -.->|"records session"| node_progressclient
node_progressclient -->|"HTTP progress"| node_progressapi
node_reader -->|"views statistics"| node_stats
node_stats -.->|"loads statistics"| node_progressclient
node_reader -->|"sets theme"| node_theme
node_runtime -->|"maps controllers"| node_authapi
node_runtime -->|"maps controllers"| node_booksapi
node_runtime -->|"maps controllers"| node_progressapi
node_authapi -->|"delegates auth"| node_authlogic
node_booksapi -->|"delegates books"| node_booklogic
node_progressapi -->|"delegates progress"| node_progresslogic
node_runtime -->|"configures context"| node_context
node_authlogic -->|"reads and writes"| node_context
node_booklogic -->|"reads and writes"| node_context
node_progresslogic -->|"reads and writes"| node_context
node_context -->|"persists records"| node_mysql
node_context -->|"maps entities"| node_entities

click node_app "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/main.dart"
click node_login "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/auth/login_screen.dart"
click node_register "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/auth/register_screen.dart"
click node_shelf "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/home/home_screen.dart"
click node_addbook "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/books/add_book_screen.dart"
click node_details "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/books/book_details_screen.dart"
click node_stats "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/home/statistics_screen.dart"
click node_theme "https://github.com/kellypitella/booklogimpacta/tree/main/frontend/lib/core/theme"
click node_authclient "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/services/auth_service.dart"
click node_bookclient "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/services/livro_service.dart"
click node_progressclient "https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/services/progress_service.dart"
click node_runtime "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Program.cs"
click node_authapi "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Controllers/AuthController.cs"
click node_booksapi "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Controllers/LivrosController.cs"
click node_progressapi "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Controllers/ProgressoController.cs"
click node_authlogic "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Services/AuthService.cs"
click node_booklogic "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Services/LivroService.cs"
click node_progresslogic "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Services/ProgressoService.cs"
click node_entities "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Models/Livro.cs"
click node_context "https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Data/BookLogContext.cs"

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_login,node_register,node_shelf,node_addbook,node_details,node_stats,node_theme,node_authclient,node_bookclient,node_progressclient toneBlue
class node_runtime,node_authapi,node_booksapi,node_progressapi toneAmber
class node_authlogic,node_booklogic,node_progresslogic,node_entities toneMint
class node_context,node_mysql toneRose
class node_reader toneIndigo
```

## Components

### Flutter app

- [App entry](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/main.dart): `frontend/lib/main.dart`
- [Login screen](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/auth/login_screen.dart): `frontend/lib/screens/auth/login_screen.dart`
- [Registration screen](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/auth/register_screen.dart): `frontend/lib/screens/auth/register_screen.dart`
- [Book shelf](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/home/home_screen.dart): `frontend/lib/screens/home/home_screen.dart`
- [Add book](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/books/add_book_screen.dart): `frontend/lib/screens/books/add_book_screen.dart`
- [Book details](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/books/book_details_screen.dart): `frontend/lib/screens/books/book_details_screen.dart`
- [Reading statistics](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/screens/home/statistics_screen.dart): `frontend/lib/screens/home/statistics_screen.dart`
- [Theme settings](https://github.com/kellypitella/booklogimpacta/tree/main/frontend/lib/core/theme): `frontend/lib/core/theme`
- [Auth client](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/services/auth_service.dart): `frontend/lib/services/auth_service.dart`
- [Book client](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/services/livro_service.dart): `frontend/lib/services/livro_service.dart`
- [Progress client](https://github.com/kellypitella/booklogimpacta/blob/main/frontend/lib/services/progress_service.dart): `frontend/lib/services/progress_service.dart`

### REST API

- [API runtime](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Program.cs): `BackEnd/Program.cs`
- [Auth endpoints](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Controllers/AuthController.cs): `BackEnd/Controllers/AuthController.cs`
- [Book endpoints](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Controllers/LivrosController.cs): `BackEnd/Controllers/LivrosController.cs`
- [Progress endpoints](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Controllers/ProgressoController.cs): `BackEnd/Controllers/ProgressoController.cs`

### Reading domain

- [Authentication](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Services/AuthService.cs): `BackEnd/Services/AuthService.cs`
- [Shelf management](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Services/LivroService.cs): `BackEnd/Services/LivroService.cs`
- [Progress analytics](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Services/ProgressoService.cs): `BackEnd/Services/ProgressoService.cs`
- [Reading records](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Models/Livro.cs): `BackEnd/Models/Livro.cs`

### Persistence

- [EF data context](https://github.com/kellypitella/booklogimpacta/blob/main/BackEnd/Data/BookLogContext.cs): `BackEnd/Data/BookLogContext.cs`
- **MySQL database**

### Other components

- **Reader**

## Connections

- Reader → App entry: uses (evidence: `README.md`)
- App entry → Login screen: opens
- App entry → Book shelf: shows
- Reader → Registration screen: creates account (evidence: `README.md`)
- Reader → Login screen: authenticates (evidence: `README.md`)
- Login screen → Auth client: requests login (evidence: `README.md`)
- Registration screen → Auth client: requests registration (evidence: `README.md`)
- Auth client → Auth endpoints: HTTP auth (evidence: `README.md`)
- Reader → Book shelf: views books (evidence: `README.md`)
- Book shelf → Book client: loads shelf
- Reader → Add book: adds book (evidence: `README.md`)
- Add book → Book client: submits book
- Book client → Book endpoints: HTTP books (evidence: `README.md`)
- Reader → Book details: views details (evidence: `README.md`)
- Book details → Progress client: records session
- Progress client → Progress endpoints: HTTP progress (evidence: `README.md`)
- Reader → Reading statistics: views statistics (evidence: `README.md`)
- Reading statistics → Progress client: loads statistics
- Reader → Theme settings: sets theme (evidence: `README.md`)
- API runtime → Auth endpoints: maps controllers (evidence: `BackEnd/Program.cs`)
- API runtime → Book endpoints: maps controllers (evidence: `BackEnd/Program.cs`)
- API runtime → Progress endpoints: maps controllers (evidence: `BackEnd/Program.cs`)
- Auth endpoints → Authentication: delegates auth (evidence: `BackEnd/Controllers/AuthController.cs`)
- Book endpoints → Shelf management: delegates books (evidence: `BackEnd/Controllers/LivrosController.cs`)
- Progress endpoints → Progress analytics: delegates progress (evidence: `BackEnd/Controllers/ProgressoController.cs`)
- API runtime → EF data context: configures context (evidence: `BackEnd/Program.cs`)
- Authentication → EF data context: reads and writes (evidence: `BackEnd/Services/AuthService.cs`)
- Shelf management → EF data context: reads and writes (evidence: `BackEnd/Services/LivroService.cs`)
- Progress analytics → EF data context: reads and writes (evidence: `BackEnd/Services/ProgressoService.cs`)
- EF data context → MySQL database: persists records
- EF data context → Reading records: maps entities (evidence: `BackEnd/Data/BookLogContext.cs`)
