# thepersonalaicompany/amurex architecture

> Architecture diagram of the GitHub repository thepersonalaicompany/amurex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thepersonalaicompany/amurex
- Repository: https://github.com/thepersonalaicompany/amurex

## Overview

##### Project’s Core Nature & Purpose
- The project is a Chrome extension that injects meeting-enhancing features (real-time suggestions, transcriptions, summaries, and follow-up emails) into meeting platforms.
- It acts as an “invisible companion” within the browser, working alongside externally hosted backend and web services.
- The README calls it a Meeting Copilot that automates meeting support tasks using AI.

##### Out the Key Project Components
- Extension Structure:
- Background Script (extension/background.js): Acts as a service worker, handling communication (e.g., with the backend server) and managing extension lifecycle events.
- Content Scripts (extension/content.js and extension/msteams_content.js): These are injected into the meeting platform pages (Google Meet, MS Teams) to capture meeting data, display live suggestions, and facilitate UI interactions.
- Side Panels (files inside extension/sidepanels/): These include various HTML, CSS, and JS files for rendering interactive panels (such as chat side panels and a main side panel) that provide detailed meeting information or controls.
- Manifest (extension/manifest.json): This file defines the extension’s permissions, entry points (background and content scripts), and overall configuration.

- External Dependencies:
- Backend Server: As referenced in the self-hosting instructions, the extension expects a backend running (BASE_URL_BACKEND) to handle requests like analytics, meeting summaries, or other AI services.
- Web Server: Another part of the ecosystem (BASE_URL_WEB) might host additional interfaces or dashboards for the user.
- Configuration via config.js: While not present by default, the instructions indicate a customizable config file (AMUREX_CONFIG) that ties the extension to its backend and web endpoints.

##### Relationships and Data Flow
- User initiates a meeting or joins a meeting platform.
- Content scripts insert UI elements on the meeting page and capture real-time meeting data.
- The background script (service worker) manages communication between content scripts and external servers.
- Data flows from the meeting page (via content scripts) to the background script and then to the backend server for processing (e.g., transcript analysis, AI-driven suggestions).
- Side panels provide a dedicated UI to show meeting summaries, action items, or additional controls, interfacing with both the content scripts and the background processes.
- External requests (e.g., send follow-up emails) are triggered either directly from the UI or through interactions orchestrated by the background script.

##### Architectural Patterns & Important Design Principles
- Integration & Extensibility: The extension is built to interact with multiple meeting platforms (Google Meet, MS Teams) and can be extended to support more. It also integrates seamlessly with external backend and web services.
- Configuration-Driven: The use of a centralized configuration (config.js and similar configurations in background.js) indicates that the behavior and integration endpoints are customizable, which is important for the self-hosting use case.

##### Final Steps
- That every component (UI, logic, external API calls) is represented and labeled with its function.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Chrome Browser Environment"
        MC("Content Script - Google Meet"):::content
        MC2("Content Script - MS Teams Content Script"):::content
        BG("Background Service Worker"):::background
        MF("Manifest & Configuration"):::config

        subgraph "Side Panels UI"
            SP1("Primary Side Panel"):::sidepanel
            SP2("Chat Side Panel"):::sidepanel
            SP3("Auth & Config Panel"):::sidepanel
        end
    end

    subgraph "External Services"
        BE("Backend Server"):::external
        WE("Web Server"):::external
    end

    %% Data Flow Connections
    MC -->|"capturesData"| BG
    MC2 -->|"capturesData"| BG
    MF -->|"initializes"| BG
    SP1 -->|"userInteraction"| BG
    SP2 -->|"userInteraction"| BG
    SP3 -->|"userInteraction"| BG
    BG -->|"APIRequest"| BE
    BG -->|"APIRequest"| WE

    %% Click Events for Mapped Components
    click BG "https://github.com/thepersonalaicompany/amurex/blob/main/extension/background.js"
    click MC "https://github.com/thepersonalaicompany/amurex/blob/main/extension/content.js"
    click MC2 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/msteams_content.js"
    click MF "https://github.com/thepersonalaicompany/amurex/blob/main/extension/manifest.json"
    click SP1 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/sidepanel.html"
    click SP2 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/chatsidepanel.html"
    click SP3 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/auth.js"
    click SP1 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/sidepanel.css"
    click SP1 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/sidepanel.js"
    click SP2 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/chatsidepanel.css"
    click SP2 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/chatsidepanel.js"
    click SP3 "https://github.com/thepersonalaicompany/amurex/blob/main/extension/sidepanels/config.js"

    %% Styles
    classDef background fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef content fill:#e6ffe6,stroke:#2d862d,stroke-width:2px;
    classDef config fill:#f5c6cb,stroke:#a71d2a,stroke-width:2px;
    classDef sidepanel fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef external fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
```
