# martinsharma18/bof2 architecture

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

- Interactive diagram: https://gitdiagram.com/martinsharma18/bof2
- Repository: https://github.com/martinsharma18/bof2

## Overview

BOF2 is a Nepal-focused requirements marketplace: companies and individuals publish posts, people respond, and companies can hire applicants and pay claims through an individual wallet. The graph emphasizes the feed-to-application workflow and preserves the documented profiles, invitations, vacancies, messaging, notifications, admin, ads, and installable-app capabilities. Some feature implementations were not sampled; those branches use README evidence rather than implying source inspection.

Main entry points: [`backend/BOF2.Infrastructure/Services/ApplicationService.cs`](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Services/ApplicationService.cs) (Hiring and payments), [`backend/BOF2.Infrastructure/Persistence/AppDbContext.cs`](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Persistence/AppDbContext.cs) (Marketplace database), [`frontend/src/pages/FeedPage.tsx`](https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/FeedPage.tsx) (Feed and posts), [`frontend/src/pages/ProfilePage.tsx`](https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/ProfilePage.tsx) (Profiles and features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["Web app<br/>[App.tsx]"]
  node_feed["Feed and posts<br/>[FeedPage.tsx]"]
  node_applications_ui["Applications and chat"]
  node_wallet_ui["Wallet<br/>[WalletPage.tsx]"]
  node_other_ui["Profiles and features<br/>[ProfilePage.tsx]"]
  node_pwa["Offline and install support<br/>[sw.js]"]
end

subgraph group_api["API and domain"]
  node_auth_api["Authentication API<br/>[AuthController.cs]"]
  node_posts_api["Posts API<br/>[PostsController.cs]"]
  node_applications_api["Applications API"]
  node_admin_api["Admin API<br/>[AdminController.cs]"]
end

subgraph group_services["Marketplace services"]
  node_auth_service["Identity and tokens<br/>[AuthService.cs]"]
  node_post_service["Posts and engagement<br/>[PostService.cs]"]
  node_application_service["Hiring and payments"]
  node_user_service["Profiles<br/>[Users.cs]"]
  node_other_services["Marketplace features<br/>[Services]"]
  node_admin_features["Admin and ads<br/>[Admin.cs]"]
end

subgraph group_engagement["Communication"]
  node_push["Web push<br/>[PushService.cs]"]
end

subgraph group_platform["Platform services"]
  node_database[("Marketplace database<br/>[AppDbContext.cs]")]
  node_file_storage["Image storage<br/>[IFileStorage.cs]"]
end

node_people(("Marketplace users"))
node_external_push{{"Push service"}}

node_people -->|"use"| node_web
node_web -->|"opens"| node_feed
node_feed -->|"loads and submits"| node_posts_api
node_posts_api -.->|"delegates"| node_post_service
node_post_service -->|"reads and writes"| node_database
node_post_service -->|"stores media"| node_file_storage
node_feed -->|"apply"| node_applications_ui
node_applications_ui -->|"manages applications"| node_applications_api
node_applications_api -.->|"delegates"| node_application_service
node_application_service -->|"reads and writes"| node_database
node_application_service -->|"stores claim proof"| node_file_storage
node_application_service -->|"credits payments"| node_wallet_ui
node_people -->|"registers and signs in"| node_auth_api
node_auth_api -.->|"delegates"| node_auth_service
node_auth_service -->|"reads and writes"| node_database
node_people -->|"uses"| node_other_ui
node_other_ui -->|"updates profiles"| node_user_service
node_people -->|"administers"| node_admin_api
node_admin_api -->|"delegates"| node_admin_features
node_people -->|"messages and invites"| node_applications_ui
node_other_ui -->|"uses marketplace features"| node_other_services
node_other_services -.->|"persists feature data"| node_database
node_application_service -->|"queues notifications"| node_push
node_push -.->|"sends notifications"| node_external_push
node_people -->|"installs and uses offline"| node_pwa

click node_web "https://github.com/martinsharma18/bof2/blob/main/frontend/src/app/App.tsx"
click node_feed "https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/FeedPage.tsx"
click node_applications_ui "https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/ApplicationsPage.tsx"
click node_wallet_ui "https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/WalletPage.tsx"
click node_other_ui "https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/ProfilePage.tsx"
click node_auth_api "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/AuthController.cs"
click node_posts_api "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/PostsController.cs"
click node_applications_api "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/ApplicationsController.cs"
click node_admin_api "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/AdminController.cs"
click node_auth_service "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Auth/AuthService.cs"
click node_post_service "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Services/PostService.cs"
click node_application_service "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Services/ApplicationService.cs"
click node_user_service "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Application/Users/Users.cs"
click node_other_services "https://github.com/martinsharma18/bof2/tree/main/backend/BOF2.Infrastructure/Services"
click node_admin_features "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Application/Admin/Admin.cs"
click node_database "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Persistence/AppDbContext.cs"
click node_file_storage "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Application/Common/IFileStorage.cs"
click node_push "https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Push/PushService.cs"
click node_pwa "https://github.com/martinsharma18/bof2/blob/main/frontend/public/sw.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_web,node_feed,node_applications_ui,node_wallet_ui,node_other_ui,node_pwa,node_people toneBlue
class node_auth_api,node_posts_api,node_applications_api,node_admin_api toneAmber
class node_auth_service,node_post_service,node_application_service,node_user_service,node_other_services,node_admin_features toneMint
class node_push toneRose
class node_database,node_file_storage,node_external_push toneIndigo
```

## Components

### Web client

- [Web app](https://github.com/martinsharma18/bof2/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Feed and posts](https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/FeedPage.tsx): `frontend/src/pages/FeedPage.tsx`
- [Applications and chat](https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/ApplicationsPage.tsx): `frontend/src/pages/ApplicationsPage.tsx`
- [Wallet](https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/WalletPage.tsx): `frontend/src/pages/WalletPage.tsx`
- [Profiles and features](https://github.com/martinsharma18/bof2/blob/main/frontend/src/pages/ProfilePage.tsx): `frontend/src/pages/ProfilePage.tsx`
- [Offline and install support](https://github.com/martinsharma18/bof2/blob/main/frontend/public/sw.js): `frontend/public/sw.js`

### API and domain

- [Authentication API](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/AuthController.cs): `backend/BOF2.Api/Controllers/AuthController.cs`
- [Posts API](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/PostsController.cs): `backend/BOF2.Api/Controllers/PostsController.cs`
- [Applications API](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/ApplicationsController.cs): `backend/BOF2.Api/Controllers/ApplicationsController.cs`
- [Admin API](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Api/Controllers/AdminController.cs): `backend/BOF2.Api/Controllers/AdminController.cs`

### Marketplace services

- [Identity and tokens](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Auth/AuthService.cs): `backend/BOF2.Infrastructure/Auth/AuthService.cs`
- [Posts and engagement](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Services/PostService.cs): `backend/BOF2.Infrastructure/Services/PostService.cs`
- [Hiring and payments](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Services/ApplicationService.cs): `backend/BOF2.Infrastructure/Services/ApplicationService.cs`
- [Profiles](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Application/Users/Users.cs): `backend/BOF2.Application/Users/Users.cs`
- [Marketplace features](https://github.com/martinsharma18/bof2/tree/main/backend/BOF2.Infrastructure/Services): `backend/BOF2.Infrastructure/Services`
- [Admin and ads](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Application/Admin/Admin.cs): `backend/BOF2.Application/Admin/Admin.cs`

### Communication

- [Web push](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Push/PushService.cs): `backend/BOF2.Infrastructure/Push/PushService.cs`

### Platform services

- [Marketplace database](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Infrastructure/Persistence/AppDbContext.cs): `backend/BOF2.Infrastructure/Persistence/AppDbContext.cs`
- [Image storage](https://github.com/martinsharma18/bof2/blob/main/backend/BOF2.Application/Common/IFileStorage.cs): `backend/BOF2.Application/Common/IFileStorage.cs`

### Other components

- **Marketplace users**
- **Push service**

## Connections

- Marketplace users → Web app: use (evidence: `README.md`)
- Web app → Feed and posts: opens (evidence: `README.md`)
- Feed and posts → Posts API: loads and submits (evidence: `README.md`)
- Posts API → Posts and engagement: delegates
- Posts and engagement → Marketplace database: reads and writes (evidence: `backend/BOF2.Infrastructure/Services/PostService.cs`)
- Posts and engagement → Image storage: stores media (evidence: `backend/BOF2.Infrastructure/Services/PostService.cs`)
- Feed and posts → Applications and chat: apply (evidence: `README.md`)
- Applications and chat → Applications API: manages applications (evidence: `README.md`)
- Applications API → Hiring and payments: delegates
- Hiring and payments → Marketplace database: reads and writes (evidence: `backend/BOF2.Infrastructure/Services/ApplicationService.cs`)
- Hiring and payments → Image storage: stores claim proof (evidence: `backend/BOF2.Infrastructure/Services/ApplicationService.cs`)
- Hiring and payments → Wallet: credits payments (evidence: `README.md`)
- Marketplace users → Authentication API: registers and signs in (evidence: `README.md`)
- Authentication API → Identity and tokens: delegates
- Identity and tokens → Marketplace database: reads and writes (evidence: `backend/BOF2.Infrastructure/Auth/AuthService.cs`)
- Marketplace users → Profiles and features: uses (evidence: `README.md`)
- Profiles and features → Profiles: updates profiles (evidence: `README.md`)
- Marketplace users → Admin API: administers (evidence: `README.md`)
- Admin API → Admin and ads: delegates (evidence: `backend/BOF2.Api/Controllers/AdminController.cs`)
- Marketplace users → Applications and chat: messages and invites (evidence: `README.md`)
- Profiles and features → Marketplace features: uses marketplace features (evidence: `README.md`)
- Marketplace features → Marketplace database: persists feature data (evidence: `backend/BOF2.Infrastructure/Services/ApplicationService.cs`)
- Hiring and payments → Web push: queues notifications (evidence: `backend/BOF2.Infrastructure/Services/ApplicationService.cs`)
- Web push → Push service: sends notifications
- Marketplace users → Offline and install support: installs and uses offline (evidence: `README.md`)
