> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Third-Party Integrations

> External services integrated with the Equa platform

# Third-Party Integrations

## Integration Map

```mermaid theme={null}
graph LR
    subgraph equa [Equa Platform]
        Server["equa-server"]
        Web["equa-web"]
    end

    subgraph google [Google]
        GoogleOAuth["Google OAuth"]
        GoogleDrive["Google Drive API"]
    end

    subgraph microsoft [Microsoft]
        MSGraph["Microsoft Graph"]
        MSAuth["MS OAuth"]
    end

    subgraph aws [AWS]
        S3["S3 (File Storage)"]
        SES["SES (Email)"]
    end

    subgraph billing [Billing]
        Chargify["Chargify"]
    end

    subgraph ai [AI]
        Anthropic["Anthropic Claude"]
    end

    subgraph messaging [Messaging]
        Mattermost["Mattermost"]
    end

    Server --> GoogleOAuth
    Server --> GoogleDrive
    Server --> MSGraph
    Server --> MSAuth
    Server --> S3
    Server --> SES
    Server --> Chargify
    Web --> Anthropic
    Server --> Mattermost
    Web --> Mattermost
```

## Google OAuth

| Property  | Value                                         |
| --------- | --------------------------------------------- |
| Module    | `equa-server/modules/auth/src/google-auth.ts` |
| Auth type | OAuth 2.0 (ID token + access token)           |
| Purpose   | User authentication, auto-registration        |
| Env var   | `GOOGLE_OAUTH_CLIENT_ID`                      |

## Google Drive

| Property  | Value                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------- |
| Module    | `equa-server/modules/google-drive/`                                                                           |
| Auth type | OAuth 2.0 (refresh tokens)                                                                                    |
| Purpose   | Document sync between Google Drive and Equa data rooms                                                        |
| Entities  | `GoogleDriveConnections`, `GoogleDriveSyncConfigurations`, `GoogleDriveSyncHistory`, `GoogleDriveSyncedFiles` |
| Env vars  | `GOOGLE_DRIVE_CLIENT_ID`, `GOOGLE_DRIVE_CLIENT_SECRET`, `GOOGLE_DRIVE_REDIRECT_URI`, `GOOGLE_DRIVE_ENABLED`   |

## Microsoft Graph

| Property        | Value                                                                         |
| --------------- | ----------------------------------------------------------------------------- |
| Module          | `equa-server/modules/microsoft/`                                              |
| Auth type       | OAuth 2.0 (client credentials)                                                |
| Purpose         | Microsoft 365 integration, file storage                                       |
| Frontend helper | `equa-web/src/shared/helpers/ms/msGraph.ts`                                   |
| Env vars        | `MS_AUTH_CLIENT_ID`, `MS_AUTH_TENANT_ID`, `MS_AUTH_SECRET`, `MS_AUTH_ENABLED` |

## AWS S3

| Property             | Value                                                                               |
| -------------------- | ----------------------------------------------------------------------------------- |
| Module               | `equa-server/modules/file-storage/`                                                 |
| Purpose              | File upload, storage, and retrieval                                                 |
| Max upload size      | 10MB (configurable via `AWS_S3_UPLOAD_SIZE_LIMIT_MB`)                               |
| Frontend integration | Multipart upload via `postMultipart()` in `equa-web/src/service/lib/http-client.ts` |

## AWS SES

| Property  | Value                                               |
| --------- | --------------------------------------------------- |
| Module    | `equa-server/modules/notifications/`                |
| Purpose   | Transactional email delivery                        |
| Region    | `us-east-1` (default)                               |
| Fallbacks | SMTP, dev mode (console output)                     |
| Templates | Handlebars (`modules/notifications/src/templates/`) |

## Chargify (Billing)

| Property  | Value                                                        |
| --------- | ------------------------------------------------------------ |
| Module    | `equa-server/modules/billing/`                               |
| Purpose   | Subscription management, payment processing                  |
| Endpoints | `equa-server/modules/api/src/endpoints/billing-endpoints.ts` |

## Mattermost (Team Messaging)

| Property     | Value                                                         |
| ------------ | ------------------------------------------------------------- |
| Module       | `equa-server/modules/agent/src/mattermost/`                   |
| Auth type    | API-provisioned users with personal access tokens             |
| Purpose      | Organization-scoped team messaging, embedded in equa-web      |
| Entities     | `MattermostUserMappings`, `MattermostOrgMappings`             |
| Env vars     | `MATTERMOST_URL`, `MATTERMOST_ADMIN_BOT_TOKEN`                |
| Server       | Mattermost Team Edition 10.4, deployed on Railway             |
| Domain       | `https://chat.equa.cc`                                        |
| Embedding    | iframe with token-based login redirect                        |
| Agent bridge | `equabot-gateway/extensions/mattermost/` (existing extension) |
| Spec         | [024-messaging](/specs/024-messaging/spec)                    |
| Runbook      | [Mattermost Runbook](/architecture/mattermost-runbook)        |

> `Source: equa-server/modules/agent/src/mattermost/mattermost-client.ts, Line: 7`
> `Source: equa-server/modules/persistence/src/schema.ts, Lines: 2042-2080`

## Anthropic Claude (AI)

| Property       | Value                                          |
| -------------- | ---------------------------------------------- |
| Module         | `equa-server/modules/agent/`                   |
| Purpose        | Equanaut AI assistant                          |
| Model          | `claude-sonnet-4-20250514` (configurable)      |
| Frontend proxy | `/equanaut-api` -> Hetzner server or localhost |
| Env var        | `ANTHROPIC_API_KEY`                            |
