How alfa-123-coder/smart-library-ai works
Smart Library is a React academic-library application. Users enter through the landing experience, authenticate, browse a catalog, inspect physical-copy availability, then read, reserve, borrow, review, or manage their account. Librarians administer titles, barcodes, copies, and operational records. App.tsx orchestrates UI state and delegates persistence and domain actions to LibraryService, which uses browser storage seeded from mock data. The excerpts show local, client-side behavior; unsampled screens are included as documented product branches without adding uncertain service wiring.
Components 21
Entry and Shell
- Application Orchestrator
src/App.tsx - Landing Page
src/components/layout/LandingPage.tsx - Authentication Modal
src/components/auth/AuthModal.tsx - Application Layout
src/components/layout/AppLayout.tsx
Discovery and Reading
- Book Catalog
src/components/books/BookCatalog.tsx - Book Details
src/components/books/BookDetailView.tsx - Reader Modal
src/components/books/ReaderModal.tsx - Library AI Chat
src/components/assistant/LibraryAIChat.tsx - Recommendations View
src/components/recommendations/RecommendationsView.tsx
Member Services
- Member Dashboard
src/components/member/MemberDashboard.tsx - My Books
src/components/member/MyBooksView.tsx - Reservations View
src/components/member/ReservationsView.tsx - Fines View
src/components/member/FinesView.tsx - User Profile
src/components/profile/UserProfileView.tsx
Library Operations
- Admin Dashboard
src/components/admin/AdminDashboard.tsx
Domain State
- Library Service
src/services/libraryService.ts - Browser Storage
src/services/libraryService.ts - Seed Library Data
src/mock/mockData.ts
Other components
- Visitor
- Member User
- Librarian
Connections 28
- Visitor → Application Orchestrator: enters library
- Member User → Application Orchestrator: uses library
- Librarian → Application Orchestrator: opens console
- Application Orchestrator → Landing Page: renders landing
- Application Orchestrator → Application Layout: renders shell
- Landing Page → Application Orchestrator: starts access
- Application Orchestrator → Authentication Modal: opens auth
- Authentication Modal → Library Service: calls auth
- Application Orchestrator → Library Service: reads state
- Application Orchestrator → Book Catalog: supplies catalog
- Book Catalog → Application Orchestrator: selects book
- Application Orchestrator → Book Details: opens details
- Book Details → Application Orchestrator: dispatches actions
- Application Orchestrator → Library Service: executes actions
- Application Orchestrator → Reader Modal: opens reader
- Application Orchestrator → Library AI Chat: opens assistant
- Library AI Chat → Library Service: queries catalog
- Application Orchestrator → Recommendations View: shows recommendations
- Application Orchestrator → Member Dashboard: shows dashboard
- Application Orchestrator → My Books: shows loans
- Application Orchestrator → Reservations View: shows holds
- Application Orchestrator → Fines View: shows fines
- Application Orchestrator → User Profile: shows profile
- Member Dashboard → Application Orchestrator: selects content
- Admin Dashboard → Library Service: manages records
- Application Orchestrator → Admin Dashboard: shows operations
- Library Service → Browser Storage: reads and writes
- Library Service → Seed Library Data: seeds state