# samiiirkarki-dv/echoread-ai-powered-audiobooks architecture

> Architecture diagram of the GitHub repository samiiirkarki-dv/echoread-ai-powered-audiobooks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samiiirkarki-dv/echoread-ai-powered-audiobooks
- Repository: https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks

## Overview

Readify AI is a mobile-oriented reading app: users authenticate, manage a personal book library, open books in a reader, and listen to book text with playback controls. The app also includes onboarding, focus, profile, and settings areas. Supabase supplies authentication and app data; OCR extraction, AI cover generation, and speech generation are present as server functions. Those function implementations and several page-to-page interactions were not sampled, so uncertain links are omitted or marked unverified.

Main entry points: [`src/App.tsx`](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/App.tsx) (Routes and guards), [`src/integrations/supabase/client.ts`](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/pages/ReaderPage.tsx`](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ReaderPage.tsx) (Reader), [`src/pages/ListeningPage.tsx`](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ListeningPage.tsx) (Listening player)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_authpage["Sign-in page<br/>[AuthPage.tsx]"]
  node_onboarding["Onboarding<br/>[OnboardingPage.tsx]"]
  node_splash["Splash screen<br/>[SplashScreen.tsx]"]
  node_router["Routes and guards<br/>[App.tsx]"]
end

subgraph group_reading["Reading experience"]
  node_reader["Reader<br/>[ReaderPage.tsx]"]
  node_listening["Listening player<br/>[ListeningPage.tsx]"]
  node_focus["Focus mode<br/>[FocusPage.tsx]"]
  node_library["Library and playlists<br/>[LibraryPage.tsx]"]
  node_home["Home dashboard<br/>[HomePage.tsx]"]
end

subgraph group_account["Account and data"]
  node_profile["Profile<br/>[ProfilePage.tsx]"]
  node_settings["Settings<br/>[SettingsPage.tsx]"]
  node_auth["Auth state<br/>[AuthContext.tsx]"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase[("Supabase service")]
end

subgraph group_services["Generation services"]
  node_ocr["OCR extraction<br/>[index.ts]"]
  node_cover["AI cover generation<br/>[index.ts]"]
  node_tts["Speech generation<br/>[index.ts]"]
end

node_user(("Reader"))

node_user -->|"opens app"| node_router
node_router -->|"routes to"| node_authpage
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_reader
node_router -->|"routes to"| node_listening
node_router -->|"routes to"| node_library
node_router -->|"routes to"| node_profile
node_router -->|"routes to"| node_settings
node_router -->|"renders"| node_splash
node_router -->|"renders"| node_onboarding
node_router -->|"provides auth"| node_auth
node_authpage -->|"uses auth"| node_auth
node_auth -->|"calls auth API"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase
node_home -->|"reads app data"| node_supabase_client
node_library -->|"manages books"| node_supabase_client
node_listening -->|"loads book data"| node_supabase_client
node_profile -->|"accesses data"| node_supabase_client
node_settings -->|"accesses data"| node_supabase_client
node_reader -->|"accesses data"| node_supabase_client
node_reader -.->|"may request OCR"| node_ocr
node_library -.->|"may request covers"| node_cover
node_listening -.->|"may request speech"| node_tts

click node_reader "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ReaderPage.tsx"
click node_listening "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ListeningPage.tsx"
click node_focus "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/FocusPage.tsx"
click node_library "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/LibraryPage.tsx"
click node_home "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/HomePage.tsx"
click node_authpage "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/AuthPage.tsx"
click node_onboarding "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/OnboardingPage.tsx"
click node_splash "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/SplashScreen.tsx"
click node_router "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/App.tsx"
click node_profile "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ProfilePage.tsx"
click node_settings "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/SettingsPage.tsx"
click node_auth "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/contexts/AuthContext.tsx"
click node_supabase_client "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/integrations/supabase/client.ts"
click node_ocr "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/supabase/functions/ocr-extract/index.ts"
click node_cover "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/supabase/functions/ai-generate-cover/index.ts"
click node_tts "https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/supabase/functions/tts-speak/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_authpage,node_onboarding,node_splash,node_router toneBlue
class node_reader,node_listening,node_focus,node_library,node_home toneAmber
class node_profile,node_settings,node_auth,node_supabase_client,node_supabase toneMint
class node_ocr,node_cover,node_tts toneRose
class node_user toneIndigo
```

## Components

### App entry

- [Sign-in page](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/AuthPage.tsx): `src/pages/AuthPage.tsx`
- [Onboarding](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/OnboardingPage.tsx): `src/pages/OnboardingPage.tsx`
- [Splash screen](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/SplashScreen.tsx): `src/pages/SplashScreen.tsx`
- [Routes and guards](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/App.tsx): `src/App.tsx`

### Reading experience

- [Reader](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ReaderPage.tsx): `src/pages/ReaderPage.tsx`
- [Listening player](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ListeningPage.tsx): `src/pages/ListeningPage.tsx`
- [Focus mode](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/FocusPage.tsx): `src/pages/FocusPage.tsx`
- [Library and playlists](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/LibraryPage.tsx): `src/pages/LibraryPage.tsx`
- [Home dashboard](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/HomePage.tsx): `src/pages/HomePage.tsx`

### Account and data

- [Profile](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/ProfilePage.tsx): `src/pages/ProfilePage.tsx`
- [Settings](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/pages/SettingsPage.tsx): `src/pages/SettingsPage.tsx`
- [Auth state](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Supabase client](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase service**

### Generation services

- [OCR extraction](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/supabase/functions/ocr-extract/index.ts): `supabase/functions/ocr-extract/index.ts`
- [AI cover generation](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/supabase/functions/ai-generate-cover/index.ts): `supabase/functions/ai-generate-cover/index.ts`
- [Speech generation](https://github.com/samiiirkarki-dv/echoread-ai-powered-audiobooks/blob/main/supabase/functions/tts-speak/index.ts): `supabase/functions/tts-speak/index.ts`

### Other components

- **Reader**

## Connections

- Reader → Routes and guards: opens app (evidence: `src/App.tsx`)
- Routes and guards → Sign-in page: routes to (evidence: `src/App.tsx`)
- Routes and guards → Home dashboard: routes to (evidence: `src/App.tsx`)
- Routes and guards → Reader: routes to (evidence: `src/App.tsx`)
- Routes and guards → Listening player: routes to (evidence: `src/App.tsx`)
- Routes and guards → Library and playlists: routes to (evidence: `src/App.tsx`)
- Routes and guards → Profile: routes to (evidence: `src/App.tsx`)
- Routes and guards → Settings: routes to (evidence: `src/App.tsx`)
- Routes and guards → Splash screen: renders (evidence: `src/App.tsx`)
- Routes and guards → Onboarding: renders (evidence: `src/App.tsx`)
- Routes and guards → Auth state: provides auth (evidence: `src/App.tsx`)
- Sign-in page → Auth state: uses auth (evidence: `src/pages/AuthPage.tsx`)
- Auth state → Supabase client: calls auth API (evidence: `src/contexts/AuthContext.tsx`)
- Supabase client → Supabase service: connects to (evidence: `src/integrations/supabase/client.ts`)
- Home dashboard → Supabase client: reads app data (evidence: `src/pages/HomePage.tsx`)
- Library and playlists → Supabase client: manages books (evidence: `src/pages/LibraryPage.tsx`)
- Listening player → Supabase client: loads book data (evidence: `src/pages/ListeningPage.tsx`)
- Profile → Supabase client: accesses data (evidence: `src/pages/ProfilePage.tsx`)
- Settings → Supabase client: accesses data (evidence: `src/pages/SettingsPage.tsx`)
- Reader → Supabase client: accesses data (evidence: `src/pages/ReaderPage.tsx`)
- Reader → OCR extraction: may request OCR
- Library and playlists → AI cover generation: may request covers
- Listening player → Speech generation: may request speech
