# nejim2001/bookfolio architecture

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

- Interactive diagram: https://gitdiagram.com/nejim2001/bookfolio
- Repository: https://github.com/nejim2001/bookfolio

## Overview

Bookfolio is a React Native bookcase app: a signed-in user searches book records, inspects a result, and adds or removes books from shelves; the app also provides book notes. The sampled search and shelf API code supports the Google Books flow. Note screens and most shelf-screen implementations were not sampled, so their internal calls are not mapped. Firebase is documented for authentication and note storage, but the sampled Firebase module only establishes a Firestore collection; its consumers are not evidenced here.

Main entry points: [`navigation/appNavigation.js`](https://github.com/nejim2001/bookfolio/blob/main/navigation/appNavigation.js) (App navigation), [`App.js`](https://github.com/nejim2001/bookfolio/blob/main/App.js) (App providers), [`screens/SearchScreen.js`](https://github.com/nejim2001/bookfolio/blob/main/screens/SearchScreen.js) (Book search), [`api/googleBooks.js`](https://github.com/nejim2001/bookfolio/blob/main/api/googleBooks.js) (Books API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["App providers<br/>[App.js]"]
  node_auth["Auth state<br/>[AuthContext.js]"]
  node_navigation["App navigation<br/>[appNavigation.js]"]
  node_welcome["Welcome<br/>[WelcomeScreen.js]"]
end

subgraph group_books["Book discovery"]
  node_search["Book search<br/>[SearchScreen.js]"]
  node_search_info["Search result"]
  node_book_tile["Book tile<br/>[BookWithTitle.js]"]
  node_books_api["Books API<br/>[googleBooks.js]"]
end

subgraph group_library["Bookshelf"]
  node_home["Home<br/>[HomeScreen.js]"]
  node_book_info["Book details<br/>[BookInfoScreen.js]"]
  node_category["Shelf category"]
end

subgraph group_notes["Book notes"]
  node_notes["Note screens<br/>[NoteScreen.js]"]
  node_add_note["Add note<br/>[AddNoteScreen.js]"]
  node_edit_note["Edit note<br/>[EditNoteScreen.js]"]
end

subgraph group_services["External services"]
  node_firebase["Firestore setup<br/>[firebase.js]"]
  node_google_books{{"Google Books"}}
  node_firestore[("Firebase Firestore")]
end

node_reader(("Reader"))

node_reader -->|"opens"| node_app
node_app -->|"provides state"| node_auth
node_app -->|"renders"| node_navigation
node_navigation -->|"checks user"| node_auth
node_navigation -->|"dispatches"| node_welcome
node_navigation -->|"dispatches"| node_home
node_navigation -->|"dispatches"| node_search
node_navigation -->|"dispatches"| node_search_info
node_navigation -->|"dispatches"| node_book_info
node_navigation -->|"dispatches"| node_category
node_navigation -->|"dispatches"| node_notes
node_navigation -->|"dispatches"| node_add_note
node_navigation -->|"dispatches"| node_edit_note
node_search -->|"searches"| node_books_api
node_search -->|"renders results"| node_book_tile
node_book_tile -->|"navigates"| node_navigation
node_search_info -->|"adds to shelf"| node_books_api
node_books_api -->|"requests shelf data"| node_google_books
node_firebase -.->|"initializes"| node_firestore

click node_app "https://github.com/nejim2001/bookfolio/blob/main/App.js"
click node_auth "https://github.com/nejim2001/bookfolio/blob/main/theme/AuthContext.js"
click node_navigation "https://github.com/nejim2001/bookfolio/blob/main/navigation/appNavigation.js"
click node_welcome "https://github.com/nejim2001/bookfolio/blob/main/screens/WelcomeScreen.js"
click node_home "https://github.com/nejim2001/bookfolio/blob/main/screens/HomeScreen.js"
click node_search "https://github.com/nejim2001/bookfolio/blob/main/screens/SearchScreen.js"
click node_search_info "https://github.com/nejim2001/bookfolio/blob/main/screens/SearchInfoScreen.js"
click node_book_info "https://github.com/nejim2001/bookfolio/blob/main/screens/BookInfoScreen.js"
click node_category "https://github.com/nejim2001/bookfolio/blob/main/screens/BookCategoryScreen.js"
click node_book_tile "https://github.com/nejim2001/bookfolio/blob/main/components/BookWithTitle.js"
click node_books_api "https://github.com/nejim2001/bookfolio/blob/main/api/googleBooks.js"
click node_notes "https://github.com/nejim2001/bookfolio/blob/main/screens/NoteScreen.js"
click node_add_note "https://github.com/nejim2001/bookfolio/blob/main/screens/AddNoteScreen.js"
click node_edit_note "https://github.com/nejim2001/bookfolio/blob/main/screens/EditNoteScreen.js"
click node_firebase "https://github.com/nejim2001/bookfolio/blob/main/config/firebase.js"

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_auth,node_navigation,node_welcome toneBlue
class node_search,node_search_info,node_book_tile,node_books_api toneAmber
class node_home,node_book_info,node_category toneMint
class node_notes,node_add_note,node_edit_note toneRose
class node_firebase,node_google_books,node_firestore,node_reader toneIndigo
```

## Components

### App shell

- [App providers](https://github.com/nejim2001/bookfolio/blob/main/App.js): `App.js`
- [Auth state](https://github.com/nejim2001/bookfolio/blob/main/theme/AuthContext.js): `theme/AuthContext.js`
- [App navigation](https://github.com/nejim2001/bookfolio/blob/main/navigation/appNavigation.js): `navigation/appNavigation.js`
- [Welcome](https://github.com/nejim2001/bookfolio/blob/main/screens/WelcomeScreen.js): `screens/WelcomeScreen.js`

### Book discovery

- [Book search](https://github.com/nejim2001/bookfolio/blob/main/screens/SearchScreen.js): `screens/SearchScreen.js`
- [Search result](https://github.com/nejim2001/bookfolio/blob/main/screens/SearchInfoScreen.js): `screens/SearchInfoScreen.js`
- [Book tile](https://github.com/nejim2001/bookfolio/blob/main/components/BookWithTitle.js): `components/BookWithTitle.js`
- [Books API](https://github.com/nejim2001/bookfolio/blob/main/api/googleBooks.js): `api/googleBooks.js`

### Bookshelf

- [Home](https://github.com/nejim2001/bookfolio/blob/main/screens/HomeScreen.js): `screens/HomeScreen.js`
- [Book details](https://github.com/nejim2001/bookfolio/blob/main/screens/BookInfoScreen.js): `screens/BookInfoScreen.js`
- [Shelf category](https://github.com/nejim2001/bookfolio/blob/main/screens/BookCategoryScreen.js): `screens/BookCategoryScreen.js`

### Book notes

- [Note screens](https://github.com/nejim2001/bookfolio/blob/main/screens/NoteScreen.js): `screens/NoteScreen.js`
- [Add note](https://github.com/nejim2001/bookfolio/blob/main/screens/AddNoteScreen.js): `screens/AddNoteScreen.js`
- [Edit note](https://github.com/nejim2001/bookfolio/blob/main/screens/EditNoteScreen.js): `screens/EditNoteScreen.js`

### External services

- [Firestore setup](https://github.com/nejim2001/bookfolio/blob/main/config/firebase.js): `config/firebase.js`
- **Google Books**
- **Firebase Firestore**

### Other components

- **Reader**

## Connections

- Reader → App providers: opens
- App providers → Auth state: provides state
- App providers → App navigation: renders
- App navigation → Auth state: checks user
- App navigation → Welcome: dispatches
- App navigation → Home: dispatches
- App navigation → Book search: dispatches
- App navigation → Search result: dispatches
- App navigation → Book details: dispatches
- App navigation → Shelf category: dispatches
- App navigation → Note screens: dispatches
- App navigation → Add note: dispatches
- App navigation → Edit note: dispatches
- Book search → Books API: searches
- Book search → Book tile: renders results
- Book tile → App navigation: navigates
- Search result → Books API: adds to shelf
- Books API → Google Books: requests shelf data
- Firestore setup → Firebase Firestore: initializes
