# shoaibsikder/fotabo-hashi architecture

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

- Interactive diagram: https://gitdiagram.com/shoaibsikder/fotabo-hashi
- Repository: https://github.com/shoaibsikder/fotabo-hashi

## Overview

Fotabo-Hashi is a Django REST API for blood donation and donor discovery. The visible entry workflow is an HTTP request routed to API views; the product also exposes account/profile, donor, blood-request, leaderboard, public-content, and administration capabilities. Blood-request services implement request creation and status changes, while shared infrastructure provides storage, caching, row-level security, and health checks. The README gives no further product detail, and several domain views and integrations were not excerpted, so those connections are not inferred.

Main entry points: [`backend/config/settings/base.py`](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/config/settings/base.py) (Application Settings), [`backend/apps/administration`](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/administration) (Administration), [`backend/infrastructure/monitoring/checks.py`](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/monitoring/checks.py) (Dependency Checks), [`backend/apps/content`](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/content) (Public Content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API Surface"]
  node_v1routes["Versioned Routes<br/>[urls.py]"]
  node_healthviews["Health Views<br/>[views.py]"]
  node_errors["API Error Handling<br/>[handlers.py]"]
end

subgraph group_domain["Donation Domain"]
  node_accounts["Accounts"]
  node_profiles["Profiles"]
  node_donors["Donor Discovery"]
  node_bloodviews["Blood Requests API<br/>[views.py]"]
  node_bloodservices["Request Lifecycle<br/>[services.py]"]
  node_bloodmodel[("Request Records<br/>[models.py]")]
  node_leaderboard["Leaderboard"]
  node_audit["Audit Logging"]
end

subgraph group_content["Content Management"]
  node_content["Public Content"]
  node_admin["Administration"]
end

subgraph group_infra["Shared Infrastructure"]
  node_settings["Application Settings<br/>[base.py]"]
  node_rls["Row-Level Security<br/>[context.py]"]
  node_cache["Cache Services<br/>[services.py]"]
  node_invalidation["Cache Invalidation<br/>[invalidation.py]"]
  node_storage["Media Storage<br/>[services.py]"]
  node_storagepaths["Storage Paths<br/>[paths.py]"]
  node_monitorchecks["Dependency Checks<br/>[checks.py]"]
  node_health["Readiness Status<br/>[health.py]"]
end

node_client(("API Client"))

node_client -.->|"sends request"| node_v1routes
node_v1routes -->|"routes to"| node_healthviews
node_healthviews -->|"checks readiness"| node_health
node_settings -->|"installs app"| node_accounts
node_settings -->|"installs app"| node_profiles
node_settings -->|"installs app"| node_donors
node_settings -->|"installs app"| node_bloodviews
node_settings -->|"installs app"| node_leaderboard
node_settings -->|"installs app"| node_content
node_settings -->|"installs app"| node_admin
node_bloodservices -->|"creates and updates"| node_bloodmodel
node_bloodservices -->|"raises business error"| node_errors
node_admin -->|"updates organization content"| node_content
node_admin -->|"invalidates content cache"| node_invalidation
node_invalidation -->|"uses cache service"| node_cache
node_health -->|"runs checks"| node_monitorchecks
node_monitorchecks -->|"checks cache"| node_cache
node_monitorchecks -->|"checks storage"| node_storage
node_content -->|"uses storage paths"| node_storagepaths
node_profiles -->|"uses storage paths"| node_storagepaths
node_accounts -->|"sets admin context"| node_rls
node_audit -->|"sets admin context"| node_rls
node_settings -->|"configures exception handler"| node_errors

click node_v1routes "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/api/v1/urls.py"
click node_healthviews "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/api/v1/views.py"
click node_accounts "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/accounts"
click node_profiles "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/profiles"
click node_donors "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/donors"
click node_bloodviews "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/blood_requests/views.py"
click node_bloodservices "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/blood_requests/services.py"
click node_bloodmodel "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/blood_requests/models.py"
click node_leaderboard "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/leaderboard"
click node_audit "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/audit"
click node_content "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/content"
click node_admin "https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/administration"
click node_settings "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/config/settings/base.py"
click node_rls "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/database/rls/context.py"
click node_cache "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/cache/services.py"
click node_invalidation "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/cache/invalidation.py"
click node_storage "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/storage/services.py"
click node_storagepaths "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/storage/paths.py"
click node_monitorchecks "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/monitoring/checks.py"
click node_health "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/monitoring/health.py"
click node_errors "https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/common/exceptions/handlers.py"

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_v1routes,node_healthviews,node_errors,node_client toneBlue
class node_accounts,node_profiles,node_donors,node_bloodviews,node_bloodservices,node_bloodmodel,node_leaderboard,node_audit toneAmber
class node_content,node_admin toneMint
class node_settings,node_rls,node_cache,node_invalidation,node_storage,node_storagepaths,node_monitorchecks,node_health toneRose
```

## Components

### API Surface

- [Versioned Routes](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/api/v1/urls.py): `backend/api/v1/urls.py`
- [Health Views](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/api/v1/views.py): `backend/api/v1/views.py`
- [API Error Handling](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/common/exceptions/handlers.py): `backend/apps/common/exceptions/handlers.py`

### Donation Domain

- [Accounts](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/accounts): `backend/apps/accounts`
- [Profiles](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/profiles): `backend/apps/profiles`
- [Donor Discovery](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/donors): `backend/apps/donors`
- [Blood Requests API](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/blood_requests/views.py): `backend/apps/blood_requests/views.py`
- [Request Lifecycle](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/blood_requests/services.py): `backend/apps/blood_requests/services.py`
- [Request Records](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/apps/blood_requests/models.py): `backend/apps/blood_requests/models.py`
- [Leaderboard](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/leaderboard): `backend/apps/leaderboard`
- [Audit Logging](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/audit): `backend/apps/audit`

### Content Management

- [Public Content](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/content): `backend/apps/content`
- [Administration](https://github.com/shoaibsikder/fotabo-hashi/tree/main/backend/apps/administration): `backend/apps/administration`

### Shared Infrastructure

- [Application Settings](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/config/settings/base.py): `backend/config/settings/base.py`
- [Row-Level Security](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/database/rls/context.py): `backend/infrastructure/database/rls/context.py`
- [Cache Services](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/cache/services.py): `backend/infrastructure/cache/services.py`
- [Cache Invalidation](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/cache/invalidation.py): `backend/infrastructure/cache/invalidation.py`
- [Media Storage](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/storage/services.py): `backend/infrastructure/storage/services.py`
- [Storage Paths](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/storage/paths.py): `backend/infrastructure/storage/paths.py`
- [Dependency Checks](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/monitoring/checks.py): `backend/infrastructure/monitoring/checks.py`
- [Readiness Status](https://github.com/shoaibsikder/fotabo-hashi/blob/main/backend/infrastructure/monitoring/health.py): `backend/infrastructure/monitoring/health.py`

### Other components

- **API Client**

## Connections

- API Client → Versioned Routes: sends request
- Versioned Routes → Health Views: routes to (evidence: `backend/api/v1/urls.py`)
- Health Views → Readiness Status: checks readiness (evidence: `backend/api/v1/views.py`)
- Application Settings → Accounts: installs app (evidence: `backend/config/settings/base.py`)
- Application Settings → Profiles: installs app (evidence: `backend/config/settings/base.py`)
- Application Settings → Donor Discovery: installs app (evidence: `backend/config/settings/base.py`)
- Application Settings → Blood Requests API: installs app (evidence: `backend/config/settings/base.py`)
- Application Settings → Leaderboard: installs app (evidence: `backend/config/settings/base.py`)
- Application Settings → Public Content: installs app (evidence: `backend/config/settings/base.py`)
- Application Settings → Administration: installs app (evidence: `backend/config/settings/base.py`)
- Request Lifecycle → Request Records: creates and updates (evidence: `backend/apps/blood_requests/services.py`)
- Request Lifecycle → API Error Handling: raises business error (evidence: `backend/apps/blood_requests/services.py`)
- Administration → Public Content: updates organization content (evidence: `backend/apps/administration/services.py`)
- Administration → Cache Invalidation: invalidates content cache (evidence: `backend/apps/administration/services.py`)
- Cache Invalidation → Cache Services: uses cache service (evidence: `backend/infrastructure/cache/invalidation.py`)
- Readiness Status → Dependency Checks: runs checks (evidence: `backend/infrastructure/monitoring/health.py`)
- Dependency Checks → Cache Services: checks cache (evidence: `backend/infrastructure/monitoring/checks.py`)
- Dependency Checks → Media Storage: checks storage (evidence: `backend/infrastructure/monitoring/checks.py`)
- Public Content → Storage Paths: uses storage paths (evidence: `backend/apps/content/models.py`)
- Profiles → Storage Paths: uses storage paths (evidence: `backend/apps/profiles/models.py`)
- Accounts → Row-Level Security: sets admin context (evidence: `backend/apps/accounts/managers.py`)
- Audit Logging → Row-Level Security: sets admin context (evidence: `backend/apps/audit/services.py`)
- Application Settings → API Error Handling: configures exception handler (evidence: `backend/config/settings/base.py`)
