How narayan-bhattarai/kavyaswar works
KavyaSwar is a browser-based audio-book creator and reader: users upload a PDF, record narration page by page, save the book and its media, then open it for synchronized reading and playback. The app also provides a library and ZIP package import/export utilities. The graph follows the sampled routing, page, and persistence calls; PWA support and some reader details are documented but their implementations were not sampled.
Main entry points: db.ts Data access · CreateKavya.tsx PDF creator · App.tsx Route selection · Layout.tsx App layout
Components 14
Application shell
- React entry
src/main.tsx - Route selection
src/App.tsx - App layout
src/components/Layout.tsx
Book creation
- PDF creator
src/pages/CreateKavya.tsx - Audio recorder
src/components/AudioRecorder.tsx
Library and reading
- Library home
src/pages/Home.tsx - Book reader
src/pages/ReadKavya.tsx
Persistence and exchange
- Book data model
src/lib/types.ts - Data access
src/lib/db.ts - IndexedDB adapter
src/lib/db.local.ts - ZIP exchange
src/utils/zipUtils.ts
Other components
- App user
- Browser microphone
- Supabase service
Connections 24
- App user → React entry: opens app
README.md - React entry → Route selection: renders
src/main.tsx - Route selection → App layout: wraps routes
src/App.tsx - Route selection → Library home: routes home
src/App.tsx - Route selection → PDF creator: routes create
src/App.tsx - Route selection → Book reader: routes book
src/App.tsx - App layout → Library home: hosts page
src/App.tsx - App layout → PDF creator: hosts page
src/App.tsx - App layout → Book reader: hosts page
src/App.tsx - Library home → Data access: loads library
src/pages/Home.tsx - Library home → PDF creator: navigates create
src/pages/Home.tsx - Library home → Book reader: opens book
src/pages/Home.tsx - App layout → Data access: loads and deletes
src/components/Layout.tsx - PDF creator → Audio recorder: renders recorder
src/pages/CreateKavya.tsx - Audio recorder → Browser microphone: requests audio
src/components/AudioRecorder.tsx - PDF creator → Data access: saves book and media
src/pages/CreateKavya.tsx - Book reader → Data access: loads book and blobs
src/pages/ReadKavya.tsx - Data access → Supabase service: reads and writes
src/lib/db.ts - PDF creator → Book data model: uses book types
src/pages/CreateKavya.tsx - Book reader → Book data model: uses book types
src/pages/ReadKavya.tsx - Data access → Book data model: maps book data
src/lib/db.ts - ZIP exchange → Data access: imports and exports blobs
src/utils/zipUtils.ts - ZIP exchange → Book data model: serializes metadata
src/utils/zipUtils.ts - IndexedDB adapter → Book data model: stores typed records
src/lib/db.local.ts