# utkuufuk/entrello architecture

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

- Interactive diagram: https://gitdiagram.com/utkuufuk/entrello
- Repository: https://github.com/utkuufuk/entrello

## Overview

entrello synchronizes tasks from configured HTTP services into Trello and, in server mode, forwards archived-card events to matching services. The graph separates runner/server entry points, synchronization stages, webhook automation, and configuration/Trello integration. README documents both operating modes and stale-card cleanup. Some subsystem behavior is represented from the README because its implementation was not sampled; uncertain wiring is omitted.

Main entry points: [`internal/services/services.go`](https://github.com/utkuufuk/entrello/blob/master/internal/services/services.go) (Poll orchestration), [`cmd/server/main.go`](https://github.com/utkuufuk/entrello/blob/master/cmd/server/main.go) (Server mode), [`cmd/runner/main.go`](https://github.com/utkuufuk/entrello/blob/master/cmd/runner/main.go) (Runner mode), [`internal/services/poller.go`](https://github.com/utkuufuk/entrello/blob/master/internal/services/poller.go) (Card reconciliation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_runner["Runner mode<br/>[main.go]"]
  node_server["Server mode<br/>[main.go]"]
end

subgraph group_sync["Synchronization"]
  node_poll["Poll orchestration<br/>[services.go]"]
  node_schedule["Poll scheduling<br/>[poller.go]"]
  node_reconcile["Card reconciliation<br/>[poller.go]"]
end

subgraph group_automation["Webhook automation"]
  node_webhook["Webhook handler<br/>[main.go]"]
  node_webhookverify["Signature and event parsing<br/>[webhooks.go]"]
  node_archivedcard["Archived card lookup<br/>[api.go]"]
  node_notify["Service notification<br/>[services.go]"]
end

subgraph group_integration["Configuration and Trello"]
  node_config["Configuration<br/>[config.go]"]
  node_envconfig["Server env config<br/>[init.go]"]
  node_serviceparse["Service parser<br/>[parsers.go]"]
  node_trelloclient["Trello client<br/>[trello.go]"]
end

node_operator(("Operator"))
node_customservices(("Custom HTTP services"))
node_trelloapi(("Trello API"))

node_operator -->|"runs"| node_runner
node_operator -->|"starts"| node_server
node_runner -->|"reads config"| node_config
node_runner -->|"calls"| node_poll
node_server -->|"uses settings"| node_envconfig
node_envconfig -->|"parses services"| node_serviceparse
node_server -->|"dispatches sync"| node_poll
node_server -->|"routes requests"| node_webhook
node_poll -->|"selects services"| node_schedule
node_schedule -->|"returns selected"| node_poll
node_poll -->|"loads board"| node_trelloclient
node_poll -->|"starts polling"| node_reconcile
node_reconcile -->|"GET tasks"| node_customservices
node_reconcile -->|"creates or deletes cards"| node_trelloclient
node_trelloclient -->|"reads and writes"| node_trelloapi
node_webhook -->|"verifies and parses"| node_webhookverify
node_webhook -->|"fetches card"| node_archivedcard
node_archivedcard -->|"gets card"| node_trelloapi
node_webhook -->|"dispatches card"| node_notify
node_notify -->|"POST archived card"| node_customservices

click node_runner "https://github.com/utkuufuk/entrello/blob/master/cmd/runner/main.go"
click node_server "https://github.com/utkuufuk/entrello/blob/master/cmd/server/main.go"
click node_config "https://github.com/utkuufuk/entrello/blob/master/internal/config/config.go"
click node_envconfig "https://github.com/utkuufuk/entrello/blob/master/internal/config/init.go"
click node_serviceparse "https://github.com/utkuufuk/entrello/blob/master/internal/config/parsers.go"
click node_poll "https://github.com/utkuufuk/entrello/blob/master/internal/services/services.go"
click node_schedule "https://github.com/utkuufuk/entrello/blob/master/internal/services/poller.go"
click node_reconcile "https://github.com/utkuufuk/entrello/blob/master/internal/services/poller.go"
click node_trelloclient "https://github.com/utkuufuk/entrello/blob/master/pkg/trello/trello.go"
click node_webhook "https://github.com/utkuufuk/entrello/blob/master/cmd/server/main.go"
click node_webhookverify "https://github.com/utkuufuk/entrello/blob/master/pkg/trello/webhooks.go"
click node_archivedcard "https://github.com/utkuufuk/entrello/blob/master/pkg/trello/api.go"
click node_notify "https://github.com/utkuufuk/entrello/blob/master/internal/services/services.go"

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_runner,node_server toneBlue
class node_poll,node_schedule,node_reconcile toneAmber
class node_webhook,node_webhookverify,node_archivedcard,node_notify,node_trelloapi toneMint
class node_config,node_envconfig,node_serviceparse,node_trelloclient toneRose
class node_operator,node_customservices toneIndigo
```

## Components

### Entry points

- [Runner mode](https://github.com/utkuufuk/entrello/blob/master/cmd/runner/main.go): `cmd/runner/main.go`
- [Server mode](https://github.com/utkuufuk/entrello/blob/master/cmd/server/main.go): `cmd/server/main.go`

### Synchronization

- [Poll orchestration](https://github.com/utkuufuk/entrello/blob/master/internal/services/services.go): `internal/services/services.go`
- [Poll scheduling](https://github.com/utkuufuk/entrello/blob/master/internal/services/poller.go): `internal/services/poller.go`
- [Card reconciliation](https://github.com/utkuufuk/entrello/blob/master/internal/services/poller.go): `internal/services/poller.go`

### Webhook automation

- [Webhook handler](https://github.com/utkuufuk/entrello/blob/master/cmd/server/main.go): `cmd/server/main.go`
- [Signature and event parsing](https://github.com/utkuufuk/entrello/blob/master/pkg/trello/webhooks.go): `pkg/trello/webhooks.go`
- [Archived card lookup](https://github.com/utkuufuk/entrello/blob/master/pkg/trello/api.go): `pkg/trello/api.go`
- [Service notification](https://github.com/utkuufuk/entrello/blob/master/internal/services/services.go): `internal/services/services.go`

### Configuration and Trello

- [Configuration](https://github.com/utkuufuk/entrello/blob/master/internal/config/config.go): `internal/config/config.go`
- [Server env config](https://github.com/utkuufuk/entrello/blob/master/internal/config/init.go): `internal/config/init.go`
- [Service parser](https://github.com/utkuufuk/entrello/blob/master/internal/config/parsers.go): `internal/config/parsers.go`
- [Trello client](https://github.com/utkuufuk/entrello/blob/master/pkg/trello/trello.go): `pkg/trello/trello.go`

### Other components

- **Operator**
- **Custom HTTP services**
- **Trello API**

## Connections

- Operator → Runner mode: runs
- Operator → Server mode: starts
- Runner mode → Configuration: reads config
- Runner mode → Poll orchestration: calls
- Server mode → Server env config: uses settings
- Server env config → Service parser: parses services
- Server mode → Poll orchestration: dispatches sync
- Server mode → Webhook handler: routes requests
- Poll orchestration → Poll scheduling: selects services
- Poll scheduling → Poll orchestration: returns selected
- Poll orchestration → Trello client: loads board
- Poll orchestration → Card reconciliation: starts polling
- Card reconciliation → Custom HTTP services: GET tasks
- Card reconciliation → Trello client: creates or deletes cards
- Trello client → Trello API: reads and writes
- Webhook handler → Signature and event parsing: verifies and parses
- Webhook handler → Archived card lookup: fetches card
- Archived card lookup → Trello API: gets card
- Webhook handler → Service notification: dispatches card
- Service notification → Custom HTTP services: POST archived card
