# fino-dev/event-bridge-emitter architecture

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

- Interactive diagram: https://gitdiagram.com/fino-dev/event-bridge-emitter
- Repository: https://github.com/fino-dev/event-bridge-emitter

## Overview

AWS EventBridge Emitter is a Grafana app plugin for provisioning reusable event templates, configuring server-side AWS identity, and sending events. Administrators configure authentication and provision templates; users browse/search, enter values, preview the detail payload, and submit an event through Grafana’s backend to EventBridge. The graph preserves the documented backend and provisioning responsibilities. Backend source files were indexed as read, but their implementations were not excerpted, so backend internals are grouped conservatively and relationships rely on README documentation.

Main entry points: [`src/pages/HomePage.tsx`](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/pages/HomePage.tsx) (Home Page), [`pkg/plugin/template_resources.go`](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_resources.go) (Template Resource API), [`src/components/TemplateExecutor/TemplateExecutor.tsx`](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateExecutor/TemplateExecutor.tsx) (Event Executor), [`src/components/AppConfig/useAwsAuthSettings.ts`](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/AppConfig/useAwsAuthSettings.ts) (Auth Settings Logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_config["AWS Configuration"]
  node_auth_form["AWS Settings Form<br/>[AwsAuthForm.tsx]"]
  node_auth_state["Auth Settings Logic"]
  node_aws_settings["AWS Settings Model<br/>[settings.ts]"]
  node_identity_check["Identity Test<br/>[aws_auth.go]"]
end

subgraph group_frontend["Template Experience"]
  node_app_router["App Router<br/>[App.tsx]"]
  node_home["Home Page<br/>[HomePage.tsx]"]
  node_catalog["Template Catalog"]
  node_template_card["Template Card<br/>[TemplateCard.tsx]"]
  node_executor["Event Executor"]
  node_execution_field["Execution Fields<br/>[ExecutionField.tsx]"]
  node_template_api["Template API Client<br/>[api.ts]"]
  node_template_types["Template Model<br/>[types.ts]"]
end

subgraph group_backend["Grafana Backend"]
  node_plugin_app["Plugin Backend App<br/>[app.go]"]
  node_template_resources["Template Resource API"]
  node_template_repository["Template Repository"]
  node_template_store["Template Store<br/>[template_store.go]"]
  node_template_execution["Event Execution<br/>[templates.go]"]
end

subgraph group_delivery["AWS Delivery"]
  node_aws_eventbridge{{"Amazon EventBridge"}}
end

node_admin(("Grafana Admin"))
node_user(("Grafana User"))
node_provisioning["Grafana Provisioning"]

node_admin -->|"configures"| node_auth_form
node_auth_form -->|"submits settings"| node_auth_state
node_auth_state -->|"builds settings"| node_aws_settings
node_auth_state -->|"tests identity"| node_identity_check
node_admin -->|"defines templates"| node_provisioning
node_provisioning -->|"provides templates"| node_template_resources
node_app_router -->|"routes to"| node_home
node_user -->|"opens app"| node_home
node_home -->|"loads templates"| node_template_api
node_home -->|"renders catalog"| node_catalog
node_catalog -->|"renders cards"| node_template_card
node_home -->|"selects template"| node_executor
node_executor -->|"renders fields"| node_execution_field
node_executor -->|"submits event"| node_template_api
node_executor -->|"builds preview"| node_template_types
node_template_api -->|"calls resource API"| node_template_resources
node_plugin_app -.->|"serves resources"| node_template_resources
node_template_resources -.->|"loads templates"| node_template_repository
node_template_repository -.->|"reads templates"| node_template_store
node_template_resources -.->|"dispatches execution"| node_template_execution
node_template_execution -->|"puts event"| node_aws_eventbridge

click node_auth_form "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/AppConfig/AwsAuthForm.tsx"
click node_auth_state "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/AppConfig/useAwsAuthSettings.ts"
click node_aws_settings "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/aws/settings.ts"
click node_identity_check "https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/aws_auth.go"
click node_app_router "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/App/App.tsx"
click node_home "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/pages/HomePage.tsx"
click node_catalog "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateCatalog/TemplateCatalog.tsx"
click node_template_card "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateCatalog/TemplateCard.tsx"
click node_executor "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateExecutor/TemplateExecutor.tsx"
click node_execution_field "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateExecutor/ExecutionField.tsx"
click node_template_api "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/templates/api.ts"
click node_template_types "https://github.com/fino-dev/event-bridge-emitter/blob/main/src/templates/types.ts"
click node_plugin_app "https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/app.go"
click node_template_resources "https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_resources.go"
click node_template_repository "https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_repository.go"
click node_template_store "https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_store.go"
click node_template_execution "https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/templates.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_auth_form,node_auth_state,node_aws_settings,node_identity_check,node_user toneBlue
class node_app_router,node_home,node_catalog,node_template_card,node_executor,node_execution_field,node_template_api,node_template_types toneAmber
class node_plugin_app,node_template_resources,node_template_repository,node_template_store,node_template_execution toneMint
class node_aws_eventbridge toneRose
class node_admin,node_provisioning toneIndigo
```

## Components

### AWS Configuration

- [AWS Settings Form](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/AppConfig/AwsAuthForm.tsx): `src/components/AppConfig/AwsAuthForm.tsx`
- [Auth Settings Logic](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/AppConfig/useAwsAuthSettings.ts): `src/components/AppConfig/useAwsAuthSettings.ts`
- [AWS Settings Model](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/aws/settings.ts): `src/aws/settings.ts`
- [Identity Test](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/aws_auth.go): `pkg/plugin/aws_auth.go`

### Template Experience

- [App Router](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/App/App.tsx): `src/components/App/App.tsx`
- [Home Page](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/pages/HomePage.tsx): `src/pages/HomePage.tsx`
- [Template Catalog](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateCatalog/TemplateCatalog.tsx): `src/components/TemplateCatalog/TemplateCatalog.tsx`
- [Template Card](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateCatalog/TemplateCard.tsx): `src/components/TemplateCatalog/TemplateCard.tsx`
- [Event Executor](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateExecutor/TemplateExecutor.tsx): `src/components/TemplateExecutor/TemplateExecutor.tsx`
- [Execution Fields](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/components/TemplateExecutor/ExecutionField.tsx): `src/components/TemplateExecutor/ExecutionField.tsx`
- [Template API Client](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/templates/api.ts): `src/templates/api.ts`
- [Template Model](https://github.com/fino-dev/event-bridge-emitter/blob/main/src/templates/types.ts): `src/templates/types.ts`

### Grafana Backend

- [Plugin Backend App](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/app.go): `pkg/plugin/app.go`
- [Template Resource API](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_resources.go): `pkg/plugin/template_resources.go`
- [Template Repository](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_repository.go): `pkg/plugin/template_repository.go`
- [Template Store](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/template_store.go): `pkg/plugin/template_store.go`
- [Event Execution](https://github.com/fino-dev/event-bridge-emitter/blob/main/pkg/plugin/templates.go): `pkg/plugin/templates.go`

### AWS Delivery

- **Amazon EventBridge**

### Other components

- **Grafana Admin**
- **Grafana User**
- **Grafana Provisioning**

## Connections

- Grafana Admin → AWS Settings Form: configures (evidence: `README.md`)
- AWS Settings Form → Auth Settings Logic: submits settings (evidence: `src/components/AppConfig/AwsAuthForm.tsx`)
- Auth Settings Logic → AWS Settings Model: builds settings (evidence: `src/components/AppConfig/useAwsAuthSettings.ts`)
- Auth Settings Logic → Identity Test: tests identity (evidence: `README.md`)
- Grafana Admin → Grafana Provisioning: defines templates (evidence: `README.md`)
- Grafana Provisioning → Template Resource API: provides templates (evidence: `README.md`)
- App Router → Home Page: routes to (evidence: `src/components/App/App.tsx`)
- Grafana User → Home Page: opens app (evidence: `README.md`)
- Home Page → Template API Client: loads templates (evidence: `src/pages/HomePage.tsx`)
- Home Page → Template Catalog: renders catalog (evidence: `src/pages/HomePage.tsx`)
- Template Catalog → Template Card: renders cards (evidence: `src/components/TemplateCatalog/TemplateCatalog.tsx`)
- Home Page → Event Executor: selects template (evidence: `src/pages/HomePage.tsx`)
- Event Executor → Execution Fields: renders fields (evidence: `src/components/TemplateExecutor/TemplateExecutor.tsx`)
- Event Executor → Template API Client: submits event (evidence: `src/components/TemplateExecutor/TemplateExecutor.tsx`)
- Event Executor → Template Model: builds preview (evidence: `src/components/TemplateExecutor/TemplateExecutor.tsx`)
- Template API Client → Template Resource API: calls resource API (evidence: `README.md`)
- Plugin Backend App → Template Resource API: serves resources
- Template Resource API → Template Repository: loads templates
- Template Repository → Template Store: reads templates
- Template Resource API → Event Execution: dispatches execution
- Event Execution → Amazon EventBridge: puts event (evidence: `README.md`)
