# landogz/dapa-ma-laravel architecture

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

- Interactive diagram: https://gitdiagram.com/landogz/dapa-ma-laravel
- Repository: https://github.com/landogz/dapa-ma-laravel

## Overview

Dapa-ma is a Laravel application for a community and wellbeing product, with API capabilities for care checks, journaling, content, reviews, and related resources, plus an administrative interface. A representative care-check request enters an API controller, is handled by a domain service, and uses repository/model-backed data. The tree also shows analytics, content workflow, authentication, and a JavaScript-driven admin UI. The README provides no product detail, and most routes and domain modules were not sampled; the graph therefore preserves those branches without guessing their internal call paths.

Main entry points: [`app/Services/ReviewService.php`](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ReviewService.php) (Review service), [`app/Services/CareCheck/CareCheckService.php`](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/CareCheck/CareCheckService.php) (Care-check service), [`bootstrap/app.php`](https://github.com/landogz/dapa-ma-laravel/blob/main/bootstrap/app.php) (Laravel bootstrap), [`app/Services/Analytics/AnalyticsIngestService.php`](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/Analytics/AnalyticsIngestService.php) (Event ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_bootstrap["Laravel bootstrap<br/>[app.php]"]
  node_api_routes["API routes<br/>[api.php]"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication API<br/>[AuthController.php]"]
  node_app_js["Browser application entry<br/>[app.js]"]
end

subgraph group_care["Care and wellbeing"]
  node_care_api["Care-check API"]
  node_care_service["Care-check service"]
  node_care_repository["Care-check repository"]
  node_care_results[("Care-check results")]
  node_diary["Diary and journaling<br/>[DiaryService.php]"]
  node_mood["Mood check-ins"]
  node_care_resources["Care resources"]
end

subgraph group_community["Community content"]
  node_posts["Posts and engagement<br/>[PostService.php]"]
  node_contests["Contests<br/>[ContestService.php]"]
  node_hope["Hope directory/events"]
  node_rehab[("Rehab centers<br/>[RehabCenter.php]")]
  node_review_api["Reviews API"]
  node_review_service["Review service<br/>[ReviewService.php]"]
  node_review_repository["Review repository"]
  node_review_model[("Review records<br/>[Review.php]")]
  node_post_model[("Post records<br/>[Post.php]")]
end

subgraph group_admin["Administration"]
  node_admin_client["Admin browser UI<br/>[admin-dashboard.js]"]
  node_admin_users["User administration"]
  node_admin_search["Admin search"]
  node_admin_search_repo["Search repository"]
  node_workflow["Content workflow"]
end

subgraph group_analytics["Analytics"]
  node_analytics["Analytics services"]
  node_analytics_ingest["Event ingestion"]
  node_analytics_event[("Analytics events<br/>[AnalyticsEvent.php]")]
  node_analytics_dates["Analytics date ranges"]
end

node_user(("App user"))

node_bootstrap -->|"loads routes"| node_api_routes
node_bootstrap -->|"loads routes"| node_web_routes
node_care_api -->|"calls"| node_care_service
node_care_service -->|"uses"| node_care_repository
node_care_service -->|"reads and writes"| node_care_results
node_review_api -->|"calls"| node_review_service
node_review_service -->|"uses"| node_review_repository
node_review_repository -->|"queries"| node_review_model
node_review_service -->|"checks published posts"| node_post_model
node_review_service -->|"checks active centers"| node_rehab
node_app_js -->|"initializes admin"| node_admin_client
node_admin_users -.->|"manages user actions"| node_workflow
node_admin_search -->|"queries"| node_admin_search_repo
node_analytics_ingest -->|"stores events"| node_analytics_event
node_analytics_ingest -->|"uses date types"| node_analytics_dates

click node_bootstrap "https://github.com/landogz/dapa-ma-laravel/blob/main/bootstrap/app.php"
click node_api_routes "https://github.com/landogz/dapa-ma-laravel/blob/main/routes/api.php"
click node_web_routes "https://github.com/landogz/dapa-ma-laravel/blob/main/routes/web.php"
click node_auth "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/AuthController.php"
click node_care_api "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/CareCheck/CareCheckController.php"
click node_care_service "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/CareCheck/CareCheckService.php"
click node_care_repository "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Repositories/CareCheck/CareCheckRepository.php"
click node_care_results "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/CareCheckResult.php"
click node_diary "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/DiaryService.php"
click node_mood "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/MoodCheckinService.php"
click node_care_resources "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/CareSupportResourceService.php"
click node_posts "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/PostService.php"
click node_contests "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ContestService.php"
click node_hope "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/HopeDirectoryService.php"
click node_rehab "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/RehabCenter.php"
click node_review_api "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/ReviewController.php"
click node_review_service "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ReviewService.php"
click node_review_repository "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Repositories/ReviewRepository.php"
click node_review_model "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/Review.php"
click node_post_model "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/Post.php"
click node_admin_client "https://github.com/landogz/dapa-ma-laravel/blob/main/resources/js/modules/admin-dashboard.js"
click node_admin_users "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/Admin/UserAdminController.php"
click node_admin_search "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/AdminSearch/AdminSearchService.php"
click node_admin_search_repo "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Repositories/AdminSearch/AdminSearchRepository.php"
click node_workflow "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ContentWorkflow/ContentWorkflowService.php"
click node_analytics "https://github.com/landogz/dapa-ma-laravel/tree/main/app/Services/Analytics"
click node_analytics_ingest "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/Analytics/AnalyticsIngestService.php"
click node_analytics_event "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/AnalyticsEvent.php"
click node_analytics_dates "https://github.com/landogz/dapa-ma-laravel/blob/main/app/Support/Analytics/AnalyticsDateRange.php"
click node_app_js "https://github.com/landogz/dapa-ma-laravel/blob/main/resources/js/app.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_bootstrap,node_api_routes,node_web_routes,node_auth,node_app_js,node_user toneBlue
class node_care_api,node_care_service,node_care_repository,node_care_results,node_diary,node_mood,node_care_resources toneAmber
class node_posts,node_contests,node_hope,node_rehab,node_review_api,node_review_service,node_review_repository,node_review_model,node_post_model toneMint
class node_admin_client,node_admin_users,node_admin_search,node_admin_search_repo,node_workflow toneRose
class node_analytics,node_analytics_ingest,node_analytics_event,node_analytics_dates toneIndigo
```

## Components

### Application runtime

- [Laravel bootstrap](https://github.com/landogz/dapa-ma-laravel/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [API routes](https://github.com/landogz/dapa-ma-laravel/blob/main/routes/api.php): `routes/api.php`
- [Web routes](https://github.com/landogz/dapa-ma-laravel/blob/main/routes/web.php): `routes/web.php`
- [Authentication API](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/AuthController.php): `app/Http/Controllers/API/AuthController.php`
- [Browser application entry](https://github.com/landogz/dapa-ma-laravel/blob/main/resources/js/app.js): `resources/js/app.js`

### Care and wellbeing

- [Care-check API](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/CareCheck/CareCheckController.php): `app/Http/Controllers/API/CareCheck/CareCheckController.php`
- [Care-check service](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/CareCheck/CareCheckService.php): `app/Services/CareCheck/CareCheckService.php`
- [Care-check repository](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Repositories/CareCheck/CareCheckRepository.php): `app/Repositories/CareCheck/CareCheckRepository.php`
- [Care-check results](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/CareCheckResult.php): `app/Models/CareCheckResult.php`
- [Diary and journaling](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/DiaryService.php): `app/Services/DiaryService.php`
- [Mood check-ins](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/MoodCheckinService.php): `app/Services/MoodCheckinService.php`
- [Care resources](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/CareSupportResourceService.php): `app/Services/CareSupportResourceService.php`

### Community content

- [Posts and engagement](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/PostService.php): `app/Services/PostService.php`
- [Contests](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ContestService.php): `app/Services/ContestService.php`
- [Hope directory/events](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/HopeDirectoryService.php): `app/Services/HopeDirectoryService.php`
- [Rehab centers](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/RehabCenter.php): `app/Models/RehabCenter.php`
- [Reviews API](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/ReviewController.php): `app/Http/Controllers/API/ReviewController.php`
- [Review service](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ReviewService.php): `app/Services/ReviewService.php`
- [Review repository](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Repositories/ReviewRepository.php): `app/Repositories/ReviewRepository.php`
- [Review records](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/Review.php): `app/Models/Review.php`
- [Post records](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/Post.php): `app/Models/Post.php`

### Administration

- [Admin browser UI](https://github.com/landogz/dapa-ma-laravel/blob/main/resources/js/modules/admin-dashboard.js): `resources/js/modules/admin-dashboard.js`
- [User administration](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Http/Controllers/API/Admin/UserAdminController.php): `app/Http/Controllers/API/Admin/UserAdminController.php`
- [Admin search](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/AdminSearch/AdminSearchService.php): `app/Services/AdminSearch/AdminSearchService.php`
- [Search repository](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Repositories/AdminSearch/AdminSearchRepository.php): `app/Repositories/AdminSearch/AdminSearchRepository.php`
- [Content workflow](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/ContentWorkflow/ContentWorkflowService.php): `app/Services/ContentWorkflow/ContentWorkflowService.php`

### Analytics

- [Analytics services](https://github.com/landogz/dapa-ma-laravel/tree/main/app/Services/Analytics): `app/Services/Analytics`
- [Event ingestion](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Services/Analytics/AnalyticsIngestService.php): `app/Services/Analytics/AnalyticsIngestService.php`
- [Analytics events](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Models/AnalyticsEvent.php): `app/Models/AnalyticsEvent.php`
- [Analytics date ranges](https://github.com/landogz/dapa-ma-laravel/blob/main/app/Support/Analytics/AnalyticsDateRange.php): `app/Support/Analytics/AnalyticsDateRange.php`

### Other components

- **App user**

## Connections

- Laravel bootstrap → API routes: loads routes (evidence: `bootstrap/app.php`)
- Laravel bootstrap → Web routes: loads routes (evidence: `bootstrap/app.php`)
- Care-check API → Care-check service: calls (evidence: `app/Http/Controllers/API/CareCheck/CareCheckController.php`)
- Care-check service → Care-check repository: uses (evidence: `app/Services/CareCheck/CareCheckService.php`)
- Care-check service → Care-check results: reads and writes (evidence: `app/Services/CareCheck/CareCheckService.php`)
- Reviews API → Review service: calls (evidence: `app/Http/Controllers/API/ReviewController.php`)
- Review service → Review repository: uses (evidence: `app/Services/ReviewService.php`)
- Review repository → Review records: queries (evidence: `app/Repositories/ReviewRepository.php`)
- Review service → Post records: checks published posts (evidence: `app/Services/ReviewService.php`)
- Review service → Rehab centers: checks active centers (evidence: `app/Services/ReviewService.php`)
- Browser application entry → Admin browser UI: initializes admin (evidence: `resources/js/app.js`)
- User administration → Content workflow: manages user actions
- Admin search → Search repository: queries (evidence: `app/Services/AdminSearch/AdminSearchService.php`)
- Event ingestion → Analytics events: stores events (evidence: `app/Services/Analytics/AnalyticsIngestService.php`)
- Event ingestion → Analytics date ranges: uses date types (evidence: `app/Services/Analytics/AnalyticsIngestService.php`)
