# marcuavius/jubook architecture

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

- Interactive diagram: https://gitdiagram.com/marcuavius/jubook
- Repository: https://github.com/marcuavius/jubook

## Overview

JuBook is a mobile book-discovery app. Readers browse popular and fiction/nonfiction selections or search Google Books, then view book details and save books to a persistent shelf. The app also provides a favorites-based feed and profile statistics. The feed’s media suggestions are locally generated placeholder content, not external recommendations. Some screen implementations were only sampled partially or listed in the source index, so the graph shows documented imports and calls without inferring unseen navigation actions.

Main entry points: [`src/context/FavoritesContext.tsx`](https://github.com/marcuavius/jubook/blob/master/src/context/FavoritesContext.tsx) (Favorites state), [`src/navigation/AppNavigator.tsx`](https://github.com/marcuavius/jubook/blob/master/src/navigation/AppNavigator.tsx) (Navigation), [`src/screens/HomeScreen.tsx`](https://github.com/marcuavius/jubook/blob/master/src/screens/HomeScreen.tsx) (Explore home), [`src/types/index.ts`](https://github.com/marcuavius/jubook/blob/master/src/types/index.ts) (Book model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["App root<br/>[App.tsx]"]
  node_navigation["Navigation<br/>[AppNavigator.tsx]"]
  node_toast["Toast<br/>[Toast.tsx]"]
end

subgraph group_discovery["Book discovery"]
  node_home["Explore home<br/>[HomeScreen.tsx]"]
  node_search["Search bar<br/>[SearchBar.tsx]"]
  node_book_api["Books service<br/>[googleBooks.ts]"]
  node_book_card["Book card<br/>[BookCard.tsx]"]
end

subgraph group_reader["Reader features"]
  node_book_detail["Book details"]
  node_feed["Shelf feed<br/>[FeedScreen.tsx]"]
  node_shelf["My shelf<br/>[MyShelfScreen.tsx]"]
  node_profile["Reader profile<br/>[ProfileScreen.tsx]"]
end

subgraph group_state["Favorites and state"]
  node_favorites["Favorites state"]
  node_local_storage[("Device storage")]
  node_book_type["Book model<br/>[index.ts]"]
end

node_reader(("Reader"))
node_google_books["Google Books"]

node_reader -.->|"opens app"| node_app
node_app -->|"provides state"| node_favorites
node_app -->|"renders"| node_navigation
node_navigation -->|"routes to"| node_home
node_navigation -->|"routes to"| node_book_detail
node_navigation -->|"routes to"| node_feed
node_navigation -->|"routes to"| node_profile
node_navigation -->|"renders"| node_toast
node_home -->|"renders"| node_search
node_home -->|"requests books"| node_book_api
node_book_api -->|"fetches volumes"| node_google_books
node_home -->|"renders results"| node_book_card
node_book_card -->|"checks and toggles"| node_favorites
node_favorites -->|"loads and saves"| node_local_storage
node_feed -->|"reads shelf"| node_favorites
node_shelf -->|"uses shelf"| node_favorites
node_profile -->|"reads shelf"| node_favorites
node_book_detail -->|"uses favorites"| node_favorites
node_favorites -->|"stores books"| node_book_type
node_book_api -->|"maps results"| node_book_type
node_home -->|"uses book data"| node_book_type
node_feed -->|"builds feed items"| node_book_type

click node_app "https://github.com/marcuavius/jubook/blob/master/App.tsx"
click node_navigation "https://github.com/marcuavius/jubook/blob/master/src/navigation/AppNavigator.tsx"
click node_toast "https://github.com/marcuavius/jubook/blob/master/src/components/Toast.tsx"
click node_home "https://github.com/marcuavius/jubook/blob/master/src/screens/HomeScreen.tsx"
click node_search "https://github.com/marcuavius/jubook/blob/master/src/components/SearchBar.tsx"
click node_book_api "https://github.com/marcuavius/jubook/blob/master/src/services/googleBooks.ts"
click node_book_card "https://github.com/marcuavius/jubook/blob/master/src/components/BookCard.tsx"
click node_book_detail "https://github.com/marcuavius/jubook/blob/master/src/screens/BookDetailScreen.tsx"
click node_feed "https://github.com/marcuavius/jubook/blob/master/src/screens/FeedScreen.tsx"
click node_shelf "https://github.com/marcuavius/jubook/blob/master/src/screens/MyShelfScreen.tsx"
click node_profile "https://github.com/marcuavius/jubook/blob/master/src/screens/ProfileScreen.tsx"
click node_favorites "https://github.com/marcuavius/jubook/blob/master/src/context/FavoritesContext.tsx"
click node_book_type "https://github.com/marcuavius/jubook/blob/master/src/types/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_app,node_navigation,node_toast toneBlue
class node_home,node_search,node_book_api,node_book_card toneAmber
class node_book_detail,node_feed,node_shelf,node_profile toneMint
class node_favorites,node_local_storage,node_book_type toneRose
class node_reader,node_google_books toneIndigo
```

## Components

### App shell

- [App root](https://github.com/marcuavius/jubook/blob/master/App.tsx): `App.tsx`
- [Navigation](https://github.com/marcuavius/jubook/blob/master/src/navigation/AppNavigator.tsx): `src/navigation/AppNavigator.tsx`
- [Toast](https://github.com/marcuavius/jubook/blob/master/src/components/Toast.tsx): `src/components/Toast.tsx`

### Book discovery

- [Explore home](https://github.com/marcuavius/jubook/blob/master/src/screens/HomeScreen.tsx): `src/screens/HomeScreen.tsx`
- [Search bar](https://github.com/marcuavius/jubook/blob/master/src/components/SearchBar.tsx): `src/components/SearchBar.tsx`
- [Books service](https://github.com/marcuavius/jubook/blob/master/src/services/googleBooks.ts): `src/services/googleBooks.ts`
- [Book card](https://github.com/marcuavius/jubook/blob/master/src/components/BookCard.tsx): `src/components/BookCard.tsx`

### Reader features

- [Book details](https://github.com/marcuavius/jubook/blob/master/src/screens/BookDetailScreen.tsx): `src/screens/BookDetailScreen.tsx`
- [Shelf feed](https://github.com/marcuavius/jubook/blob/master/src/screens/FeedScreen.tsx): `src/screens/FeedScreen.tsx`
- [My shelf](https://github.com/marcuavius/jubook/blob/master/src/screens/MyShelfScreen.tsx): `src/screens/MyShelfScreen.tsx`
- [Reader profile](https://github.com/marcuavius/jubook/blob/master/src/screens/ProfileScreen.tsx): `src/screens/ProfileScreen.tsx`

### Favorites and state

- [Favorites state](https://github.com/marcuavius/jubook/blob/master/src/context/FavoritesContext.tsx): `src/context/FavoritesContext.tsx`
- **Device storage**
- [Book model](https://github.com/marcuavius/jubook/blob/master/src/types/index.ts): `src/types/index.ts`

### Other components

- **Reader**
- **Google Books**

## Connections

- Reader → App root: opens app
- App root → Favorites state: provides state (evidence: `App.tsx`)
- App root → Navigation: renders (evidence: `App.tsx`)
- Navigation → Explore home: routes to (evidence: `src/navigation/AppNavigator.tsx`)
- Navigation → Book details: routes to (evidence: `src/navigation/AppNavigator.tsx`)
- Navigation → Shelf feed: routes to (evidence: `src/navigation/AppNavigator.tsx`)
- Navigation → Reader profile: routes to (evidence: `src/navigation/AppNavigator.tsx`)
- Navigation → Toast: renders (evidence: `src/navigation/AppNavigator.tsx`)
- Explore home → Search bar: renders (evidence: `src/screens/HomeScreen.tsx`)
- Explore home → Books service: requests books (evidence: `src/screens/HomeScreen.tsx`)
- Books service → Google Books: fetches volumes (evidence: `src/services/googleBooks.ts`)
- Explore home → Book card: renders results (evidence: `src/screens/HomeScreen.tsx`)
- Book card → Favorites state: checks and toggles (evidence: `src/components/BookCard.tsx`)
- Favorites state → Device storage: loads and saves (evidence: `src/context/FavoritesContext.tsx`)
- Shelf feed → Favorites state: reads shelf (evidence: `src/screens/FeedScreen.tsx`)
- My shelf → Favorites state: uses shelf (evidence: `src/screens/MyShelfScreen.tsx`)
- Reader profile → Favorites state: reads shelf (evidence: `src/screens/ProfileScreen.tsx`)
- Book details → Favorites state: uses favorites (evidence: `src/screens/BookDetailScreen.tsx`)
- Favorites state → Book model: stores books (evidence: `src/context/FavoritesContext.tsx`)
- Books service → Book model: maps results (evidence: `src/services/googleBooks.ts`)
- Explore home → Book model: uses book data (evidence: `src/screens/HomeScreen.tsx`)
- Shelf feed → Book model: builds feed items (evidence: `src/screens/FeedScreen.tsx`)
