# engremran07/mobofirm architecture

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

- Interactive diagram: https://gitdiagram.com/engremran07/mobofirm
- Repository: https://github.com/engremran07/mobofirm

## Overview

Mobofirm is a Django platform centered on device identity and a firmware catalogue, with gated downloads and external file sources. The documented user journey is entering the public site, finding firmware, and accessing a download subject to access rules; storage tracks firmware file locations. Separate product branches cover editorial content, ads, commerce/rewards, and SEO. The graph preserves major documented capabilities and indexed core modules; relationships are limited to README statements and sampled/indexed evidence, so unsampled integrations are not expanded.

Main entry points: [`app/urls.py`](https://github.com/engremran07/mobofirm/blob/main/app/urls.py) (Django routes), [`apps/ads/services/rotation/engine.py`](https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/rotation/engine.py) (Ad selection), [`apps/storage/services.py`](https://github.com/engremran07/mobofirm/blob/main/apps/storage/services.py) (File locations), [`apps/core/search/engine.py`](https://github.com/engremran07/mobofirm/blob/main/apps/core/search/engine.py) (Site search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Platform entry"]
  node_django["Django routes<br/>[urls.py]"]
  node_users[("User profiles<br/>[models.py]")]
  node_devices["Device identity<br/>[services.py]"]
end

subgraph group_firmware["Firmware access"]
  node_firmware_catalog["Firmware catalogue<br/>[catalog.py]"]
  node_firmware_access["Access and downloads"]
  node_firmware_data[("Firmware records<br/>[models.py]")]
  node_storage[("File locations<br/>[services.py]")]
end

subgraph group_engagement["Content and ads"]
  node_blog[("Blog and editorial<br/>[models.py]")]
  node_comments[("Comments<br/>[models.py]")]
  node_ads_models[("Ad campaigns<br/>[models.py]")]
  node_ads_serving["Ad selection<br/>[engine.py]"]
  node_ads_targeting["Ad targeting<br/>[engine.py]"]
  node_ads_scan["Placement discovery<br/>[scanner.py]"]
  node_seo[("SEO workflows<br/>[models.py]")]
end

subgraph group_commerce["Commerce and search"]
  node_shop["Shop and access<br/>[services.py]"]
  node_wallet[("Wallet ledger<br/>[services.py]")]
end

subgraph group_shared["Shared services"]
  node_search["Site search<br/>[engine.py]"]
  node_consent["Consent service<br/>[services.py]"]
  node_event_bus["Domain event bus<br/>[bus.py]"]
  node_app_service["App registry<br/>[app_service.py]"]
  node_feature_flags["Feature flags<br/>[feature_flags.py]"]
  node_ai_client["AI client<br/>[ai_client.py]"]
  node_core_models[("Core records<br/>[models.py]")]
  node_logging["Structured logging<br/>[logging.py]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens routes"| node_django
node_django -->|"mounts"| node_users
node_django -->|"mounts"| node_devices
node_django -->|"mounts"| node_firmware_catalog
node_django -->|"mounts"| node_blog
node_django -->|"mounts"| node_comments
node_django -->|"mounts"| node_search
node_firmware_access -.->|"checks access"| node_firmware_data
node_firmware_access -.->|"resolves files"| node_storage
node_search -->|"queries providers"| node_search
node_ads_serving -->|"checks campaigns"| node_ads_targeting
node_ads_serving -->|"selects creative"| node_ads_models
node_ads_scan -->|"records discoveries"| node_ads_models
node_ads_serving -->|"checks enablement"| node_feature_flags
node_ads_targeting -->|"checks enablement"| node_feature_flags
node_storage -->|"uses managers"| node_core_models
node_wallet -->|"subscribes events"| node_event_bus
node_wallet -->|"uses registry"| node_app_service
node_ai_client -.->|"logs events"| node_logging
node_app_service -->|"reads records"| node_core_models
node_seo -->|"uses AI"| node_ai_client
node_ads_scan -->|"scans templates"| node_blog
node_storage -->|"tracks locations"| node_firmware_data

click node_django "https://github.com/engremran07/mobofirm/blob/main/app/urls.py"
click node_users "https://github.com/engremran07/mobofirm/blob/main/apps/users/models.py"
click node_devices "https://github.com/engremran07/mobofirm/blob/main/apps/devices/services.py"
click node_firmware_catalog "https://github.com/engremran07/mobofirm/blob/main/apps/firmwares/catalog.py"
click node_firmware_access "https://github.com/engremran07/mobofirm/blob/main/apps/firmwares/download_service.py"
click node_firmware_data "https://github.com/engremran07/mobofirm/blob/main/apps/firmwares/models.py"
click node_storage "https://github.com/engremran07/mobofirm/blob/main/apps/storage/services.py"
click node_search "https://github.com/engremran07/mobofirm/blob/main/apps/core/search/engine.py"
click node_blog "https://github.com/engremran07/mobofirm/blob/main/apps/blog/models.py"
click node_comments "https://github.com/engremran07/mobofirm/blob/main/apps/comments/models.py"
click node_ads_models "https://github.com/engremran07/mobofirm/blob/main/apps/ads/models.py"
click node_ads_serving "https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/rotation/engine.py"
click node_ads_targeting "https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/targeting/engine.py"
click node_ads_scan "https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/scanner.py"
click node_consent "https://github.com/engremran07/mobofirm/blob/main/apps/consent/services.py"
click node_seo "https://github.com/engremran07/mobofirm/blob/main/apps/seo/models.py"
click node_shop "https://github.com/engremran07/mobofirm/blob/main/apps/shop/services.py"
click node_wallet "https://github.com/engremran07/mobofirm/blob/main/apps/wallet/services.py"
click node_event_bus "https://github.com/engremran07/mobofirm/blob/main/apps/core/events/bus.py"
click node_app_service "https://github.com/engremran07/mobofirm/blob/main/apps/core/app_service.py"
click node_feature_flags "https://github.com/engremran07/mobofirm/blob/main/apps/core/utils/feature_flags.py"
click node_ai_client "https://github.com/engremran07/mobofirm/blob/main/apps/core/ai_client.py"
click node_core_models "https://github.com/engremran07/mobofirm/blob/main/apps/core/models.py"
click node_logging "https://github.com/engremran07/mobofirm/blob/main/apps/core/utils/logging.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_django,node_users,node_devices toneBlue
class node_firmware_catalog,node_firmware_access,node_firmware_data,node_storage toneAmber
class node_blog,node_comments,node_ads_models,node_ads_serving,node_ads_targeting,node_ads_scan,node_seo toneMint
class node_shop,node_wallet toneRose
class node_search,node_consent,node_event_bus,node_app_service,node_feature_flags,node_ai_client,node_core_models,node_logging,node_visitor toneIndigo
```

## Components

### Platform entry

- [Django routes](https://github.com/engremran07/mobofirm/blob/main/app/urls.py): `app/urls.py`
- [User profiles](https://github.com/engremran07/mobofirm/blob/main/apps/users/models.py): `apps/users/models.py`
- [Device identity](https://github.com/engremran07/mobofirm/blob/main/apps/devices/services.py): `apps/devices/services.py`

### Firmware access

- [Firmware catalogue](https://github.com/engremran07/mobofirm/blob/main/apps/firmwares/catalog.py): `apps/firmwares/catalog.py`
- [Access and downloads](https://github.com/engremran07/mobofirm/blob/main/apps/firmwares/download_service.py): `apps/firmwares/download_service.py`
- [Firmware records](https://github.com/engremran07/mobofirm/blob/main/apps/firmwares/models.py): `apps/firmwares/models.py`
- [File locations](https://github.com/engremran07/mobofirm/blob/main/apps/storage/services.py): `apps/storage/services.py`

### Content and ads

- [Blog and editorial](https://github.com/engremran07/mobofirm/blob/main/apps/blog/models.py): `apps/blog/models.py`
- [Comments](https://github.com/engremran07/mobofirm/blob/main/apps/comments/models.py): `apps/comments/models.py`
- [Ad campaigns](https://github.com/engremran07/mobofirm/blob/main/apps/ads/models.py): `apps/ads/models.py`
- [Ad selection](https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/rotation/engine.py): `apps/ads/services/rotation/engine.py`
- [Ad targeting](https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/targeting/engine.py): `apps/ads/services/targeting/engine.py`
- [Placement discovery](https://github.com/engremran07/mobofirm/blob/main/apps/ads/services/scanner.py): `apps/ads/services/scanner.py`
- [SEO workflows](https://github.com/engremran07/mobofirm/blob/main/apps/seo/models.py): `apps/seo/models.py`

### Commerce and search

- [Shop and access](https://github.com/engremran07/mobofirm/blob/main/apps/shop/services.py): `apps/shop/services.py`
- [Wallet ledger](https://github.com/engremran07/mobofirm/blob/main/apps/wallet/services.py): `apps/wallet/services.py`

### Shared services

- [Site search](https://github.com/engremran07/mobofirm/blob/main/apps/core/search/engine.py): `apps/core/search/engine.py`
- [Consent service](https://github.com/engremran07/mobofirm/blob/main/apps/consent/services.py): `apps/consent/services.py`
- [Domain event bus](https://github.com/engremran07/mobofirm/blob/main/apps/core/events/bus.py): `apps/core/events/bus.py`
- [App registry](https://github.com/engremran07/mobofirm/blob/main/apps/core/app_service.py): `apps/core/app_service.py`
- [Feature flags](https://github.com/engremran07/mobofirm/blob/main/apps/core/utils/feature_flags.py): `apps/core/utils/feature_flags.py`
- [AI client](https://github.com/engremran07/mobofirm/blob/main/apps/core/ai_client.py): `apps/core/ai_client.py`
- [Core records](https://github.com/engremran07/mobofirm/blob/main/apps/core/models.py): `apps/core/models.py`
- [Structured logging](https://github.com/engremran07/mobofirm/blob/main/apps/core/utils/logging.py): `apps/core/utils/logging.py`

### Other components

- **Site visitor**

## Connections

- Site visitor → Django routes: opens routes
- Django routes → User profiles: mounts
- Django routes → Device identity: mounts
- Django routes → Firmware catalogue: mounts
- Django routes → Blog and editorial: mounts
- Django routes → Comments: mounts
- Django routes → Site search: mounts
- Access and downloads → Firmware records: checks access
- Access and downloads → File locations: resolves files
- Site search → Site search: queries providers (evidence: `apps/core/search/engine.py`)
- Ad selection → Ad targeting: checks campaigns (evidence: `apps/ads/services/rotation/engine.py`)
- Ad selection → Ad campaigns: selects creative (evidence: `apps/ads/services/rotation/engine.py`)
- Placement discovery → Ad campaigns: records discoveries (evidence: `apps/ads/manager_views.py`)
- Ad selection → Feature flags: checks enablement (evidence: `apps/ads/services/rotation/engine.py`)
- Ad targeting → Feature flags: checks enablement (evidence: `apps/ads/services/targeting/engine.py`)
- File locations → Core records: uses managers (evidence: `apps/storage/services.py`)
- Wallet ledger → Domain event bus: subscribes events (evidence: `apps/wallet/apps.py`)
- Wallet ledger → App registry: uses registry (evidence: `apps/wallet/services.py`)
- AI client → Structured logging: logs events
- App registry → Core records: reads records (evidence: `apps/core/app_service.py`)
- SEO workflows → AI client: uses AI
- Placement discovery → Blog and editorial: scans templates (evidence: `apps/ads/services/scanner.py`)
- File locations → Firmware records: tracks locations (evidence: `apps/storage/services.py`)
