# dawoodibohras/esahifa architecture

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

- Interactive diagram: https://gitdiagram.com/dawoodibohras/esahifa
- Repository: https://github.com/dawoodibohras/esahifa

## Overview

eSahifa’s sampled runtime is primarily a console downloader: it iterates through book numbers, fetches thumbnails and page images, and saves them into per-book directories. A separate packaged web-app error script displays selected query parameters in the page. The source excerpts support these flows; the repository provides no README or sampled implementation of the broader web app, so its other capabilities and connections are not inferred.

Main entry points: [`Source/eSahifa.Books.Downloader/Program.cs`](https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs) (Book retrieval), [`Source/eSahifa.UI.WebApp/msapp-error.js`](https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.UI.WebApp/msapp-error.js) (Error page handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_book_download["Book downloads"]
  node_main["Download entry point<br/>[Program.cs]"]
  node_book_fetch["Book retrieval<br/>[Program.cs]"]
  node_file_transfer["HTTP file transfer<br/>[Program.cs]"]
  node_book_service["eSahifa book service"]
  node_output_files["Book image files"]
end

subgraph group_web_app["Web app error display"]
  node_error_script["Error page handler<br/>[msapp-error.js]"]
  node_page_dom["Page DOM"]
end

node_user(("Downloader user"))
node_browser(("Web browser"))

node_user -->|"starts"| node_main
node_main -->|"calls"| node_book_fetch
node_book_fetch -->|"calls"| node_file_transfer
node_file_transfer -->|"requests files"| node_book_service
node_file_transfer -->|"writes images"| node_output_files
node_book_fetch -->|"checks files"| node_output_files
node_error_script -->|"updates text"| node_page_dom

click node_main "https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs"
click node_book_fetch "https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs"
click node_file_transfer "https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs"
click node_error_script "https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.UI.WebApp/msapp-error.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_main,node_book_fetch,node_file_transfer,node_book_service,node_output_files,node_user,node_browser toneBlue
class node_error_script,node_page_dom toneAmber
```

## Components

### Book downloads

- [Download entry point](https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs): `Source/eSahifa.Books.Downloader/Program.cs`
- [Book retrieval](https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs): `Source/eSahifa.Books.Downloader/Program.cs`
- [HTTP file transfer](https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.Books.Downloader/Program.cs): `Source/eSahifa.Books.Downloader/Program.cs`
- **eSahifa book service**
- **Book image files**

### Web app error display

- [Error page handler](https://github.com/dawoodibohras/esahifa/blob/master/Source/eSahifa.UI.WebApp/msapp-error.js): `Source/eSahifa.UI.WebApp/msapp-error.js`
- **Page DOM**

### Other components

- **Downloader user**
- **Web browser**

## Connections

- Downloader user → Download entry point: starts (evidence: `Source/eSahifa.Books.Downloader/Program.cs`)
- Download entry point → Book retrieval: calls (evidence: `Source/eSahifa.Books.Downloader/Program.cs`)
- Book retrieval → HTTP file transfer: calls (evidence: `Source/eSahifa.Books.Downloader/Program.cs`)
- HTTP file transfer → eSahifa book service: requests files (evidence: `Source/eSahifa.Books.Downloader/Program.cs`)
- HTTP file transfer → Book image files: writes images (evidence: `Source/eSahifa.Books.Downloader/Program.cs`)
- Book retrieval → Book image files: checks files (evidence: `Source/eSahifa.Books.Downloader/Program.cs`)
- Error page handler → Page DOM: updates text (evidence: `Source/eSahifa.UI.WebApp/msapp-error.js`)
