KiviCare Google meet telemed & woocommerce (Addon)
Core Concepts

Google Meet Architecture

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:

  • Managing Google Calendar API endpoints.
  • Formatting and validating request data according to Google REST API standards.
  • Handling OAuth 2.0 token lifecycle management, including refresh and revocation.

2. Persistence Layer (app/models/)

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

This layer handles:

  • Appointment Mapping Table: Stores Google Calendar Event IDs and Google Meet URLs against KiviCare Appointment IDs.
  • User Metadata: Saves individual doctor OAuth tokens and Google Meet configuration preferences.

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:

  • GET /callback – Processes OAuth redirects from Google and securely stores access tokens.
  • GET /test-connection – Verifies Google API credentials and connection status in real time.

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

  • app/googlemeet/KCGMGoogleMeet.php
    Core integration logic and Google API handling.
  • app/database/migrations/
    Database schema definitions for storing Google Meet event mappings.
  • app/controllers/api/KCGMGoogleMeetController.php
    Central API controller for frontend communication and OAuth handling.

Suggestions & Improvements

Your email address will not be published. Required fields are marked *