How allwinpauldurai-creator/song-book-webapp works
Song Book Library provides a public catalogue, member accounts and requests, member-only PDF reading/download, and staff administration. The user journey runs from browsing books through sign-in and membership-gated reading; members can also manage profiles and submit modification requests, while staff review requests and manage books and users. The graph describes the sampled React frontend and its API boundary, not the unsampled Spring backend internals. Some page-to-service links rely on the SOURCE INDEX import references rather than inspected implementation excerpts.
Main entry points: endpoints.ts Typed API endpoints · App.tsx Route application · AdminRoutes.tsx Staff routes · ReaderPage.tsx PDF reader
Components 25
App and access
- Route application
frontend/src/app/App.tsx - Route guards
frontend/src/routes/guards.tsx - Session and roles
frontend/src/contexts/AuthContext.tsx - Sign-in and registration
frontend/src/features/auth
Catalogue and reading
- Catalogue and details
frontend/src/features/catalogue - Book card
frontend/src/features/catalogue/BookCard.tsx - PDF reader
frontend/src/features/reader/ReaderPage.tsx - PDF access helpers
frontend/src/features/reader - PDF download
frontend/src/features/reader/usePdfDownload.ts
Member services
- Member account
frontend/src/features/member - Profile management
frontend/src/features/member/ProfilePage.tsx - Request submission
frontend/src/features/member/RequestsPage.tsx
Staff administration
- Staff routes
frontend/src/features/admin/AdminRoutes.tsx - Book management
frontend/src/features/admin/BookFormPage.tsx - Request review
frontend/src/features/admin/RequestsReviewPage.tsx - User and membership admin
frontend/src/features/admin - Categories and audit
frontend/src/features/admin
API client
- Typed API endpoints
frontend/src/services/api/endpoints.ts - HTTP and token client
frontend/src/services/api/client.ts - API data contracts
frontend/src/types/api.ts - Shared UI and errors
frontend/src/components/common.tsx - Mobile normalization
frontend/src/utils/mobile.ts
Other components
- Visitor or member
- Publisher or admin
- Song Book API
Connections 30
- Visitor or member → Route application: opens
frontend/src/app/App.tsx - Publisher or admin → Route application: opens
frontend/src/app/App.tsx - Route application → Catalogue and details: routes to
frontend/src/app/App.tsx - Route application → Sign-in and registration: routes to
frontend/src/app/App.tsx - Route application → Member account: routes to
frontend/src/app/App.tsx - Route application → PDF reader: routes to
frontend/src/app/App.tsx - Route application → Staff routes: routes to
frontend/src/app/App.tsx - Route application → Route guards: guards routes
frontend/src/app/App.tsx - Route guards → Session and roles: checks session
frontend/src/routes/guards.tsx - Session and roles → Typed API endpoints: loads user
frontend/src/contexts/AuthContext.tsx - Sign-in and registration → Mobile normalization: normalizes numbers
frontend/src/features/auth/LoginPage.tsx - Catalogue and details → Typed API endpoints: loads catalogue
frontend/src/features/catalogue/CataloguePage.tsx - Catalogue and details → Book card: renders cards
frontend/src/features/catalogue/CataloguePage.tsx - PDF reader → Typed API endpoints: requests access
frontend/src/features/reader/ReaderPage.tsx - PDF reader → PDF access helpers: uses
frontend/src/features/reader/ReaderPage.tsx - PDF reader → PDF download: offers download
frontend/src/features/reader/ReaderPage.tsx - Member account → Typed API endpoints: loads member data
frontend/src/features/member/MePage.tsx - Profile management → Typed API endpoints: updates profile
frontend/src/features/member/ProfilePage.tsx - Profile management → Mobile normalization: formats numbers
frontend/src/features/member/ProfilePage.tsx - Request submission → Typed API endpoints: submits requests
frontend/src/features/member/RequestsPage.tsx - Staff routes → Book management: routes to
frontend/src/features/admin/AdminRoutes.tsx - Staff routes → Request review: routes to
frontend/src/features/admin/AdminRoutes.tsx - Staff routes → User and membership admin: routes to
frontend/src/features/admin/AdminRoutes.tsx - Staff routes → Categories and audit: routes to
frontend/src/features/admin/AdminRoutes.tsx - Request review → Typed API endpoints: reviews requests
frontend/src/features/admin/RequestsReviewPage.tsx - Typed API endpoints → HTTP and token client: calls
frontend/src/services/api/endpoints.ts - HTTP and token client → Song Book API: sends HTTP
README.md - HTTP and token client → API data contracts: uses types
frontend/src/services/api/client.ts - Typed API endpoints → API data contracts: types responses
frontend/src/services/api/endpoints.ts - Shared UI and errors → HTTP and token client: formats errors
frontend/src/components/common.tsx