How flexcha/library-app works
LibraryOS is a full-stack library-management system: readers and staff use a React SPA to manage accounts, discover books, circulate copies, handle reservations and fines, and view reports. The SPA sends REST/JSON requests to an Express API, whose routes dispatch to domain services backed by Prisma and a relational database. The README documents the overall API and persistence architecture; source excerpts and index references support several specific frontend and route-to-service links, while some domain internals were not sampled.
Main entry points: index.ts API router · App.tsx SPA shell · client.ts REST client · AuthContext.tsx Sign-in state
Components 22
React application
- SPA shell
src/App.tsx - Sign-in state
src/context/AuthContext.tsx - Catalog browsing
src/components/CatalogBrowse.tsx - Circulation desk
src/components/CirculationDesk.tsx - Reservations view
src/components/ReservationsView.tsx - Fines view
src/components/FinesView.tsx - Reports dashboard
src/components/ReportsDashboard.tsx - User management
src/components/UserManagement.tsx - REST client
src/api/client.ts
API and access
- Express server
server.ts - API router
src/routes/index.ts - Auth and validation
src/middleware/authenticate.ts
Library operations
- Accounts and identity
src/modules/auth/auth.service.ts - Book catalog
src/modules/catalog/book.service.ts - Loans and returns
src/modules/circulation/loan.service.ts - Book reservations
src/modules/reservation/reservation.service.ts - Fines and penalties
src/modules/fine/fine.service.ts - Library reporting
src/modules/report/report.service.ts - Notifications
src/modules/notification/notification.service.ts - User administration
src/modules/user/user.service.ts
Persistence
- Relational database
Other components
- Readers and staff
Connections 29
- Readers and staff → SPA shell: use
README.md - SPA shell → Sign-in state: provides state
src/App.tsx - SPA shell → Catalog browsing: renders
src/App.tsx - SPA shell → Circulation desk: renders
src/App.tsx - SPA shell → Reservations view: renders
src/App.tsx - SPA shell → Fines view: renders
src/App.tsx - SPA shell → Reports dashboard: renders
src/App.tsx - SPA shell → User management: renders
src/App.tsx - Sign-in state → REST client: calls
src/context/AuthContext.tsx - Catalog browsing → REST client: calls
src/components/CatalogBrowse.tsx - Circulation desk → REST client: calls
src/components/CirculationDesk.tsx - REST client → API router: sends REST requests
README.md - Express server → API router: mounts routes
- API router → Auth and validation: applies middleware
src/routes/index.ts - API router → Accounts and identity: dispatches
src/routes/index.ts - API router → Book catalog: dispatches
src/routes/index.ts - API router → Loans and returns: dispatches
src/routes/index.ts - API router → Book reservations: dispatches
src/routes/index.ts - API router → Fines and penalties: dispatches
src/routes/index.ts - API router → Library reporting: dispatches
src/routes/index.ts - API router → Notifications: dispatches
src/routes/index.ts - API router → User administration: dispatches
src/routes/index.ts - Book catalog → Relational database: reads and writes
README.md - Loans and returns → Relational database: reads and writes
README.md - Book reservations → Relational database: reads and writes
README.md - Fines and penalties → Relational database: reads and writes
README.md - Library reporting → Relational database: reads
README.md - Accounts and identity → Relational database: reads and writes
README.md - User administration → Relational database: reads and writes
README.md