# lymonda/g-19-dawwarha architecture

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

- Interactive diagram: https://gitdiagram.com/lymonda/g-19-dawwarha
- Repository: https://github.com/lymonda/g-19-dawwarha

## Overview

DAWWARHA is a bilingual resource-redistribution platform: providers list surplus, people and verified organizations submit needs, and the platform supports matching, verified handovers, reporting, and administrative oversight. The Angular client presents public and authenticated workflows; the Express API routes requests into domain controllers and lifecycle services backed by MongoDB. README documentation establishes the product capabilities, while sampled source confirms application routing, resource/request handling, authentication, and selected service calls. Other feature links are documented capabilities or inferred integrations, so they are marked dashed where source evidence was not sampled.

Main entry points: [`backend/src/app.js`](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/app.js) (API routes), [`frontend/src/app/app.component.ts`](https://github.com/lymonda/g-19-dawwarha/blob/main/frontend/src/app/app.component.ts) (Angular application), [`backend/src/controllers/requests.controller.js`](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/controllers/requests.controller.js) (Request lifecycle), [`backend/src/services/organizationService.js`](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/organizationService.js) (Organization verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_angular["Angular application<br/>[app.component.ts]"]
  node_resource_ui["Resource listings"]
  node_request_ui["Request workflows"]
  node_match_ui["Match views"]
  node_admin_ui["Admin console"]
  node_auth_ui["Sign-in<br/>[auth.service.ts]"]
end

subgraph group_api["API and access"]
  node_api_routes["API routes<br/>[app.js]"]
  node_auth_service["Authentication<br/>[authService.js]"]
  node_mongo[("MongoDB<br/>[database.js]")]
end

subgraph group_exchange["Resource exchange"]
  node_resource_domain["Resource lifecycle"]
  node_request_domain["Request lifecycle"]
  node_matching["Needs matching<br/>[matchingService.js]"]
  node_handover["Handover verification<br/>[handoverService.js]"]
  node_contributions["Contributions and impact"]
end

subgraph group_trust["Trust and oversight"]
  node_organizations["Organization verification"]
  node_reports["Reports<br/>[reportService.js]"]
  node_admin_analytics["Admin analytics"]
end

node_people(("Platform users"))

node_people -->|"use"| node_angular
node_angular -.->|"authenticate through"| node_auth_ui
node_angular -.->|"browse and list"| node_resource_ui
node_angular -.->|"submit needs"| node_request_ui
node_angular -.->|"review matches"| node_match_ui
node_angular -.->|"administer"| node_admin_ui
node_auth_ui -.->|"call API"| node_api_routes
node_resource_ui -.->|"call API"| node_api_routes
node_request_ui -.->|"call API"| node_api_routes
node_match_ui -.->|"call API"| node_api_routes
node_admin_ui -.->|"call API"| node_api_routes
node_api_routes -->|"route auth"| node_auth_service
node_api_routes -->|"route resources"| node_resource_domain
node_api_routes -->|"route requests"| node_request_domain
node_api_routes -->|"route matches"| node_matching
node_api_routes -->|"route transactions"| node_handover
node_api_routes -->|"route contributions"| node_contributions
node_api_routes -->|"route organizations"| node_organizations
node_api_routes -->|"route reports"| node_reports
node_api_routes -->|"route analytics"| node_admin_analytics
node_resource_domain -->|"read and write"| node_mongo
node_request_domain -->|"read and write"| node_mongo
node_request_domain -.->|"check organization"| node_organizations
node_people -.->|"register organization"| node_organizations
node_people -.->|"report activity"| node_reports

click node_angular "https://github.com/lymonda/g-19-dawwarha/blob/main/frontend/src/app/app.component.ts"
click node_resource_ui "https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/resources"
click node_request_ui "https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/requests"
click node_match_ui "https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/matches"
click node_admin_ui "https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/admin"
click node_auth_ui "https://github.com/lymonda/g-19-dawwarha/blob/main/frontend/src/app/core/auth/auth.service.ts"
click node_api_routes "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/app.js"
click node_auth_service "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/authService.js"
click node_resource_domain "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/controllers/resources.controller.js"
click node_request_domain "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/controllers/requests.controller.js"
click node_matching "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/matchingService.js"
click node_handover "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/handoverService.js"
click node_contributions "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/contributionService.js"
click node_organizations "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/organizationService.js"
click node_reports "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/reportService.js"
click node_admin_analytics "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/adminAnalyticsService.js"
click node_mongo "https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/config/database.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_angular,node_resource_ui,node_request_ui,node_match_ui,node_admin_ui,node_auth_ui,node_people toneBlue
class node_api_routes,node_auth_service,node_mongo toneAmber
class node_resource_domain,node_request_domain,node_matching,node_handover,node_contributions toneMint
class node_organizations,node_reports,node_admin_analytics toneRose
```

## Components

### Web client

- [Angular application](https://github.com/lymonda/g-19-dawwarha/blob/main/frontend/src/app/app.component.ts): `frontend/src/app/app.component.ts`
- [Resource listings](https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/resources): `frontend/src/app/features/resources`
- [Request workflows](https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/requests): `frontend/src/app/features/requests`
- [Match views](https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/matches): `frontend/src/app/features/matches`
- [Admin console](https://github.com/lymonda/g-19-dawwarha/tree/main/frontend/src/app/features/admin): `frontend/src/app/features/admin`
- [Sign-in](https://github.com/lymonda/g-19-dawwarha/blob/main/frontend/src/app/core/auth/auth.service.ts): `frontend/src/app/core/auth/auth.service.ts`

### API and access

- [API routes](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/app.js): `backend/src/app.js`
- [Authentication](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/authService.js): `backend/src/services/authService.js`
- [MongoDB](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/config/database.js): `backend/src/config/database.js`

### Resource exchange

- [Resource lifecycle](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/controllers/resources.controller.js): `backend/src/controllers/resources.controller.js`
- [Request lifecycle](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/controllers/requests.controller.js): `backend/src/controllers/requests.controller.js`
- [Needs matching](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/matchingService.js): `backend/src/services/matchingService.js`
- [Handover verification](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/handoverService.js): `backend/src/services/handoverService.js`
- [Contributions and impact](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/contributionService.js): `backend/src/services/contributionService.js`

### Trust and oversight

- [Organization verification](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/organizationService.js): `backend/src/services/organizationService.js`
- [Reports](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/reportService.js): `backend/src/services/reportService.js`
- [Admin analytics](https://github.com/lymonda/g-19-dawwarha/blob/main/backend/src/services/adminAnalyticsService.js): `backend/src/services/adminAnalyticsService.js`

### Other components

- **Platform users**

## Connections

- Platform users → Angular application: use (evidence: `README.md`)
- Angular application → Sign-in: authenticate through
- Angular application → Resource listings: browse and list
- Angular application → Request workflows: submit needs
- Angular application → Match views: review matches
- Angular application → Admin console: administer
- Sign-in → API routes: call API
- Resource listings → API routes: call API
- Request workflows → API routes: call API
- Match views → API routes: call API
- Admin console → API routes: call API
- API routes → Authentication: route auth (evidence: `backend/src/app.js`)
- API routes → Resource lifecycle: route resources (evidence: `backend/src/app.js`)
- API routes → Request lifecycle: route requests (evidence: `backend/src/app.js`)
- API routes → Needs matching: route matches (evidence: `backend/src/app.js`)
- API routes → Handover verification: route transactions (evidence: `backend/src/app.js`)
- API routes → Contributions and impact: route contributions (evidence: `backend/src/app.js`)
- API routes → Organization verification: route organizations (evidence: `backend/src/app.js`)
- API routes → Reports: route reports (evidence: `backend/src/app.js`)
- API routes → Admin analytics: route analytics (evidence: `backend/src/app.js`)
- Resource lifecycle → MongoDB: read and write (evidence: `backend/src/controllers/resources.controller.js`)
- Request lifecycle → MongoDB: read and write (evidence: `backend/src/controllers/requests.controller.js`)
- Request lifecycle → Organization verification: check organization
- Platform users → Organization verification: register organization (evidence: `README.md`)
- Platform users → Reports: report activity (evidence: `README.md`)
