# asozialesnetzwerk/an-website architecture

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

- Interactive diagram: https://gitdiagram.com/asozialesnetzwerk/an-website
- Repository: https://github.com/asozialesnetzwerk/an-website

## Overview

AN Website is a Python web application with browser-side features and integrations. Its principal flow is an HTTP request entering the application, passing through shared request handling, and reaching a feature handler that returns a page or API response. The tree and excerpts also show quote browsing and voting, search, emoji chat, and operational integrations. Several feature files are unsampled, so their internal call paths are not asserted; shared-layer links are included only where the excerpts or source index support them.

Main entry points: [`an_website/utils/request_handler.py`](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/request_handler.py) (Request handling), [`an_website/main.py`](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/main.py) (Application startup), [`an_website/utils/background_tasks.py`](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/background_tasks.py) (Background tasks), [`an_website/search/search.py`](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/search/search.py) (Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_runtime["Application startup<br/>[main.py]"]
end

subgraph group_web["Web framework"]
  node_handlers["Request handling<br/>[request_handler.py]"]
  node_base["Base handlers"]
end

subgraph group_features["Website features"]
  node_search["Search<br/>[search.py]"]
  node_quotes["Quotes<br/>[quotes.py]"]
  node_quote_data["Quote data<br/>[utils.py]"]
  node_quote_images["Quote images<br/>[image.py]"]
  node_chat["Emoji chat<br/>[chat.py]"]
  node_chat_pubsub["Chat pub/sub"]
  node_contact["Contact form<br/>[contact.py]"]
  node_swapped["Swapped words<br/>[swap.py]"]
  node_soundboard["Soundboard<br/>[soundboard.py]"]
  node_settings["Settings<br/>[settings.py]"]
  node_uptime["Uptime<br/>[uptime.py]"]
end

subgraph group_infra["Shared services"]
  node_background["Background tasks"]
  node_elastic_setup["Elasticsearch setup"]
  node_elasticsearch[("Elasticsearch")]
  node_redis[("Redis")]
  node_config["Configuration"]
  node_static_files["Static files"]
  node_data_parsing["Data parsing<br/>[data_parsing.py]"]
  node_decorators["Request decorators<br/>[decorators.py]"]
  node_options["Options and themes<br/>[options.py]"]
  node_themes["Theme support<br/>[themes.py]"]
  node_logging["Logging<br/>[logging.py]"]
  node_utils["Shared utilities<br/>[utils.py]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests site"| node_runtime
node_runtime -->|"loads config"| node_config
node_runtime -->|"starts tasks"| node_background
node_runtime -->|"configures assets"| node_static_files
node_runtime -->|"uses handlers"| node_handlers
node_handlers -->|"extends"| node_base
node_search -->|"uses handlers"| node_handlers
node_search -->|"searches quotes"| node_quote_data
node_search -->|"searches soundboard"| node_soundboard
node_quotes -->|"loads quote data"| node_quote_data
node_quotes -->|"uses images"| node_quote_images
node_chat -->|"uses pub/sub"| node_chat_pubsub
node_chat -->|"stores messages"| node_redis
node_contact -->|"uses handlers"| node_handlers
node_contact -.->|"sends email"| node_visitor
node_swapped -->|"parses input"| node_data_parsing
node_settings -->|"uses options"| node_options
node_settings -->|"uses themes"| node_themes
node_uptime -->|"uses handlers"| node_handlers
node_background -->|"sets up search"| node_elastic_setup
node_elastic_setup -->|"configures"| node_elasticsearch
node_background -->|"checks health"| node_redis
node_background -->|"checks health"| node_elasticsearch
node_handlers -->|"uses decorators"| node_decorators
node_handlers -->|"serves assets"| node_static_files
node_options -->|"reads settings"| node_base
node_logging -.->|"posts webhook"| node_visitor

click node_runtime "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/main.py"
click node_handlers "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/request_handler.py"
click node_base "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/base_request_handler.py"
click node_search "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/search/search.py"
click node_quotes "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/quotes/quotes.py"
click node_quote_data "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/quotes/utils.py"
click node_quote_images "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/quotes/image.py"
click node_chat "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/emoji_chat/chat.py"
click node_chat_pubsub "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/emoji_chat/pub_sub_provider.py"
click node_contact "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/contact/contact.py"
click node_swapped "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/swapped_words/swap.py"
click node_soundboard "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/soundboard/soundboard.py"
click node_settings "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/settings/settings.py"
click node_uptime "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/uptime/uptime.py"
click node_background "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/background_tasks.py"
click node_elastic_setup "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/elasticsearch_setup.py"
click node_config "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/better_config_parser.py"
click node_static_files "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/static_file_handling.py"
click node_data_parsing "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/data_parsing.py"
click node_decorators "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/decorators.py"
click node_options "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/options.py"
click node_themes "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/themes.py"
click node_logging "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/logging.py"
click node_utils "https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/utils.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_runtime toneBlue
class node_handlers,node_base toneAmber
class node_search,node_quotes,node_quote_data,node_quote_images,node_chat,node_chat_pubsub,node_contact,node_swapped,node_soundboard,node_settings,node_uptime toneMint
class node_background,node_elastic_setup,node_elasticsearch,node_redis,node_config,node_static_files,node_data_parsing,node_decorators,node_options,node_themes,node_logging,node_utils toneRose
class node_visitor toneIndigo
```

## Components

### Application

- [Application startup](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/main.py): `an_website/main.py`

### Web framework

- [Request handling](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/request_handler.py): `an_website/utils/request_handler.py`
- [Base handlers](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/base_request_handler.py): `an_website/utils/base_request_handler.py`

### Website features

- [Search](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/search/search.py): `an_website/search/search.py`
- [Quotes](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/quotes/quotes.py): `an_website/quotes/quotes.py`
- [Quote data](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/quotes/utils.py): `an_website/quotes/utils.py`
- [Quote images](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/quotes/image.py): `an_website/quotes/image.py`
- [Emoji chat](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/emoji_chat/chat.py): `an_website/emoji_chat/chat.py`
- [Chat pub/sub](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/emoji_chat/pub_sub_provider.py): `an_website/emoji_chat/pub_sub_provider.py`
- [Contact form](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/contact/contact.py): `an_website/contact/contact.py`
- [Swapped words](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/swapped_words/swap.py): `an_website/swapped_words/swap.py`
- [Soundboard](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/soundboard/soundboard.py): `an_website/soundboard/soundboard.py`
- [Settings](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/settings/settings.py): `an_website/settings/settings.py`
- [Uptime](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/uptime/uptime.py): `an_website/uptime/uptime.py`

### Shared services

- [Background tasks](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/background_tasks.py): `an_website/utils/background_tasks.py`
- [Elasticsearch setup](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/elasticsearch_setup.py): `an_website/utils/elasticsearch_setup.py`
- **Elasticsearch**
- **Redis**
- [Configuration](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/better_config_parser.py): `an_website/utils/better_config_parser.py`
- [Static files](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/static_file_handling.py): `an_website/utils/static_file_handling.py`
- [Data parsing](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/data_parsing.py): `an_website/utils/data_parsing.py`
- [Request decorators](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/decorators.py): `an_website/utils/decorators.py`
- [Options and themes](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/options.py): `an_website/utils/options.py`
- [Theme support](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/themes.py): `an_website/utils/themes.py`
- [Logging](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/logging.py): `an_website/utils/logging.py`
- [Shared utilities](https://github.com/asozialesnetzwerk/an-website/blob/main/an_website/utils/utils.py): `an_website/utils/utils.py`

### Other components

- **Visitor**

## Connections

- Visitor → Application startup: requests site
- Application startup → Configuration: loads config (evidence: `an_website/main.py`)
- Application startup → Background tasks: starts tasks (evidence: `an_website/main.py`)
- Application startup → Static files: configures assets (evidence: `an_website/main.py`)
- Application startup → Request handling: uses handlers (evidence: `an_website/main.py`)
- Request handling → Base handlers: extends (evidence: `an_website/utils/request_handler.py`)
- Search → Request handling: uses handlers (evidence: `an_website/search/search.py`)
- Search → Quote data: searches quotes (evidence: `an_website/search/search.py`)
- Search → Soundboard: searches soundboard (evidence: `an_website/search/search.py`)
- Quotes → Quote data: loads quote data (evidence: `an_website/quotes/quotes.py`)
- Quotes → Quote images: uses images (evidence: `an_website/quotes/quotes.py`)
- Emoji chat → Chat pub/sub: uses pub/sub (evidence: `an_website/emoji_chat/chat.py`)
- Emoji chat → Redis: stores messages (evidence: `an_website/emoji_chat/chat.py`)
- Contact form → Request handling: uses handlers (evidence: `an_website/contact/contact.py`)
- Contact form → Visitor: sends email
- Swapped words → Data parsing: parses input (evidence: `an_website/swapped_words/swap.py`)
- Settings → Options and themes: uses options (evidence: `an_website/settings/settings.py`)
- Settings → Theme support: uses themes (evidence: `an_website/settings/settings.py`)
- Uptime → Request handling: uses handlers (evidence: `an_website/uptime/uptime.py`)
- Background tasks → Elasticsearch setup: sets up search (evidence: `an_website/utils/background_tasks.py`)
- Elasticsearch setup → Elasticsearch: configures (evidence: `an_website/utils/elasticsearch_setup.py`)
- Background tasks → Redis: checks health (evidence: `an_website/utils/background_tasks.py`)
- Background tasks → Elasticsearch: checks health (evidence: `an_website/utils/background_tasks.py`)
- Request handling → Request decorators: uses decorators
- Request handling → Static files: serves assets
- Options and themes → Base handlers: reads settings (evidence: `an_website/utils/options.py`)
- Logging → Visitor: posts webhook
