How ashok-kumar-btech/ebook-reader works
Ebook Reader is a local-first, cross-platform reader for files on a device. Its main workflow is to browse a local folder or selected Android documents, choose a supported book, load it through a format-specific adapter, and read, search, navigate its contents, and save reading progress locally. The app also provides library history, bookmarks, themes, and responsive reading layouts. Edges are limited to relationships shown in excerpts, the source index, or the README; some README-described capabilities have no sampled implementation details, so their connections are documented rather than inferred from unsampled code.
Main entry points: ReaderView.tsx Reading View · registry.ts Adapter Dispatch · App.tsx Ebook Reader · index.ts Filesystem Provider
Components 29
Library Browsing
- Ebook Reader
src/App.tsx - Library Views
src/components/shell - Virtualized List
src/components/VirtualizedFileList.tsx - Breadcrumb Navigation
src/components/shell/BreadcrumbsBar.tsx - Recent Folders
src/components/shell/Launchpad.tsx
Reading Experience
- Reading View
src/components/ReaderView.tsx - Reading Controls
src/components/SettingsDrawer.tsx - Search and Bookmarks
src/components/SearchAndBookmarksDrawer.tsx - Table of Contents
src/components/TableOfContentsDrawer.tsx
Format Processing
- Format Definitions
src/formats/registry.ts - Adapter Dispatch
src/adapters/registry.ts - PDF Adapter
src/adapters/pdfAdapter.ts - EPUB Adapter
src/adapters/epubAdapter.ts - CBZ Adapter
src/adapters/cbzAdapter.ts - Text Adapter
src/adapters/txtAdapter.ts - HTML and DOCX
src/adapters/htmlAdapter.ts
Platform and State
- Reading Progress
src/stores/bookStore.ts - Library Preferences
src/stores/uiStore.ts - Filesystem Provider
src/platform/fs/index.ts - Desktop Filesystem
src/platform/fs/desktop.ts - Android SAF
src/platform/fs/android.ts - Web Filesystem
src/platform/fs/web.ts - Native Tauri Bridge
src/utils/tauriApi.ts - Native File Commands
src-tauri/src/lib.rs - Error Handling
src/errors/appError.ts - Path Utilities
src/utils/pathUtils.ts - Structured Logging
src/utils/logger/LogManager.ts
Other components
- Local Documents
- Reader
Connections 36
- Reader → Ebook Reader: selects books
README.md - Ebook Reader → Filesystem Provider: browses files
src/App.tsx - Filesystem Provider → Desktop Filesystem: dispatches to
src/platform/fs/index.ts - Filesystem Provider → Android SAF: dispatches to
src/platform/fs/index.ts - Filesystem Provider → Web Filesystem: dispatches to
src/platform/fs/index.ts - Desktop Filesystem → Native Tauri Bridge: calls
src/platform/fs/desktop.ts - Android SAF → Adapter Dispatch: checks formats
src/platform/fs/android.ts - Desktop Filesystem → Adapter Dispatch: checks formats
src/platform/fs/desktop.ts - Desktop Filesystem → Format Definitions: checks support
src/platform/fs/desktop.ts - Native Tauri Bridge → Native File Commands: invokes commands
src/utils/tauriApi.ts - Ebook Reader → Library Views: renders browsing
src/App.tsx - Ebook Reader → Virtualized List: renders list
src/App.tsx - Ebook Reader → Breadcrumb Navigation: renders navigation
src/App.tsx - Ebook Reader → Recent Folders: renders recents
src/App.tsx - Ebook Reader → Reading View: opens book
src/App.tsx - Reading View → Adapter Dispatch: gets adapter
src/components/ReaderView.tsx - Adapter Dispatch → Format Definitions: checks formats
src/adapters/registry.ts - Adapter Dispatch → PDF Adapter: creates adapter
src/adapters/registry.ts - Adapter Dispatch → EPUB Adapter: creates adapter
src/adapters/registry.ts - Adapter Dispatch → CBZ Adapter: creates adapter
src/adapters/registry.ts - Adapter Dispatch → Text Adapter: creates adapter
src/adapters/registry.ts - Adapter Dispatch → HTML and DOCX: creates adapter
src/adapters/registry.ts - Reading View → Reading Controls: shows settings
src/components/ReaderView.tsx - Reading View → Search and Bookmarks: shows search
src/components/ReaderView.tsx - Reading View → Table of Contents: shows contents
src/components/ReaderView.tsx - Reading View → Reading Progress: reads progress
src/components/ReaderView.tsx - Reading View → Filesystem Provider: loads book data
src/components/ReaderView.tsx - Reading Controls → Format Definitions: reads capabilities
src/components/SettingsDrawer.tsx - Reading Progress → Library Preferences: persists locally
- Library Preferences → Filesystem Provider: persists preferences
- Desktop Filesystem → Error Handling: normalizes errors
src/platform/fs/desktop.ts - Android SAF → Error Handling: normalizes errors
src/platform/fs/android.ts - Reading View → Path Utilities: uses path helpers
src/components/ReaderView.tsx - Ebook Reader → Library Preferences: updates preferences
src/App.tsx - Reading View → Structured Logging: records events
src/components/ReaderView.tsx - Local Documents → Filesystem Provider: provides documents