How amandubey923/reader-hub works
Reader’s HUB is a local-first digital reading and study environment. Readers discover curated books, open a book, read in a PDF workspace, annotate and translate, then track activity and revisit reading memory. The README documents these stages and capabilities; the source index and excerpts confirm key catalog, reader-storage, library-state, authentication, and social responsibilities. Several feature implementations are unsampled, so their relationships are shown only where documented, and source-level call details are not inferred.
Main entry points: BookReader.tsx PDF Reader · LibraryContext.tsx Library State · page.tsx Home Discovery · reader-storage.ts Local Reader Storage
Components 25
Discovery
- Home Discovery
app/page.tsx - Book Catalog
data/books.ts - Book Cards
components/BookCard.tsx
Reading & Study
- Book Details
app/book/[id]/BookDetailClient.tsx - PDF Reader
components/reader/BookReader.tsx - Study Annotations
components/reader/AnnotationDrawer.tsx - Spread Translation
components/reader/TranslationDrawer.tsx - Reading Timer
components/reader/ReadingSessionTimer.tsx
Personal Library
- Reading Memory
components/memory/BookReadingMemory.tsx - Local Reader Storage
lib/reader-storage.ts - Library State
context/LibraryContext.tsx - Cloud Sync
lib/firestore-sync.ts - Reading Analytics
lib/reading-analytics.ts
Identity & Community
- Authentication
context/AuthContext.tsx - Social Features
lib/social.ts - Reader Profiles
app/profile/page.tsx
Platform Services
- Translation API
app/api/translate/route.ts - Library Assistant
components/assistant/LibraryAssistant.tsx - Assistant API
app/api/chat/route.ts - Entitlements
lib/entitlements.ts - Payment API
app/api/payment/create-order/route.ts - Catalog Administration
app/admin/page.tsx - Admin APIs
app/api/admin/catalog/route.ts - Firebase Services
lib/firebase.ts
Other components
- Reader
Connections 22
- Reader → Home Discovery: discovers
- Home Discovery → Book Catalog: filters catalog
app/page.tsx - Home Discovery → Book Cards: renders books
app/page.tsx - Book Cards → Book Details: opens book
components/BookCard.tsx - Book Details → PDF Reader: embeds reader
app/book/[id]/BookDetailClient.tsx - PDF Reader → Study Annotations: supports annotation
- PDF Reader → Spread Translation: translates spread
- Spread Translation → Translation API: requests translation
- PDF Reader → Reading Timer: tracks activity
- Reading Timer → Local Reader Storage: records activity
- Reading Memory → Local Reader Storage: reads memory
components/memory/BookReadingMemory.tsx - Library State → Local Reader Storage: persists locally
context/LibraryContext.tsx - Library State → Cloud Sync: syncs user data
context/LibraryContext.tsx - Library State → Authentication: uses identity
context/LibraryContext.tsx - Reader Profiles → Reading Analytics: shows analytics
app/profile/page.tsx - Reader Profiles → Social Features: loads social profile
app/profile/page.tsx - Authentication → Firebase Services: initializes auth
context/AuthContext.tsx - Social Features → Firebase Services: stores social data
lib/social.ts - Library Assistant → Assistant API: sends questions
- Assistant API → Library Assistant: uses assistant logic
app/api/chat/route.ts - Payment API → Entitlements: checks access
- Catalog Administration → Admin APIs: manages catalog