# mizanurrahmann/be-bookaholic architecture

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

- Interactive diagram: https://gitdiagram.com/mizanurrahmann/be-bookaholic
- Repository: https://github.com/mizanurrahmann/be-bookaholic

## Overview

Be Bookaholic is a React online bookstore. Users browse category-based book listings and details, add books to a basket, review totals, then enter shipping, payment, and confirmation steps; account, profile, and wishlist features provide supporting flows. The graph preserves the main UI stages and shared state/Firebase layers. Some components were not excerpted, so their documented/import relationships are shown only where the source index or README supports them; unsampled internals are not inferred.

Main entry points: [`src/App.js`](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/App.js) (Router and routes), [`src/firebase/util.js`](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/firebase/util.js) (Firebase clients), [`src/components/order/Shopping.js`](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/Shopping.js) (Order workflow), [`src/components/books/BookList.js`](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookList.js) (Book listings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Router and routes<br/>[App.js]"]
  node_navigation["Navigation<br/>[Navbar.js]"]
  node_announcement["Store announcements<br/>[Announcement.js]"]
  node_footer["Store footer<br/>[Footer.js]"]
  node_service_worker["Offline worker support<br/>[serviceWorker.js]"]
end

subgraph group_catalog["Book catalog"]
  node_catalog_list["Book listings<br/>[BookList.js]"]
  node_category["Category listing"]
  node_book_detail["Book details<br/>[BookDetail.js]"]
  node_book_card["Book card<br/>[Book.js]"]
  node_book_loading["Loading display<br/>[BookLoading.js]"]
end

subgraph group_account["Customer account"]
  node_auth["Authentication views<br/>[Auth.js]"]
  node_login["Login<br/>[Login.js]"]
  node_register["Registration<br/>[Register.js]"]
  node_profile["Customer profile<br/>[Profile.js]"]
  node_wishlist["Wishlist<br/>[Wishlist.js]"]
end

subgraph group_commerce["Basket and ordering"]
  node_checkout["Basket checkout<br/>[Checkout.js]"]
  node_checkout_item["Basket item<br/>[CheckoutItem.js]"]
  node_shopping["Order workflow<br/>[Shopping.js]"]
  node_address["Shipping address<br/>[AddressForm.js]"]
  node_payment["Payment selection<br/>[PaymentForm.js]"]
  node_confirmation["Order confirmation<br/>[Confirmation.js]"]
end

subgraph group_platform["State and Firebase"]
  node_state["Shared state<br/>[StateProvider.js]"]
  node_reducer["State reducer<br/>[Reducer.js]"]
  node_firebase["Firebase clients<br/>[util.js]"]
end

node_shopper(("Shopper"))
node_firestore[("Cloud Firestore")]
node_firebase_auth["Firebase Auth"]
node_firebase_storage["Firebase Storage"]

node_shopper -->|"uses"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_announcement
node_app -->|"routes to"| node_catalog_list
node_app -->|"routes to"| node_category
node_app -->|"routes to"| node_book_detail
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_wishlist
node_app -->|"routes to"| node_shopping
node_app -->|"renders"| node_footer
node_catalog_list -->|"renders"| node_book_card
node_catalog_list -->|"renders"| node_book_loading
node_category -->|"renders"| node_book_card
node_category -->|"renders"| node_book_loading
node_book_detail -->|"renders"| node_book_loading
node_catalog_list -->|"reads books"| node_firestore
node_auth -->|"selects"| node_login
node_auth -->|"selects"| node_register
node_login -->|"uses auth"| node_firebase
node_register -->|"uses auth"| node_firebase
node_profile -->|"reads and writes"| node_firestore
node_profile -->|"uploads image"| node_firebase_storage
node_wishlist -->|"uses state"| node_state
node_checkout -->|"renders"| node_checkout_item
node_checkout -->|"updates basket"| node_state
node_checkout -->|"links to"| node_shopping
node_shopping -->|"renders step"| node_address
node_shopping -->|"renders step"| node_payment
node_shopping -->|"renders step"| node_confirmation
node_app -->|"uses state"| node_state
node_state -->|"runs reducer"| node_reducer
node_app -->|"uses clients"| node_firebase
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_firebase_auth
node_firebase -->|"initializes"| node_firebase_storage
node_app -->|"imports support"| node_service_worker

click node_app "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/App.js"
click node_navigation "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/navbar/Navbar.js"
click node_announcement "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/banner/Announcement.js"
click node_footer "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/Footer/Footer.js"
click node_catalog_list "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookList.js"
click node_category "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookCategoryView.js"
click node_book_detail "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookDetail.js"
click node_book_card "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/Book.js"
click node_book_loading "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookLoading.js"
click node_auth "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/auth/Auth.js"
click node_login "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/auth/Login.js"
click node_register "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/auth/Register.js"
click node_profile "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/profile/Profile.js"
click node_wishlist "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/wishlist/Wishlist.js"
click node_checkout "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/checkout/Checkout.js"
click node_checkout_item "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/checkout/CheckoutItem.js"
click node_shopping "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/Shopping.js"
click node_address "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/AddressForm.js"
click node_payment "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/PaymentForm.js"
click node_confirmation "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/Confirmation.js"
click node_state "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/Context/StateProvider.js"
click node_reducer "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/Context/Reducer.js"
click node_firebase "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/firebase/util.js"
click node_service_worker "https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/serviceWorker.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_navigation,node_announcement,node_footer,node_service_worker toneBlue
class node_catalog_list,node_category,node_book_detail,node_book_card,node_book_loading,node_firestore,node_firebase_storage toneAmber
class node_auth,node_login,node_register,node_profile,node_wishlist toneMint
class node_checkout,node_checkout_item,node_shopping,node_address,node_payment,node_confirmation toneRose
class node_state,node_reducer,node_firebase,node_shopper,node_firebase_auth toneIndigo
```

## Components

### Application shell

- [Router and routes](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/App.js): `src/App.js`
- [Navigation](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/navbar/Navbar.js): `src/components/navbar/Navbar.js`
- [Store announcements](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/banner/Announcement.js): `src/components/banner/Announcement.js`
- [Store footer](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/Footer/Footer.js): `src/components/Footer/Footer.js`
- [Offline worker support](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/serviceWorker.js): `src/serviceWorker.js`

### Book catalog

- [Book listings](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookList.js): `src/components/books/BookList.js`
- [Category listing](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookCategoryView.js): `src/components/books/BookCategoryView.js`
- [Book details](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookDetail.js): `src/components/books/BookDetail.js`
- [Book card](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/Book.js): `src/components/books/Book.js`
- [Loading display](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/books/BookLoading.js): `src/components/books/BookLoading.js`

### Customer account

- [Authentication views](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/auth/Auth.js): `src/components/auth/Auth.js`
- [Login](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/auth/Login.js): `src/components/auth/Login.js`
- [Registration](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/auth/Register.js): `src/components/auth/Register.js`
- [Customer profile](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/profile/Profile.js): `src/components/profile/Profile.js`
- [Wishlist](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/wishlist/Wishlist.js): `src/components/wishlist/Wishlist.js`

### Basket and ordering

- [Basket checkout](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/checkout/Checkout.js): `src/components/checkout/Checkout.js`
- [Basket item](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/checkout/CheckoutItem.js): `src/components/checkout/CheckoutItem.js`
- [Order workflow](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/Shopping.js): `src/components/order/Shopping.js`
- [Shipping address](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/AddressForm.js): `src/components/order/AddressForm.js`
- [Payment selection](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/PaymentForm.js): `src/components/order/PaymentForm.js`
- [Order confirmation](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/order/Confirmation.js): `src/components/order/Confirmation.js`

### State and Firebase

- [Shared state](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/Context/StateProvider.js): `src/components/Context/StateProvider.js`
- [State reducer](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/components/Context/Reducer.js): `src/components/Context/Reducer.js`
- [Firebase clients](https://github.com/mizanurrahmann/be-bookaholic/blob/master/src/firebase/util.js): `src/firebase/util.js`

### Other components

- **Shopper**
- **Cloud Firestore**
- **Firebase Auth**
- **Firebase Storage**

## Connections

- Shopper → Router and routes: uses (evidence: `src/App.js`)
- Router and routes → Navigation: renders (evidence: `src/App.js`)
- Router and routes → Store announcements: routes to (evidence: `src/App.js`)
- Router and routes → Book listings: routes to (evidence: `src/App.js`)
- Router and routes → Category listing: routes to (evidence: `src/App.js`)
- Router and routes → Book details: routes to (evidence: `src/App.js`)
- Router and routes → Basket checkout: routes to (evidence: `src/App.js`)
- Router and routes → Authentication views: routes to (evidence: `src/App.js`)
- Router and routes → Customer profile: routes to (evidence: `src/App.js`)
- Router and routes → Wishlist: routes to (evidence: `src/App.js`)
- Router and routes → Order workflow: routes to (evidence: `src/App.js`)
- Router and routes → Store footer: renders (evidence: `src/App.js`)
- Book listings → Book card: renders (evidence: `src/components/books/BookList.js`)
- Book listings → Loading display: renders (evidence: `src/components/books/BookList.js`)
- Category listing → Book card: renders (evidence: `src/components/books/BookCategoryView.js`)
- Category listing → Loading display: renders (evidence: `src/components/books/BookCategoryView.js`)
- Book details → Loading display: renders (evidence: `src/components/books/BookDetail.js`)
- Book listings → Cloud Firestore: reads books (evidence: `src/components/books/BookList.js`)
- Authentication views → Login: selects (evidence: `src/components/auth/Auth.js`)
- Authentication views → Registration: selects (evidence: `src/components/auth/Auth.js`)
- Login → Firebase clients: uses auth (evidence: `src/components/auth/Login.js`)
- Registration → Firebase clients: uses auth (evidence: `src/components/auth/Register.js`)
- Customer profile → Cloud Firestore: reads and writes (evidence: `src/components/profile/Profile.js`)
- Customer profile → Firebase Storage: uploads image (evidence: `src/components/profile/Profile.js`)
- Wishlist → Shared state: uses state (evidence: `src/components/wishlist/Wishlist.js`)
- Basket checkout → Basket item: renders (evidence: `src/components/checkout/Checkout.js`)
- Basket checkout → Shared state: updates basket (evidence: `src/components/checkout/Checkout.js`)
- Basket checkout → Order workflow: links to (evidence: `src/components/checkout/Checkout.js`)
- Order workflow → Shipping address: renders step (evidence: `src/components/order/Shopping.js`)
- Order workflow → Payment selection: renders step (evidence: `src/components/order/Shopping.js`)
- Order workflow → Order confirmation: renders step (evidence: `src/components/order/Shopping.js`)
- Router and routes → Shared state: uses state (evidence: `src/App.js`)
- Shared state → State reducer: runs reducer (evidence: `src/index.js`)
- Router and routes → Firebase clients: uses clients (evidence: `src/App.js`)
- Firebase clients → Cloud Firestore: initializes (evidence: `src/firebase/util.js`)
- Firebase clients → Firebase Auth: initializes (evidence: `src/firebase/util.js`)
- Firebase clients → Firebase Storage: initializes (evidence: `src/firebase/util.js`)
- Router and routes → Offline worker support: imports support (evidence: `src/index.js`)
