# amolenk/admitto architecture

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

- Interactive diagram: https://gitdiagram.com/amolenk/admitto
- Repository: https://github.com/amolenk/admitto

## Overview

Admitto is an open-source ticketing system for small, free events. Its principal workflow is public event registration, with team administrators managing events and registrations and partners accessing event data; registrations also support scanner sessions and exports. The API composes organization, registration, badge, and email modules, while a worker loads those modules and consumes a shared queue. The tree shows persistence and email delivery subsystems, but their runtime wiring and most domain interactions were not sampled, so those connections are omitted. Auth0 is documented for production; local development uses Keycloak.

Main entry points: [`src/Admitto.Api/Program.cs`](https://github.com/amolenk/admitto/blob/main/src/Admitto.Api/Program.cs) (HTTP API), [`src/Admitto.Worker/Program.cs`](https://github.com/amolenk/admitto/blob/main/src/Admitto.Worker/Program.cs) (Background worker), [`src/Admitto.Core/Organization`](https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Organization) (Teams and identity), [`src/Admitto.Api/Auth/UserContextResolutionMiddleware.cs`](https://github.com/amolenk/admitto/blob/main/src/Admitto.Api/Auth/UserContextResolutionMiddleware.cs) (Authentication context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and identity"]
  node_api["HTTP API<br/>[Program.cs]"]
  node_auth["Authentication context"]
  node_identity_provider["Identity provider"]
end

subgraph group_events["Event operations"]
  node_organization["Teams and identity<br/>[Organization]"]
  node_registrations["Events and registration<br/>[Registrations]"]
  node_badges["Badges<br/>[Badges]"]
end

subgraph group_messaging["Email delivery"]
  node_email["Email preparation"]
  node_smtp["SMTP delivery"]
end

subgraph group_runtime["Persistence and workers"]
  node_registration_store[("Registration persistence<br/>[Persistence]")]
  node_badge_store[("Badge persistence<br/>[BadgesDbContext.cs]")]
  node_email_store[("Email persistence<br/>[EmailDbContext.cs]")]
  node_worker["Background worker<br/>[Program.cs]"]
end

node_attendees(("Attendees"))
node_admins(("Team admins"))
node_partners(("Partners"))

node_attendees -.->|"registers publicly"| node_api
node_admins -.->|"manages events"| node_api
node_partners -.->|"accesses event data"| node_api
node_api -->|"resolves user context"| node_auth
node_api -->|"loads module"| node_organization
node_api -->|"loads module"| node_registrations
node_api -->|"loads module"| node_badges
node_api -->|"loads module"| node_email
node_auth -->|"resolves user"| node_organization
node_api -->|"checks API key"| node_organization
node_worker -->|"loads module"| node_badges
node_worker -->|"loads module"| node_email
node_worker -->|"loads module"| node_organization
node_worker -->|"loads module"| node_registrations
node_identity_provider -.->|"supplies identity"| node_auth
node_email -.-> node_smtp

click node_api "https://github.com/amolenk/admitto/blob/main/src/Admitto.Api/Program.cs"
click node_auth "https://github.com/amolenk/admitto/blob/main/src/Admitto.Api/Auth/UserContextResolutionMiddleware.cs"
click node_organization "https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Organization"
click node_registrations "https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Registrations"
click node_badges "https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Badges"
click node_email "https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Email/Application/UseCases/Emails/PrepareEmailDelivery"
click node_smtp "https://github.com/amolenk/admitto/blob/main/src/Admitto.Core/Email/Infrastructure/Sending/MailKitEmailSender.cs"
click node_registration_store "https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Registrations/Application/Persistence"
click node_badge_store "https://github.com/amolenk/admitto/blob/main/src/Admitto.Core/Badges/Infrastructure/Persistence/BadgesDbContext.cs"
click node_email_store "https://github.com/amolenk/admitto/blob/main/src/Admitto.Core/Email/Infrastructure/Persistence/EmailDbContext.cs"
click node_worker "https://github.com/amolenk/admitto/blob/main/src/Admitto.Worker/Program.cs"

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_api,node_auth,node_identity_provider toneBlue
class node_organization,node_registrations,node_badges toneAmber
class node_email,node_smtp toneMint
class node_registration_store,node_badge_store,node_email_store,node_worker toneRose
class node_attendees,node_admins,node_partners toneIndigo
```

## Components

### API and identity

- [HTTP API](https://github.com/amolenk/admitto/blob/main/src/Admitto.Api/Program.cs): `src/Admitto.Api/Program.cs`
- [Authentication context](https://github.com/amolenk/admitto/blob/main/src/Admitto.Api/Auth/UserContextResolutionMiddleware.cs): `src/Admitto.Api/Auth/UserContextResolutionMiddleware.cs`
- **Identity provider**

### Event operations

- [Teams and identity](https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Organization): `src/Admitto.Core/Organization`
- [Events and registration](https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Registrations): `src/Admitto.Core/Registrations`
- [Badges](https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Badges): `src/Admitto.Core/Badges`

### Email delivery

- [Email preparation](https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Email/Application/UseCases/Emails/PrepareEmailDelivery): `src/Admitto.Core/Email/Application/UseCases/Emails/PrepareEmailDelivery`
- [SMTP delivery](https://github.com/amolenk/admitto/blob/main/src/Admitto.Core/Email/Infrastructure/Sending/MailKitEmailSender.cs): `src/Admitto.Core/Email/Infrastructure/Sending/MailKitEmailSender.cs`

### Persistence and workers

- [Registration persistence](https://github.com/amolenk/admitto/tree/main/src/Admitto.Core/Registrations/Application/Persistence): `src/Admitto.Core/Registrations/Application/Persistence`
- [Badge persistence](https://github.com/amolenk/admitto/blob/main/src/Admitto.Core/Badges/Infrastructure/Persistence/BadgesDbContext.cs): `src/Admitto.Core/Badges/Infrastructure/Persistence/BadgesDbContext.cs`
- [Email persistence](https://github.com/amolenk/admitto/blob/main/src/Admitto.Core/Email/Infrastructure/Persistence/EmailDbContext.cs): `src/Admitto.Core/Email/Infrastructure/Persistence/EmailDbContext.cs`
- [Background worker](https://github.com/amolenk/admitto/blob/main/src/Admitto.Worker/Program.cs): `src/Admitto.Worker/Program.cs`

### Other components

- **Attendees**
- **Team admins**
- **Partners**

## Connections

- Attendees → HTTP API: registers publicly (evidence: `README.md`)
- Team admins → HTTP API: manages events (evidence: `README.md`)
- Partners → HTTP API: accesses event data (evidence: `README.md`)
- HTTP API → Authentication context: resolves user context (evidence: `src/Admitto.Api/Program.cs`)
- HTTP API → Teams and identity: loads module (evidence: `src/Admitto.Api/Program.cs`)
- HTTP API → Events and registration: loads module (evidence: `src/Admitto.Api/Program.cs`)
- HTTP API → Badges: loads module (evidence: `src/Admitto.Api/Program.cs`)
- HTTP API → Email preparation: loads module (evidence: `src/Admitto.Api/Program.cs`)
- Authentication context → Teams and identity: resolves user (evidence: `src/Admitto.Api/Auth/UserContextResolutionMiddleware.cs`)
- HTTP API → Teams and identity: checks API key
- Background worker → Badges: loads module (evidence: `src/Admitto.Worker/Program.cs`)
- Background worker → Email preparation: loads module (evidence: `src/Admitto.Worker/Program.cs`)
- Background worker → Teams and identity: loads module (evidence: `src/Admitto.Worker/Program.cs`)
- Background worker → Events and registration: loads module (evidence: `src/Admitto.Worker/Program.cs`)
- Identity provider → Authentication context: supplies identity (evidence: `README.md`)
- Email preparation → SMTP delivery
