# kcarttigueane/zapier-clone architecture

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

- Interactive diagram: https://gitdiagram.com/kcarttigueane/zapier-clone
- Repository: https://github.com/kcarttigueane/zapier-clone

## Overview

AREA lets users connect service triggers and actions into automated workflows, with web and mobile clients backed by a shared REST API. The documented journey covers account authentication, connecting services, composing automations, and running them; the server also exposes service, trigger, action, compatibility, and activity-related capabilities. The graph includes the main client surfaces and server layers. Some domain wiring is documented rather than excerpted, so those relationships are labeled accordingly or omitted.

Main entry points: [`server/app/main.py`](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/main.py) (REST API), [`server/app/source/automation.py`](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/source/automation.py) (Automation runner), [`server/app/services/auth_service.py`](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/auth_service.py) (Authentication service), [`server/app/routers/auth_router.py`](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/auth_router.py) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Web and mobile clients"]
  node_web["Web application<br/>[App.tsx]"]
  node_mobile["Mobile application<br/>[App.tsx]"]
end

subgraph group_api["API and domain services"]
  node_rest["REST API<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth_router.py]"]
  node_service_routes["Service routes<br/>[services_router.py]"]
  node_automation_routes["Automation routes"]
  node_action_routes["Action routes<br/>[actions_router.py]"]
  node_trigger_routes["Trigger routes<br/>[triggers_router.py]"]
  node_compat_routes["Compatibility routes"]
  node_service_logic["Service management"]
  node_compat_logic["Compatibility logic"]
end

subgraph group_automation["Automation runtime"]
  node_automation_logic["Automation management"]
  node_trigger_logic["Trigger catalog"]
  node_action_logic["Action catalog<br/>[actions_service.py]"]
  node_automation_runner["Automation runner<br/>[automation.py]"]
  node_trigger_adapters["Trigger integrations"]
  node_action_adapters["Action integrations"]
end

subgraph group_data["Identity and persistence"]
  node_auth_service["Authentication service<br/>[auth_service.py]"]
  node_user_repo["User repository"]
  node_mongo[("MongoDB<br/>[database.py]")]
end

node_providers(("External services"))

node_web -->|"uses REST API"| node_rest
node_mobile -->|"uses REST API"| node_rest
node_rest -->|"registers routes"| node_auth_routes
node_rest -->|"registers routes"| node_service_routes
node_rest -->|"registers routes"| node_automation_routes
node_rest -->|"registers routes"| node_action_routes
node_rest -->|"registers routes"| node_trigger_routes
node_rest -->|"registers routes"| node_compat_routes
node_rest -->|"starts runtime"| node_automation_runner
node_auth_routes -->|"delegates auth"| node_auth_service
node_auth_service -->|"reads and writes users"| node_user_repo
node_user_repo -->|"accesses database"| node_mongo
node_service_routes -->|"delegates service requests"| node_service_logic
node_automation_routes -.->|"delegates automation requests"| node_automation_logic
node_action_routes -.->|"delegates action requests"| node_action_logic
node_trigger_routes -.->|"delegates trigger requests"| node_trigger_logic
node_compat_routes -.->|"delegates compatibility requests"| node_compat_logic
node_automation_runner -.->|"checks events"| node_trigger_adapters
node_automation_runner -.->|"performs actions"| node_action_adapters
node_providers -.->|"OAuth authorization"| node_auth_service

