# intelliganesh/socal_mediation architecture

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

- Interactive diagram: https://gitdiagram.com/intelliganesh/socal_mediation
- Repository: https://github.com/intelliganesh/socal_mediation

## Overview

SoCal Mediation Center is a shared Laravel application for mediation and legal consultations. Its main client workflow discovers services and availability, saves a draft, completes and schedules a consultation, collects participant payments, and then supports questionnaires and integrations. Admin controllers also manage consultations and payments. The graph preserves the documented Converge, payment simulation, Zoom, Outlook, and questionnaire capabilities; some links are based on README descriptions because relevant implementation excerpts were not provided.

Main entry points: [`app/Http/Controllers/Api/V1/ConsultationController.php`](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/ConsultationController.php) (Consultation API), [`app/Services/ConsultationCompletionService.php`](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/ConsultationCompletionService.php) (Booking completion), [`app/Services/QuestionnaireWorkflowService.php`](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/QuestionnaireWorkflowService.php) (Questionnaire workflow), [`app/Services/PaymentReconciliationService.php`](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/PaymentReconciliationService.php) (Payment reconciliation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking and catalog"]
  node_api["Consultation API"]
  node_catalog["Catalog and forms"]
  node_availability["Availability"]
  node_draft["Draft service"]
  node_completion["Booking completion"]
  node_freeintro["Free intro workflow"]
  node_consultation[("Consultation records<br/>[Consultation.php]")]
  node_participants[("Participants")]
end

subgraph group_payments["Payment processing"]
  node_payments_api["Payment API"]
  node_checkout["Converge checkout"]
  node_reconcile["Payment reconciliation"]
  node_paymentmodel[("Payment requests<br/>[PaymentRequest.php]")]
  node_simulator["Payment simulation"]
end

subgraph group_questionnaires["Intake and agreements"]
  node_questionnaire_api["Questionnaire API"]
  node_questionworkflow["Questionnaire workflow"]
  node_templates["Questionnaire templates"]
  node_submissions[("Questionnaire submissions")]
end

subgraph group_operations["Admin operations"]
  node_admin["Admin panel"]
  node_mail["Consultation email"]
end

subgraph group_integrations["External services"]
  node_gateway["Converge<br/>[ConvergeClient.php]"]
  node_zoom["Zoom meetings<br/>[ZoomClient.php]"]
  node_outlook["Outlook calendar"]
  node_graph_token["Graph auth"]
end

node_client(("Booking client"))
node_external_payment{{"Payment gateway"}}
node_external_zoom{{"Zoom service"}}
node_external_outlook{{"Outlook service"}}
node_database[("Application database")]

node_client -->|"browses"| node_catalog
node_client -->|"requests booking"| node_api
node_api -->|"fetches slots"| node_availability
node_api -->|"creates draft"| node_draft
node_api -->|"completes booking"| node_completion
node_api -->|"dispatches"| node_freeintro
node_completion -.->|"updates"| node_consultation
node_completion -.->|"schedules"| node_participants
node_consultation -->|"persists"| node_database
node_participants -->|"persists"| node_database
node_client -.->|"simulates payment"| node_payments_api
node_payments_api -.->|"invokes"| node_simulator
node_client -->|"opens payment link"| node_checkout
node_checkout -->|"creates session"| node_gateway
node_gateway -.->|"requests payment"| node_external_payment
node_checkout -->|"verifies return"| node_reconcile
node_reconcile -->|"queries status"| node_gateway
node_reconcile -->|"updates status"| node_paymentmodel
node_paymentmodel -->|"persists"| node_database
node_client -.->|"submits intake"| node_questionnaire_api
node_questionnaire_api -->|"handles submission"| node_questionworkflow
node_questionworkflow -->|"loads templates"| node_templates
node_questionworkflow -->|"creates submissions"| node_submissions
node_submissions -->|"persists"| node_database
node_admin -->|"syncs payments"| node_reconcile
node_admin -->|"checks slots"| node_availability
node_questionworkflow -->|"sends confirmation"| node_mail
node_completion -.->|"creates meeting"| node_zoom
node_completion -.->|"syncs calendar"| node_outlook
node_freeintro -->|"syncs calendar"| node_outlook
node_outlook -->|"gets token"| node_graph_token
node_outlook -->|"syncs events"| node_external_outlook
node_zoom -.->|"creates meetings"| node_external_zoom

click node_api "https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/ConsultationController.php"
click node_catalog "https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/CatalogController.php"
click node_availability "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/AvailabilityService.php"
click node_draft "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/ConsultationDraftService.php"
click node_completion "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/ConsultationCompletionService.php"
click node_freeintro "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/FreeIntroCallWorkflowService.php"
click node_consultation "https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/Consultation.php"
click node_participants "https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/ConsultationParticipant.php"
click node_payments_api "https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/PaymentWebhookController.php"
click node_checkout "https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Payments/ConvergeCheckoutController.php"
click node_reconcile "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/PaymentReconciliationService.php"
click node_paymentmodel "https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/PaymentRequest.php"
click node_gateway "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/ConvergeClient.php"
click node_simulator "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/PaymentSimulationService.php"
click node_questionnaire_api "https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/QuestionnaireController.php"
click node_questionworkflow "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/QuestionnaireWorkflowService.php"
click node_templates "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/QuestionnaireTemplateService.php"
click node_submissions "https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/QuestionnaireSubmission.php"
click node_admin "https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Admin/ConsultationAdminController.php"
click node_mail "https://github.com/intelliganesh/socal_mediation/blob/master/app/Mail/ConsultationConfirmationMail.php"
click node_zoom "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/ZoomClient.php"
click node_outlook "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/OutlookCalendarClient.php"
click node_graph_token "https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/MicrosoftGraphTokenProvider.php"

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_api,node_catalog,node_availability,node_draft,node_completion,node_freeintro,node_consultation,node_participants,node_client toneBlue
class node_payments_api,node_checkout,node_reconcile,node_paymentmodel,node_simulator,node_database toneAmber
class node_questionnaire_api,node_questionworkflow,node_templates,node_submissions toneMint
class node_admin,node_mail toneRose
class node_gateway,node_zoom,node_outlook,node_graph_token,node_external_payment,node_external_zoom,node_external_outlook toneIndigo
```

## Components

### Booking and catalog

- [Consultation API](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/ConsultationController.php): `app/Http/Controllers/Api/V1/ConsultationController.php`
- [Catalog and forms](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/CatalogController.php): `app/Http/Controllers/Api/V1/CatalogController.php`
- [Availability](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/AvailabilityService.php): `app/Services/AvailabilityService.php`
- [Draft service](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/ConsultationDraftService.php): `app/Services/ConsultationDraftService.php`
- [Booking completion](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/ConsultationCompletionService.php): `app/Services/ConsultationCompletionService.php`
- [Free intro workflow](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/FreeIntroCallWorkflowService.php): `app/Services/FreeIntroCallWorkflowService.php`
- [Consultation records](https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/Consultation.php): `app/Models/Consultation.php`
- [Participants](https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/ConsultationParticipant.php): `app/Models/ConsultationParticipant.php`

### Payment processing

- [Payment API](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/PaymentWebhookController.php): `app/Http/Controllers/Api/V1/PaymentWebhookController.php`
- [Converge checkout](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Payments/ConvergeCheckoutController.php): `app/Http/Controllers/Payments/ConvergeCheckoutController.php`
- [Payment reconciliation](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/PaymentReconciliationService.php): `app/Services/PaymentReconciliationService.php`
- [Payment requests](https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/PaymentRequest.php): `app/Models/PaymentRequest.php`
- [Payment simulation](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/PaymentSimulationService.php): `app/Services/PaymentSimulationService.php`

### Intake and agreements

- [Questionnaire API](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Api/V1/QuestionnaireController.php): `app/Http/Controllers/Api/V1/QuestionnaireController.php`
- [Questionnaire workflow](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/QuestionnaireWorkflowService.php): `app/Services/QuestionnaireWorkflowService.php`
- [Questionnaire templates](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/QuestionnaireTemplateService.php): `app/Services/QuestionnaireTemplateService.php`
- [Questionnaire submissions](https://github.com/intelliganesh/socal_mediation/blob/master/app/Models/QuestionnaireSubmission.php): `app/Models/QuestionnaireSubmission.php`

### Admin operations

- [Admin panel](https://github.com/intelliganesh/socal_mediation/blob/master/app/Http/Controllers/Admin/ConsultationAdminController.php): `app/Http/Controllers/Admin/ConsultationAdminController.php`
- [Consultation email](https://github.com/intelliganesh/socal_mediation/blob/master/app/Mail/ConsultationConfirmationMail.php): `app/Mail/ConsultationConfirmationMail.php`

### External services

- [Converge](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/ConvergeClient.php): `app/Services/Integrations/ConvergeClient.php`
- [Zoom meetings](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/ZoomClient.php): `app/Services/Integrations/ZoomClient.php`
- [Outlook calendar](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/OutlookCalendarClient.php): `app/Services/Integrations/OutlookCalendarClient.php`
- [Graph auth](https://github.com/intelliganesh/socal_mediation/blob/master/app/Services/Integrations/MicrosoftGraphTokenProvider.php): `app/Services/Integrations/MicrosoftGraphTokenProvider.php`

### Other components

- **Booking client**
- **Payment gateway**
- **Zoom service**
- **Outlook service**
- **Application database**

## Connections

- Booking client → Catalog and forms: browses (evidence: `README.md`)
- Booking client → Consultation API: requests booking (evidence: `README.md`)
- Consultation API → Availability: fetches slots (evidence: `app/Http/Controllers/Api/V1/ConsultationController.php`)
- Consultation API → Draft service: creates draft (evidence: `app/Http/Controllers/Api/V1/ConsultationController.php`)
- Consultation API → Booking completion: completes booking (evidence: `app/Http/Controllers/Api/V1/ConsultationController.php`)
- Consultation API → Free intro workflow: dispatches (evidence: `app/Http/Controllers/Api/V1/ConsultationController.php`)
- Booking completion → Consultation records: updates
- Booking completion → Participants: schedules
- Consultation records → Application database: persists (evidence: `app/Models/Consultation.php`)
- Participants → Application database: persists (evidence: `app/Models/ConsultationParticipant.php`)
- Booking client → Payment API: simulates payment (evidence: `README.md`)
- Payment API → Payment simulation: invokes
- Booking client → Converge checkout: opens payment link (evidence: `README.md`)
- Converge checkout → Converge: creates session (evidence: `app/Http/Controllers/Payments/ConvergeCheckoutController.php`)
- Converge → Payment gateway: requests payment (evidence: `README.md`)
- Converge checkout → Payment reconciliation: verifies return (evidence: `app/Http/Controllers/Payments/ConvergeCheckoutController.php`)
- Payment reconciliation → Converge: queries status (evidence: `app/Services/PaymentReconciliationService.php`)
- Payment reconciliation → Payment requests: updates status (evidence: `app/Services/PaymentReconciliationService.php`)
- Payment requests → Application database: persists (evidence: `app/Models/PaymentRequest.php`)
- Booking client → Questionnaire API: submits intake (evidence: `app/Http/Controllers/Api/V1/QuestionnaireController.php`)
- Questionnaire API → Questionnaire workflow: handles submission (evidence: `app/Http/Controllers/Api/V1/QuestionnaireController.php`)
- Questionnaire workflow → Questionnaire templates: loads templates (evidence: `app/Services/QuestionnaireWorkflowService.php`)
- Questionnaire workflow → Questionnaire submissions: creates submissions (evidence: `app/Services/QuestionnaireWorkflowService.php`)
- Questionnaire submissions → Application database: persists (evidence: `app/Models/QuestionnaireSubmission.php`)
- Admin panel → Payment reconciliation: syncs payments (evidence: `app/Http/Controllers/Admin/ConsultationAdminController.php`)
- Admin panel → Availability: checks slots (evidence: `app/Http/Controllers/Admin/ConsultationAdminController.php`)
- Questionnaire workflow → Consultation email: sends confirmation (evidence: `app/Services/QuestionnaireWorkflowService.php`)
- Booking completion → Zoom meetings: creates meeting (evidence: `README.md`)
- Booking completion → Outlook calendar: syncs calendar (evidence: `README.md`)
- Free intro workflow → Outlook calendar: syncs calendar (evidence: `app/Services/FreeIntroCallWorkflowService.php`)
- Outlook calendar → Graph auth: gets token (evidence: `app/Services/Integrations/OutlookCalendarClient.php`)
- Outlook calendar → Outlook service: syncs events (evidence: `app/Services/Integrations/OutlookCalendarClient.php`)
- Zoom meetings → Zoom service: creates meetings (evidence: `README.md`)
