# emirhanbayrak/emirhan-repo architecture

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

- Interactive diagram: https://gitdiagram.com/emirhanbayrak/emirhan-repo
- Repository: https://github.com/emirhanbayrak/emirhan-repo

## Overview

This is a personal book-library tracker: users add books, organize and filter their collection, update reading progress, review statistics, and ask an AI librarian questions grounded in their library. The main application coordinates these workflows and stores the user name and books in browser local storage. Adding supports Gemini-assisted book search and CSV/XML bulk import; book details support cover search. The README only describes running the app, so these capabilities are inferred from the sampled source; wiring for unsampled components is included only where App.tsx demonstrates it.

Main entry points: [`App.tsx`](https://github.com/emirhanbayrak/emirhan-repo/blob/main/App.tsx) (Library app), [`services/geminiService.ts`](https://github.com/emirhanbayrak/emirhan-repo/blob/main/services/geminiService.ts) (Gemini service), [`components/BookDetailModal.tsx`](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookDetailModal.tsx) (Book details), [`components/AddBookModal.tsx`](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/AddBookModal.tsx) (Add books)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_library["Library workflow"]
  node_app["Library app<br/>[App.tsx]"]
  node_storage[("Browser storage")]
  node_catalog["Book catalog<br/>[BookCard.tsx]"]
  node_filters["Search filters<br/>[App.tsx]"]
  node_stats["Reading stats<br/>[StatsPanel.tsx]"]
end

subgraph group_bookops["Book operations"]
  node_detail["Book details"]
  node_progress["Progress display<br/>[ProgressBar.tsx]"]
  node_addmodal["Add books<br/>[AddBookModal.tsx]"]
  node_bulkimport["Bulk import<br/>[AddBookModal.tsx]"]
end

subgraph group_assistant["AI services"]
  node_chat["Bookworm chat<br/>[BookwormChat.tsx]"]
  node_geminiservice["Gemini service<br/>[geminiService.ts]"]
end

subgraph group_model["Domain model"]
  node_types["Book data types<br/>[types.ts]"]
end

node_reader(("Reader"))
node_gemini{{"Google Gemini"}}

node_reader -->|"uses"| node_app
node_app -->|"reads and writes"| node_storage
node_app -->|"renders"| node_catalog
node_app -->|"filters books"| node_filters
node_app -->|"supplies books"| node_stats
node_app -->|"opens and updates"| node_detail
node_app -->|"opens and receives additions"| node_addmodal
node_app -->|"opens with library"| node_chat
node_catalog -->|"selects book"| node_detail
node_detail -->|"renders progress"| node_progress
node_addmodal -->|"searches books"| node_geminiservice
node_addmodal -->|"parses CSV/XML"| node_bulkimport
node_bulkimport -->|"submits books"| node_app
node_detail -->|"searches covers"| node_geminiservice
node_chat -->|"asks with library"| node_geminiservice
node_geminiservice -->|"generates content"| node_gemini
node_app -->|"uses book model"| node_types
node_geminiservice -->|"uses book types"| node_types

click node_app "https://github.com/emirhanbayrak/emirhan-repo/blob/main/App.tsx"
click node_catalog "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookCard.tsx"
click node_filters "https://github.com/emirhanbayrak/emirhan-repo/blob/main/App.tsx"
click node_stats "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/StatsPanel.tsx"
click node_detail "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookDetailModal.tsx"
click node_progress "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/ProgressBar.tsx"
click node_addmodal "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/AddBookModal.tsx"
click node_bulkimport "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/AddBookModal.tsx"
click node_chat "https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookwormChat.tsx"
click node_geminiservice "https://github.com/emirhanbayrak/emirhan-repo/blob/main/services/geminiService.ts"
click node_types "https://github.com/emirhanbayrak/emirhan-repo/blob/main/types.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_storage,node_catalog,node_filters,node_stats toneBlue
class node_detail,node_progress,node_addmodal,node_bulkimport toneAmber
class node_chat,node_geminiservice toneMint
class node_types toneRose
class node_reader,node_gemini toneIndigo
```

## Components

### Library workflow

- [Library app](https://github.com/emirhanbayrak/emirhan-repo/blob/main/App.tsx): `App.tsx`
- **Browser storage**
- [Book catalog](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookCard.tsx): `components/BookCard.tsx`
- [Search filters](https://github.com/emirhanbayrak/emirhan-repo/blob/main/App.tsx): `App.tsx`
- [Reading stats](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/StatsPanel.tsx): `components/StatsPanel.tsx`

### Book operations

- [Book details](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookDetailModal.tsx): `components/BookDetailModal.tsx`
- [Progress display](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/ProgressBar.tsx): `components/ProgressBar.tsx`
- [Add books](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/AddBookModal.tsx): `components/AddBookModal.tsx`
- [Bulk import](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/AddBookModal.tsx): `components/AddBookModal.tsx`

### AI services

- [Bookworm chat](https://github.com/emirhanbayrak/emirhan-repo/blob/main/components/BookwormChat.tsx): `components/BookwormChat.tsx`
- [Gemini service](https://github.com/emirhanbayrak/emirhan-repo/blob/main/services/geminiService.ts): `services/geminiService.ts`

### Domain model

- [Book data types](https://github.com/emirhanbayrak/emirhan-repo/blob/main/types.ts): `types.ts`

### Other components

- **Reader**
- **Google Gemini**

## Connections

- Reader → Library app: uses
- Library app → Browser storage: reads and writes
- Library app → Book catalog: renders
- Library app → Search filters: filters books
- Library app → Reading stats: supplies books
- Library app → Book details: opens and updates
- Library app → Add books: opens and receives additions
- Library app → Bookworm chat: opens with library
- Book catalog → Book details: selects book
- Book details → Progress display: renders progress
- Add books → Gemini service: searches books
- Add books → Bulk import: parses CSV/XML
- Bulk import → Library app: submits books
- Book details → Gemini service: searches covers
- Bookworm chat → Gemini service: asks with library
- Gemini service → Google Gemini: generates content
- Library app → Book data types: uses book model
- Gemini service → Book data types: uses book types
