# ronefel/moodle-mod_googlemeet architecture

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

- Interactive diagram: https://gitdiagram.com/ronefel/moodle-mod_googlemeet
- Repository: https://github.com/ronefel/moodle-mod_googlemeet

## Overview

Google Meet for Moodle lets teachers configure meeting activities and event reminders, then lets users enter the room and view recordings synchronized from the organizer’s Google Drive. The runtime spans Moodle activity pages, scheduling and notifications, Google OAuth/API access, and persisted activity and recording data. The README documents the Google OAuth prerequisite and Drive-recording capability; excerpts show the view-to-library and client-to-REST flow. Several listed subsystems are represented from their paths and registration files, but their internal calls were not sampled, so their links are omitted where unverified.

Main entry points: [`view.php`](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/view.php) (Activity view), [`lib.php`](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/lib.php) (Activity lifecycle), [`classes/client.php`](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/client.php) (OAuth and Google client), [`mod_form.php`](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/mod_form.php) (Activity settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_activity["Activity and pages"]
  node_activity_form["Activity settings<br/>[mod_form.php]"]
  node_course_index["Course listing<br/>[index.php]"]
  node_activity_view["Activity view<br/>[view.php]"]
  node_activity_lib["Activity lifecycle<br/>[lib.php]"]
  node_local_logic["Scheduling and display<br/>[locallib.php]"]
  node_external_api["AJAX actions<br/>[external.php]"]
  node_mobile_view["Mobile output<br/>[mobile.php]"]
end

subgraph group_google["Google integration"]
  node_oauth_client["OAuth and Google client<br/>[client.php]"]
  node_rest_client["Google REST access<br/>[rest.php]"]
end

subgraph group_events["Events and notifications"]
  node_event_logic["Event generation<br/>[locallib.php]"]
  node_notify_task["Reminder task<br/>[notify_event.php]"]
end

subgraph group_platform["Moodle services"]
  node_plugin_data[("Activity and recording data<br/>[lib.php]")]
  node_backup_restore["Course backup and restore"]
  node_privacy["Privacy requests<br/>[provider.php]"]
end

node_teacher(("Teacher"))
node_student(("Student"))
node_google_services["Google Calendar and Drive"]
node_moodle_messaging["Moodle messaging"]

node_teacher -->|"configures"| node_activity_form
node_teacher -->|"browses"| node_course_index
node_student -->|"opens"| node_activity_view
node_activity_form -->|"provides settings"| node_activity_lib
node_course_index -->|"links to"| node_activity_view
node_activity_view -->|"loads"| node_activity_lib
node_activity_view -->|"renders"| node_local_logic
node_activity_view -->|"creates client"| node_oauth_client
node_local_logic -->|"creates client"| node_oauth_client
node_oauth_client -->|"uses"| node_rest_client
node_rest_client -.->|"requests data"| node_google_services
node_oauth_client -.->|"authenticates"| node_google_services
node_activity_lib -->|"reads and writes"| node_plugin_data
node_event_logic -.->|"stores event data"| node_plugin_data
node_activity_lib -.->|"generates events"| node_event_logic
node_notify_task -.->|"sends reminders"| node_moodle_messaging
node_backup_restore -->|"restores records"| node_plugin_data

click node_activity_form "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/mod_form.php"
click node_course_index "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/index.php"
click node_activity_view "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/view.php"
click node_activity_lib "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/lib.php"
click node_local_logic "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/locallib.php"
click node_external_api "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/external.php"
click node_mobile_view "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/output/mobile.php"
click node_oauth_client "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/client.php"
click node_rest_client "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/rest.php"
click node_event_logic "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/locallib.php"
click node_notify_task "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/task/notify_event.php"
click node_plugin_data "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/lib.php"
click node_backup_restore "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/backup/moodle2/restore_googlemeet_stepslib.php"
click node_privacy "https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/privacy/provider.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_activity_form,node_course_index,node_activity_view,node_activity_lib,node_local_logic,node_external_api,node_mobile_view toneBlue
class node_oauth_client,node_rest_client toneAmber
class node_event_logic,node_notify_task toneMint
class node_plugin_data,node_backup_restore,node_privacy toneRose
class node_teacher,node_student,node_google_services,node_moodle_messaging toneIndigo
```

## Components

### Activity and pages

- [Activity settings](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/mod_form.php): `mod_form.php`
- [Course listing](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/index.php): `index.php`
- [Activity view](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/view.php): `view.php`
- [Activity lifecycle](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/lib.php): `lib.php`
- [Scheduling and display](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/locallib.php): `locallib.php`
- [AJAX actions](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/external.php): `classes/external.php`
- [Mobile output](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/output/mobile.php): `classes/output/mobile.php`

### Google integration

- [OAuth and Google client](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/client.php): `classes/client.php`
- [Google REST access](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/rest.php): `classes/rest.php`

### Events and notifications

- [Event generation](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/locallib.php): `locallib.php`
- [Reminder task](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/task/notify_event.php): `classes/task/notify_event.php`

### Moodle services

- [Activity and recording data](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/lib.php): `lib.php`
- [Course backup and restore](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/backup/moodle2/restore_googlemeet_stepslib.php): `backup/moodle2/restore_googlemeet_stepslib.php`
- [Privacy requests](https://github.com/ronefel/moodle-mod_googlemeet/blob/master/classes/privacy/provider.php): `classes/privacy/provider.php`

### Other components

- **Teacher**
- **Student**
- **Google Calendar and Drive**
- **Moodle messaging**

## Connections

- Teacher → Activity settings: configures
- Teacher → Course listing: browses (evidence: `index.php`)
- Student → Activity view: opens (evidence: `view.php`)
- Activity settings → Activity lifecycle: provides settings (evidence: `lib.php`)
- Course listing → Activity view: links to (evidence: `index.php`)
- Activity view → Activity lifecycle: loads (evidence: `view.php`)
- Activity view → Scheduling and display: renders (evidence: `view.php`)
- Activity view → OAuth and Google client: creates client (evidence: `view.php`)
- Scheduling and display → OAuth and Google client: creates client (evidence: `locallib.php`)
- OAuth and Google client → Google REST access: uses (evidence: `classes/client.php`)
- Google REST access → Google Calendar and Drive: requests data
- OAuth and Google client → Google Calendar and Drive: authenticates
- Activity lifecycle → Activity and recording data: reads and writes (evidence: `lib.php`)
- Event generation → Activity and recording data: stores event data
- Activity lifecycle → Event generation: generates events
- Reminder task → Moodle messaging: sends reminders
- Course backup and restore → Activity and recording data: restores records (evidence: `backup/moodle2/restore_googlemeet_stepslib.php`)
