# txasw/oop-typescript-final-project-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/txasw/oop-typescript-final-project-2026
- Repository: https://github.com/txasw/oop-typescript-final-project-2026

## Overview

This is a NestJS REST API for library operations, backed by in-memory arrays. A client uses the book and member endpoints for catalog and account management; book borrowing, returns, and reservations apply the circulation rules, update member borrowing state, and record history for transaction queries. The README also documents seed data, soft deletion, statistics, health checks, and request logging. The graph reflects shown controller calls and service references; some capability details come from the README because their implementation was not sampled.

Main entry points: [`src/modules/books/books.service.ts`](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.service.ts) (Book catalog and circulation), [`src/app.module.ts`](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/app.module.ts) (Root module), [`src/app.controller.ts`](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/app.controller.ts) (Reset endpoint), [`src/modules/members/members.service.ts`](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.service.ts) (Member management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP entry"]
  node_bootstrap["Nest bootstrap<br/>[main.ts]"]
  node_root["Root module<br/>[app.module.ts]"]
  node_books_api["Book endpoints"]
  node_members_api["Member endpoints"]
  node_tx_api["History endpoint"]
  node_health["Health check"]
  node_reset["Reset endpoint<br/>[app.controller.ts]"]
end

subgraph group_catalog["Catalog and members"]
  node_books["Book catalog and circulation<br/>[books.service.ts]"]
  node_book_store[("Book records and seeds<br/>[books.service.ts]")]
  node_members["Member management<br/>[members.service.ts]"]
  node_member_store[("Member records and seeds<br/>[members.service.ts]")]
end

subgraph group_circulation["Circulation history"]
  node_transactions["Transaction history"]
  node_tx_store[("Transaction records")]
end

subgraph group_platform["Shared platform"]
  node_shared_types["DTOs and domain types"]
  node_logging["Request logging"]
  node_errors["HTTP error formatting"]
end

node_client(("REST client"))

node_client -->|"calls"| node_books_api
node_client -->|"calls"| node_members_api
node_client -->|"queries"| node_tx_api
node_client -->|"checks"| node_health
node_client -->|"resets via"| node_reset
node_bootstrap -->|"starts"| node_root
node_bootstrap -->|"registers"| node_logging
node_bootstrap -->|"registers"| node_errors
node_root -->|"registers"| node_books_api
node_root -->|"registers"| node_members_api
node_root -->|"registers"| node_tx_api
node_books_api -->|"calls"| node_books
node_members_api -->|"calls"| node_members
node_tx_api -->|"queries"| node_transactions
node_books -->|"updates borrowing"| node_members
node_books -->|"records actions"| node_transactions
node_books -->|"reads and writes"| node_book_store
node_members -->|"reads and writes"| node_member_store
node_transactions -->|"reads and writes"| node_tx_store
node_reset -->|"resets"| node_books
node_reset -->|"resets"| node_members
node_reset -->|"resets"| node_transactions

click node_bootstrap "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/main.ts"
click node_root "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/app.module.ts"
click node_books_api "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.controller.ts"
click node_members_api "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.controller.ts"
click node_tx_api "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/transactions/transactions.controller.ts"
click node_health "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/health/health.controller.ts"
click node_reset "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/app.controller.ts"
click node_books "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.service.ts"
click node_book_store "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.service.ts"
click node_members "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.service.ts"
click node_member_store "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.service.ts"
click node_transactions "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/transactions/transactions.service.ts"
click node_tx_store "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/transactions/transactions.service.ts"
click node_shared_types "https://github.com/txasw/oop-typescript-final-project-2026/tree/main/src/common"
click node_logging "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/common/interceptors/logging.interceptor.ts"
click node_errors "https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/common/filters/http-exception.filter.ts"

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_bootstrap,node_root,node_books_api,node_members_api,node_tx_api,node_health,node_reset,node_client toneBlue
class node_books,node_book_store,node_members,node_member_store toneAmber
class node_transactions,node_tx_store toneMint
class node_shared_types,node_logging,node_errors toneRose
```

## Components

### HTTP entry

- [Nest bootstrap](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/main.ts): `src/main.ts`
- [Root module](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/app.module.ts): `src/app.module.ts`
- [Book endpoints](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.controller.ts): `src/modules/books/books.controller.ts`
- [Member endpoints](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.controller.ts): `src/modules/members/members.controller.ts`
- [History endpoint](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/transactions/transactions.controller.ts): `src/modules/transactions/transactions.controller.ts`
- [Health check](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/health/health.controller.ts): `src/modules/health/health.controller.ts`
- [Reset endpoint](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/app.controller.ts): `src/app.controller.ts`

### Catalog and members

- [Book catalog and circulation](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.service.ts): `src/modules/books/books.service.ts`
- [Book records and seeds](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/books/books.service.ts): `src/modules/books/books.service.ts`
- [Member management](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.service.ts): `src/modules/members/members.service.ts`
- [Member records and seeds](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/members/members.service.ts): `src/modules/members/members.service.ts`

### Circulation history

- [Transaction history](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/transactions/transactions.service.ts): `src/modules/transactions/transactions.service.ts`
- [Transaction records](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/modules/transactions/transactions.service.ts): `src/modules/transactions/transactions.service.ts`

### Shared platform

- [DTOs and domain types](https://github.com/txasw/oop-typescript-final-project-2026/tree/main/src/common): `src/common`
- [Request logging](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/common/interceptors/logging.interceptor.ts): `src/common/interceptors/logging.interceptor.ts`
- [HTTP error formatting](https://github.com/txasw/oop-typescript-final-project-2026/blob/main/src/common/filters/http-exception.filter.ts): `src/common/filters/http-exception.filter.ts`

### Other components

- **REST client**

## Connections

- REST client → Book endpoints: calls (evidence: `src/modules/books/books.controller.ts`)
- REST client → Member endpoints: calls (evidence: `src/modules/members/members.controller.ts`)
- REST client → History endpoint: queries (evidence: `src/modules/transactions/transactions.controller.ts`)
- REST client → Health check: checks (evidence: `README.md`)
- REST client → Reset endpoint: resets via (evidence: `src/app.controller.ts`)
- Nest bootstrap → Root module: starts (evidence: `src/main.ts`)
- Nest bootstrap → Request logging: registers (evidence: `src/main.ts`)
- Nest bootstrap → HTTP error formatting: registers (evidence: `src/main.ts`)
- Root module → Book endpoints: registers (evidence: `src/app.module.ts`)
- Root module → Member endpoints: registers (evidence: `src/app.module.ts`)
- Root module → History endpoint: registers (evidence: `src/app.module.ts`)
- Book endpoints → Book catalog and circulation: calls (evidence: `src/modules/books/books.controller.ts`)
- Member endpoints → Member management: calls (evidence: `src/modules/members/members.controller.ts`)
- History endpoint → Transaction history: queries (evidence: `src/modules/transactions/transactions.controller.ts`)
- Book catalog and circulation → Member management: updates borrowing (evidence: `src/modules/books/books.service.ts`)
- Book catalog and circulation → Transaction history: records actions (evidence: `README.md`)
- Book catalog and circulation → Book records and seeds: reads and writes (evidence: `src/modules/books/books.service.ts`)
- Member management → Member records and seeds: reads and writes (evidence: `src/modules/members/members.service.ts`)
- Transaction history → Transaction records: reads and writes (evidence: `src/modules/transactions/transactions.service.ts`)
- Reset endpoint → Book catalog and circulation: resets (evidence: `src/app.controller.ts`)
- Reset endpoint → Member management: resets (evidence: `src/app.controller.ts`)
- Reset endpoint → Transaction history: resets (evidence: `src/app.controller.ts`)
