The KiviCare Google Meet Addon is built on the modular, provider-based architecture of KiviCare Core, ensuring flexibility, scalability, and seamless integration with existing telemedicine workflows.


System Overview

The Google Meet integration is structured into three core architectural layers, each responsible for a specific part of the workflow.


1. Provider Layer (app/googlemeet/)

The Provider Layer manages all Google Meet–specific logic.
The KCGMGoogleMeet class extends KCAbstractTelemedProvider from KiviCare Core and acts as the backbone of the integration.

Key responsibilities include:


2. Persistence Layer (app/models/)

The Persistence Layer manages data storage and relationships between KiviCare and Google Meet.

This layer handles:

This ensures all meeting data remains securely linked to appointments and users.


3. Controller Layer (app/controllers/api/)

The Controller Layer exposes REST API endpoints that are consumed by the React-based KiviCare frontend.

The KCGMGoogleMeetController manages:


Integration Flow (Interaction Diagram)

The following diagram illustrates how appointments and Google Meet links are created and delivered:

JAVASCRIPT
sequenceDiagram
    participant P as Patient/Doctor
    participant WP as WordPress (KiviCare)
    participant G as Google Calendar API
    
    P->>WP: Creates Appointment
    WP->>G: POST /calendars/primary/events?conferenceDataVersion=1
    G-->>WP: Returns Event JSON (Google Meet Link)
    WP->>WP: Save to kc_appointment_google_meet_mappings
    WP-->>P: Displays "Start / Join" Button

Key File Structure Overview