# darshseraphic/xaciona architecture

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

- Interactive diagram: https://gitdiagram.com/darshseraphic/xaciona
- Repository: https://github.com/darshseraphic/xaciona

## Overview

XACIONA is a self-hosted office messaging application: people use a browser to register or sign in, join conversations, exchange messages and files, and manage accounts and settings. The browser UI talks to the server API; the server coordinates persistent records and live WebSocket delivery. The README documents broader messaging, administration, security, and server-dashboard capabilities that are not all visible in the sampled excerpts. The tree contains duplicate root and Xaciona/ source sets; the diagram centers the root set and marks the latter as mirrored code. Connections reflect README statements or shown source references.

Main entry points: [`app/main.py`](https://github.com/darshseraphic/xaciona/blob/main/app/main.py) (HTTP and WebSocket API), [`app/static/app.js`](https://github.com/darshseraphic/xaciona/blob/main/app/static/app.js) (Messaging UI), [`run.py`](https://github.com/darshseraphic/xaciona/blob/main/run.py) (Server launcher), [`app/security.py`](https://github.com/darshseraphic/xaciona/blob/main/app/security.py) (Password and token tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser interface"]
  node_webui["Messaging UI<br/>[app.js]"]
  node_emoji["Emoji catalogue<br/>[emoji-data.js]"]
  node_theme["Theme bootstrap<br/>[theme-init.js]"]
end

subgraph group_server["Application server"]
  node_api["HTTP and WebSocket API<br/>[main.py]"]
  node_live["Live connection hub<br/>[hub.py]"]
  node_settings["Runtime settings<br/>[config.py]"]
  node_launcher["Server launcher<br/>[run.py]"]
end

subgraph group_security["Identity and safeguards"]
  node_auth["Password and token tools<br/>[security.py]"]
  node_throttle["Persistent rate limiting<br/>[rate_limit.py]"]
end

subgraph group_persistence["Persistent data"]
  node_sqlite[("Application database<br/>[db.py]")]
  node_uploads[("File blob storage<br/>[config.py]")]
end

node_people(("Office users"))
node_mirrorapp["Mirrored app modules"]
node_mirrorrun["Mirrored launcher<br/>[run.py]"]

node_people -->|"use browser"| node_webui
node_webui -->|"send requests"| node_api
node_api -->|"serve interface"| node_webui
node_api -->|"read and write"| node_sqlite
node_api -->|"dispatch updates"| node_live
node_api -->|"authenticate"| node_auth
node_api -->|"limit attempts"| node_throttle
node_api -->|"store attachments"| node_uploads
node_webui -->|"use catalogue"| node_emoji
node_webui -->|"initialize theme"| node_theme
node_launcher -->|"start service"| node_api
node_launcher -->|"initialize database"| node_sqlite
node_launcher -->|"create administrator"| node_auth

click node_webui "https://github.com/darshseraphic/xaciona/blob/main/app/static/app.js"
click node_emoji "https://github.com/darshseraphic/xaciona/blob/main/app/static/emoji-data.js"
click node_theme "https://github.com/darshseraphic/xaciona/blob/main/app/static/theme-init.js"
click node_api "https://github.com/darshseraphic/xaciona/blob/main/app/main.py"
click node_live "https://github.com/darshseraphic/xaciona/blob/main/app/hub.py"
click node_settings "https://github.com/darshseraphic/xaciona/blob/main/app/config.py"
click node_auth "https://github.com/darshseraphic/xaciona/blob/main/app/security.py"
click node_throttle "https://github.com/darshseraphic/xaciona/blob/main/app/rate_limit.py"
click node_sqlite "https://github.com/darshseraphic/xaciona/blob/main/app/db.py"
click node_uploads "https://github.com/darshseraphic/xaciona/blob/main/app/config.py"
click node_mirrorapp "https://github.com/darshseraphic/xaciona/tree/main/Xaciona/app"
click node_mirrorrun "https://github.com/darshseraphic/xaciona/blob/main/Xaciona/run.py"
click node_launcher "https://github.com/darshseraphic/xaciona/blob/main/run.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_webui,node_emoji,node_theme,node_people toneBlue
class node_api,node_live,node_settings,node_launcher toneAmber
class node_auth,node_throttle toneMint
class node_sqlite,node_uploads toneRose
class node_mirrorapp,node_mirrorrun toneTeal
```

## Components

### Browser interface

- [Messaging UI](https://github.com/darshseraphic/xaciona/blob/main/app/static/app.js): `app/static/app.js`
- [Emoji catalogue](https://github.com/darshseraphic/xaciona/blob/main/app/static/emoji-data.js): `app/static/emoji-data.js`
- [Theme bootstrap](https://github.com/darshseraphic/xaciona/blob/main/app/static/theme-init.js): `app/static/theme-init.js`

### Application server

- [HTTP and WebSocket API](https://github.com/darshseraphic/xaciona/blob/main/app/main.py): `app/main.py`
- [Live connection hub](https://github.com/darshseraphic/xaciona/blob/main/app/hub.py): `app/hub.py`
- [Runtime settings](https://github.com/darshseraphic/xaciona/blob/main/app/config.py): `app/config.py`
- [Server launcher](https://github.com/darshseraphic/xaciona/blob/main/run.py): `run.py`

### Identity and safeguards

- [Password and token tools](https://github.com/darshseraphic/xaciona/blob/main/app/security.py): `app/security.py`
- [Persistent rate limiting](https://github.com/darshseraphic/xaciona/blob/main/app/rate_limit.py): `app/rate_limit.py`

### Persistent data

- [Application database](https://github.com/darshseraphic/xaciona/blob/main/app/db.py): `app/db.py`
- [File blob storage](https://github.com/darshseraphic/xaciona/blob/main/app/config.py): `app/config.py`

### Other components

- **Office users**
- [Mirrored app modules](https://github.com/darshseraphic/xaciona/tree/main/Xaciona/app): `Xaciona/app`
- [Mirrored launcher](https://github.com/darshseraphic/xaciona/blob/main/Xaciona/run.py): `Xaciona/run.py`

## Connections

- Office users → Messaging UI: use browser (evidence: `README.md`)
- Messaging UI → HTTP and WebSocket API: send requests (evidence: `README.md`)
- HTTP and WebSocket API → Messaging UI: serve interface (evidence: `README.md`)
- HTTP and WebSocket API → Application database: read and write (evidence: `app/main.py`)
- HTTP and WebSocket API → Live connection hub: dispatch updates (evidence: `app/main.py`)
- HTTP and WebSocket API → Password and token tools: authenticate (evidence: `app/main.py`)
- HTTP and WebSocket API → Persistent rate limiting: limit attempts (evidence: `app/main.py`)
- HTTP and WebSocket API → File blob storage: store attachments (evidence: `README.md`)
- Messaging UI → Emoji catalogue: use catalogue (evidence: `README.md`)
- Messaging UI → Theme bootstrap: initialize theme (evidence: `README.md`)
- Server launcher → HTTP and WebSocket API: start service (evidence: `run.py`)
- Server launcher → Application database: initialize database (evidence: `run.py`)
- Server launcher → Password and token tools: create administrator (evidence: `run.py`)
