How eriseve/bibliotekaapp-ui-api works
BibliotekaApp is a library service for librarians and members: sign in, browse or search books, manage lending, and reserve reading seats. The browser UI calls the gateway; the documented backend is split into authentication, catalog, lending, and seat services, with PostgreSQL storing application data and Eureka providing discovery. UI interactions are traced from the supplied source excerpts. Backend service responsibilities and database/discovery relationships are based on the README and repository structure; where exact routing or service calls are not shown, links are dashed and unverified.
Main entry points: FallbackController.java API Gateway · App.jsx UI Entry and Login · components.jsx Shared UI Components · api.js API Client
Components 24
Browser UI
- UI Entry and Login
BibliotekaUI/frontend/src/App.jsx - Catalog Dashboard
BibliotekaUI/frontend/src/Dashboard.jsx - Book Actions
BibliotekaUI/frontend/src/BookModals.jsx - Seat Reservation UI
BibliotekaUI/frontend/src/Seats.jsx - API Client
BibliotekaUI/frontend/src/api.js - Shared UI Components
BibliotekaUI/frontend/src/components.jsx - Theme Toggle
BibliotekaUI/frontend/src/ThemeToggle.jsx - Theme State
BibliotekaUI/frontend/src/theme.js
Access and Discovery
- API Gateway
LibGateway/src/main/java/org/example/libgateway/controller/FallbackController.java - Service Discovery
eureka-discovery-server/src/main/java/com/example/eurekadiscoveryserver/EurekaDiscoveryServerApplication.java - Spring UI Backend
BibliotekaUI/src/main/java/org/example/bibliotekaui/controllers/AuthController.java - UI Auth Client
BibliotekaUI/src/main/java/org/example/bibliotekaui/feign_client/AuthClient.java
Library Services
- User and Auth Service
user-service/src/main/java/com/example/usermanagementservice/controller/AuthController.java - Catalog Service
library-management-service/src/main/java/com/example/librarymanagementservice/controller/BookController.java - Catalog Logic
library-management-service/src/main/java/com/example/librarymanagementservice/service/BookService.java - External Book Lookup
library-management-service/src/main/java/com/example/librarymanagementservice/service/ExternalBookService.java - Lending Service
loan-management-service/src/main/java/com/example/loanmanagementservice/controller/LendingController.java - Seat Service
seat-reservation-service/src/main/java/com/example/seatmanagementservice/controller/SeatController.java
Application Data
- PostgreSQL
- Book Repository
library-management-service/src/main/java/com/example/librarymanagementservice/repository/BookRepository.java - Lending Repository
loan-management-service/src/main/java/com/example/loanmanagementservice/repository/LendingRepository.java - Seat Repository
seat-reservation-service/src/main/java/com/example/seatmanagementservice/repository/SeatRepository.java - User Repository
user-service/src/main/java/com/example/usermanagementservice/repository/UserRepository.java
Other components
- Member / Librarian
Connections 35
- Member / Librarian → UI Entry and Login: uses
BibliotekaUI/frontend/src/App.jsx - UI Entry and Login → API Client: submits login
BibliotekaUI/frontend/src/App.jsx - UI Entry and Login → Catalog Dashboard: routes to
BibliotekaUI/frontend/src/App.jsx - UI Entry and Login → Seat Reservation UI: routes to
BibliotekaUI/frontend/src/App.jsx - UI Entry and Login → Shared UI Components: renders
BibliotekaUI/frontend/src/App.jsx - UI Entry and Login → Theme Toggle: renders
BibliotekaUI/frontend/src/App.jsx - Catalog Dashboard → API Client: requests data
BibliotekaUI/frontend/src/Dashboard.jsx - Catalog Dashboard → Book Actions: opens
BibliotekaUI/frontend/src/Dashboard.jsx - Catalog Dashboard → Shared UI Components: renders
BibliotekaUI/frontend/src/Dashboard.jsx - Book Actions → API Client: submits actions
BibliotekaUI/frontend/src/BookModals.jsx - Book Actions → Shared UI Components: renders
BibliotekaUI/frontend/src/BookModals.jsx - Seat Reservation UI → API Client: requests reservations
BibliotekaUI/frontend/src/Seats.jsx - Seat Reservation UI → Shared UI Components: renders
BibliotekaUI/frontend/src/Seats.jsx - Shared UI Components → API Client: updates profile
BibliotekaUI/frontend/src/components.jsx - Shared UI Components → Theme Toggle: renders
BibliotekaUI/frontend/src/components.jsx - Theme Toggle → Theme State: applies theme
BibliotekaUI/frontend/src/ThemeToggle.jsx - API Client → API Gateway: HTTP requests
- API Gateway → Service Discovery: discovers services
- API Gateway → Spring UI Backend: routes requests
- Spring UI Backend → UI Auth Client: delegates auth
- UI Auth Client → User and Auth Service: calls auth API
- API Gateway → User and Auth Service: routes requests
- API Gateway → Catalog Service: routes requests
- API Gateway → Lending Service: routes requests
- API Gateway → Seat Service: routes requests
- Catalog Service → Catalog Logic: delegates catalog
- Catalog Logic → Book Repository: reads and writes
- Catalog Logic → External Book Lookup: looks up books
- Book Repository → PostgreSQL: persists books
- Lending Service → Lending Repository: reads and writes
- Lending Repository → PostgreSQL: persists lending
- Seat Service → Seat Repository: reads and writes
- Seat Repository → PostgreSQL: persists seats
- User and Auth Service → User Repository: reads and writes
- User Repository → PostgreSQL: persists users