click node_web "https://github.com/kcarttigueane/zapier-clone/blob/main/client_web/src/App.tsx"
click node_mobile "https://github.com/kcarttigueane/zapier-clone/blob/main/client_mobile/app/App.tsx"
click node_rest "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/main.py"
click node_auth_routes "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/auth_router.py"
click node_service_routes "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/services_router.py"
click node_automation_routes "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/automations_router.py"
click node_action_routes "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/actions_router.py"
click node_trigger_routes "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/triggers_router.py"
click node_compat_routes "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/compatibility_router.py"
click node_auth_service "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/auth_service.py"
click node_service_logic "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/services_service.py"
click node_compat_logic "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/compatibility_service.py"
click node_automation_logic "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/automations_service.py"
click node_trigger_logic "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/triggers_service.py"
click node_action_logic "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/actions_service.py"
click node_automation_runner "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/source/automation.py"
click node_trigger_adapters "https://github.com/kcarttigueane/zapier-clone/tree/main/server/app/source/triggers"
click node_action_adapters "https://github.com/kcarttigueane/zapier-clone/tree/main/server/app/source/actions"
click node_user_repo "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/repository/users_repository.py"
click node_mongo "https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/core/database.py"

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_web,node_mobile toneBlue
class node_rest,node_auth_routes,node_service_routes,node_automation_routes,node_action_routes,node_trigger_routes,node_compat_routes,node_service_logic,node_compat_logic toneAmber
class node_automation_logic,node_trigger_logic,node_action_logic,node_automation_runner,node_trigger_adapters,node_action_adapters toneMint
class node_auth_service,node_user_repo,node_mongo toneRose
class node_providers toneIndigo
```

## Components

### Web and mobile clients

- [Web application](https://github.com/kcarttigueane/zapier-clone/blob/main/client_web/src/App.tsx): `client_web/src/App.tsx`
- [Mobile application](https://github.com/kcarttigueane/zapier-clone/blob/main/client_mobile/app/App.tsx): `client_mobile/app/App.tsx`

### API and domain services

- [REST API](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/main.py): `server/app/main.py`
- [Authentication routes](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/auth_router.py): `server/app/routers/auth_router.py`
- [Service routes](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/services_router.py): `server/app/routers/services_router.py`
- [Automation routes](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/automations_router.py): `server/app/routers/automations_router.py`
- [Action routes](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/actions_router.py): `server/app/routers/actions_router.py`
- [Trigger routes](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/triggers_router.py): `server/app/routers/triggers_router.py`
- [Compatibility routes](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/routers/compatibility_router.py): `server/app/routers/compatibility_router.py`
- [Service management](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/services_service.py): `server/app/services/services_service.py`
- [Compatibility logic](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/compatibility_service.py): `server/app/services/compatibility_service.py`

### Automation runtime

- [Automation management](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/automations_service.py): `server/app/services/automations_service.py`
- [Trigger catalog](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/triggers_service.py): `server/app/services/triggers_service.py`
- [Action catalog](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/actions_service.py): `server/app/services/actions_service.py`
- [Automation runner](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/source/automation.py): `server/app/source/automation.py`
- [Trigger integrations](https://github.com/kcarttigueane/zapier-clone/tree/main/server/app/source/triggers): `server/app/source/triggers`
- [Action integrations](https://github.com/kcarttigueane/zapier-clone/tree/main/server/app/source/actions): `server/app/source/actions`

### Identity and persistence

- [Authentication service](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/services/auth_service.py): `server/app/services/auth_service.py`
- [User repository](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/repository/users_repository.py): `server/app/repository/users_repository.py`
- [MongoDB](https://github.com/kcarttigueane/zapier-clone/blob/main/server/app/core/database.py): `server/app/core/database.py`

### Other components

- **External services**

## Connections

- Web application → REST API: uses REST API
- Mobile application → REST API: uses REST API
- REST API → Authentication routes: registers routes (evidence: `server/app/main.py`)
- REST API → Service routes: registers routes (evidence: `server/app/main.py`)
- REST API → Automation routes: registers routes (evidence: `server/app/main.py`)
- REST API → Action routes: registers routes (evidence: `server/app/main.py`)
- REST API → Trigger routes: registers routes (evidence: `server/app/main.py`)
- REST API → Compatibility routes: registers routes (evidence: `server/app/main.py`)
- REST API → Automation runner: starts runtime (evidence: `server/app/main.py`)
- Authentication routes → Authentication service: delegates auth (evidence: `server/app/routers/auth_router.py`)
- Authentication service → User repository: reads and writes users (evidence: `server/app/services/auth_service.py`)
- User repository → MongoDB: accesses database (evidence: `server/app/repository/users_repository.py`)
- Service routes → Service management: delegates service requests (evidence: `server/app/routers/services_router.py`)
- Automation routes → Automation management: delegates automation requests
- Action routes → Action catalog: delegates action requests
- Trigger routes → Trigger catalog: delegates trigger requests
- Compatibility routes → Compatibility logic: delegates compatibility requests
- Automation runner → Trigger integrations: checks events
- Automation runner → Action integrations: performs actions
- External services → Authentication service: OAuth authorization
