How realstin/booksstore-frontend works
BookStore is a book discovery and reading web app: visitors browse its public site and news, then sign in to explore books, save them to a personal library, and read with progress, bookmarks, and notes. The graph follows the documented router, auth/library contexts, dashboard pages, reader, and API boundary. It also preserves the public company/resource and newsletter/news capabilities. Evidence is limited to the README (empty), source index, and excerpts; unsampled capabilities are represented without asserting unshown call paths.
Main entry points: App.jsx Route dispatcher · api.js Backend API · Dashboard.jsx Dashboard overview · Library.jsx Personal library
Components 26
App entry and access
- Route dispatcher
src/App.jsx - Protected access
src/components/ProtectedRoute.jsx - Login and signup
src/pages/Signup.jsx
Public site and news
- Homepage
src/pages/Homepage.jsx - Homepage sections
src/components/Homepage - About page
src/pages/About.jsx - Company pages
src/pages/Company - Help and policies
src/pages/Resources - News pages
src/pages/News - Article content
src/data/news.js - Newsletter footer
src/components/Homepage/Footer.jsx
Books and library
- Dashboard overview
src/pages/Dashboard/Dashboard.jsx - Book exploration
src/pages/Dashboard/Explore.jsx - Book details
src/pages/Dashboard/BookDetails.jsx - Personal library
src/pages/Dashboard/Library.jsx - Profile and settings
src/pages/Dashboard/Profile.jsx - Dashboard layout and cards
src/components/Dashboard
Reading tools
- Book reader
src/pages/Dashboard/BookReader.jsx - Reader alternative
src/pages/Dashboard/BookReaderV2.jsx - Reading progress
src/utils/readingProgress.js - Reader preferences
src/utils/preferences.js
State and services
- Session context
src/context/AuthContext.jsx - Backend API
src/services/api.js - Library context
src/context/LibraryContext.jsx
Other components
- Visitor / reader
- BookStore backend
Connections 39
- Visitor / reader → Route dispatcher: opens
src/App.jsx - Route dispatcher → Homepage: routes to
src/App.jsx - Route dispatcher → Protected access: guards routes
src/App.jsx - Route dispatcher → News pages: routes to
src/App.jsx - Route dispatcher → About page: routes to
src/App.jsx - Route dispatcher → Help and policies: routes to
src/App.jsx - Route dispatcher → Company pages: routes to
src/App.jsx - Route dispatcher → Login and signup: routes to
src/App.jsx - Protected access → Session context: checks session
src/components/ProtectedRoute.jsx - Session context → Backend API: verifies session
src/context/AuthContext.jsx - Backend API → BookStore backend: requests data
src/services/api.js - Homepage → Homepage sections: renders sections
- News pages → Article content: loads articles
src/pages/News/News.jsx - News pages → Backend API: requests news
src/pages/News/NewsArticle.jsx - Newsletter footer → Backend API: subscribes email
src/components/Homepage/Footer.jsx - Route dispatcher → Dashboard overview: routes to
src/App.jsx - Route dispatcher → Book exploration: routes to
src/App.jsx - Route dispatcher → Personal library: routes to
src/App.jsx - Route dispatcher → Book details: routes to
src/App.jsx - Route dispatcher → Book reader: selects reader
src/App.jsx - Route dispatcher → Reader alternative: selects alternate
src/App.jsx - Route dispatcher → Profile and settings: routes to
src/App.jsx - Personal library → Library context: uses library state
src/pages/Dashboard/Library.jsx - Library context → Backend API: loads and updates
src/context/LibraryContext.jsx - Dashboard overview → Backend API: fetches dashboard data
src/pages/Dashboard/Dashboard.jsx - Book exploration → Backend API: fetches books
src/pages/Dashboard/Explore.jsx - Book details → Backend API: fetches book
src/pages/Dashboard/BookDetails.jsx - Book details → Library context: uses library state
src/pages/Dashboard/BookDetails.jsx - Dashboard overview → Reading progress: reads history
src/pages/Dashboard/Dashboard.jsx - Personal library → Reading progress: reads progress
src/pages/Dashboard/Library.jsx - Dashboard overview → Dashboard layout and cards: renders cards
src/pages/Dashboard/Dashboard.jsx - Book exploration → Dashboard layout and cards: renders cards
src/pages/Dashboard/Explore.jsx - Personal library → Dashboard layout and cards: renders cards
src/pages/Dashboard/Library.jsx - Book reader → Backend API: loads book tools
src/pages/Dashboard/BookReader.jsx - Book reader → Reading progress: records position
src/pages/Dashboard/BookReader.jsx - Book reader → Reader preferences: uses preferences
- Reader alternative → Backend API: fetches reader data
src/pages/Dashboard/BookReaderV2.jsx - Login and signup → Session context: updates session
- Route dispatcher → Session context: reads auth state
src/App.jsx