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

# How It Works

> The architecture behind extratime.gg — Discord-first competitive management.

# How It Works

extratime.gg is built around one idea: **your Discord server is the hub**. The web dashboard is for setup and stats — the action happens in Discord.

## The flow

```mermaid theme={null}
graph LR
    A[Admin adds bot] --> B[Configure settings]
    B --> C[Players sign in via Discord]
    C --> D[Create teams]
    D --> E[Queue scrims / Enter tournaments]
    E --> F[Bot creates match channels]
    F --> G[Report results]
    G --> H[ELO updates + Leaderboard]
```

## Discord bot

The extratime bot handles:

* **Match notifications** — posts results, upcoming matches, and bracket updates to your chosen channel
* **Match channels** — auto-creates and archives text channels for each match so teams can coordinate
* **Role sync** — assigns Discord roles based on team membership, rank, or tournament placement

The bot syncs its state with the web dashboard in real time. Admin actions on the dashboard are reflected in Discord immediately, and vice versa.

## ELO system

extratime uses a modified ELO rating system:

* Every team starts at **1000 ELO**
* Points gained or lost depend on the relative rating of both teams
* Beating a higher-rated team gives more points; losing to a lower-rated team costs more
* ELO is tracked per-server — a team's rating in one community is independent of another

## Data model

| Entity             | Description                                                              |
| ------------------ | ------------------------------------------------------------------------ |
| **Server (Guild)** | A Discord server connected to extratime. All data is scoped to a server. |
| **Team**           | A group of players with a captain, roster, and ELO rating.               |
| **Player**         | A Discord user with a profile, rank, and match history.                  |
| **Match**          | A recorded game between two teams with a result and ELO change.          |
| **Tournament**     | A bracket competition with registrations, seeding, and rounds.           |
| **Scrim**          | A one-off match request that gets paired through the scrim queue.        |
