# airencracken/witmoot architecture

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

- Interactive diagram: https://gitdiagram.com/airencracken/witmoot
- Repository: https://github.com/airencracken/witmoot

## Overview

Witmoot is a self-hosted, server-rendered bulletin board for small communities. Members sign in or join by invitation, then read and post conversations subject to board, group, and conversation access rules; owners govern accounts, boards, groups, and site settings. Images can optionally be stored through imvault, while data export, backups, and migration support community ownership and portability. The sampled sources establish startup and some integration behavior, but most handler wiring and storage calls were not shown, so uncertain internal edges are omitted.

Main entry points: [`internal/forum/web.go`](https://github.com/airencracken/witmoot/blob/master/internal/forum/web.go) (Web interface), [`internal/forum/store.go`](https://github.com/airencracken/witmoot/blob/master/internal/forum/store.go) (SQLite store), [`cmd/witmoot/main.go`](https://github.com/airencracken/witmoot/blob/master/cmd/witmoot/main.go) (HTTP server setup), [`internal/admin/admin.go`](https://github.com/airencracken/witmoot/blob/master/internal/admin/admin.go) (Administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Server runtime"]
  node_server["HTTP server setup<br/>[main.go]"]
  node_http["Web interface<br/>[web.go]"]
  node_database[("SQLite store<br/>[store.go]")]
end

subgraph group_community["Community and access"]
  node_authentication["Authentication<br/>[auth.go]"]
  node_accounts["Accounts<br/>[accounts.go]"]
  node_invitations["Invitations<br/>[invitations.go]"]
  node_boards["Boards<br/>[boards.go]"]
  node_board_lifecycle["Board lifecycle<br/>[board_lifecycle.go]"]
  node_groups["Groups and grants<br/>[groups.go]"]
  node_access["Access rules<br/>[access.go]"]
end

subgraph group_content["Conversations and media"]
  node_discussions["Discussions<br/>[discussion.go]"]
  node_discussion_page["Discussion pages<br/>[discussion_page.go]"]
  node_recent["Recent activity<br/>[recent.go]"]
  node_images["Image handling<br/>[images.go]"]
  node_avatar["Avatars<br/>[avatar.go]"]
end

subgraph group_governance["Governance and portability"]
  node_admin["Administration<br/>[admin.go]"]
  node_settings["Site settings<br/>[settings.go]"]
  node_export["Community export<br/>[export.go]"]
  node_backups["Automatic backups"]
  node_reset["Password resets<br/>[reset.go]"]
end

subgraph group_integrations["External integrations"]
  node_imvault["Imvault service"]
  node_shared_signin["Shared sign-in<br/>[provider.go]"]
  node_suite_nav["App navigation<br/>[apps.go]"]
  node_smtp["SMTP relay"]
end

node_visitors(("Visitors and members"))
node_owner(("Community owner"))

node_visitors -->|"browse and submit"| node_http
node_owner -->|"manage community"| node_http
node_server -->|"opens"| node_database
node_server -.->|"serves"| node_http
node_server -->|"starts"| node_backups
node_http -.->|"handles sign-in"| node_authentication
node_http -.->|"serves conversations"| node_discussions
node_http -.->|"serves boards"| node_boards
node_http -.->|"handles invites"| node_invitations
node_http -.->|"routes management"| node_admin
node_authentication -.->|"reads credentials"| node_database
node_accounts -.->|"creates accounts"| node_database
node_invitations -.->|"stores invitations"| node_database
node_boards -.->|"checks permissions"| node_access
node_groups -.->|"defines grants"| node_access
node_discussions -.->|"renders pages"| node_discussion_page
node_discussions -.->|"stores conversations"| node_database
node_recent -.->|"reads posts"| node_database
node_images -.->|"uses optionally"| node_imvault
node_avatar -.->|"uses optionally"| node_imvault
node_admin -.->|"manages members"| node_accounts
node_admin -.->|"manages boards"| node_boards
node_admin -.->|"manages groups"| node_groups
node_settings -.->|"stores settings"| node_database
node_export -.->|"exports data"| node_database
node_backups -.->|"backs up"| node_database
node_reset -.->|"stores reset links"| node_database
node_http -.->|"supports optional"| node_shared_signin
node_http -.->|"shows configured apps"| node_suite_nav
node_server -->|"configures optionally"| node_smtp

click node_server "https://github.com/airencracken/witmoot/blob/master/cmd/witmoot/main.go"
click node_http "https://github.com/airencracken/witmoot/blob/master/internal/forum/web.go"
click node_database "https://github.com/airencracken/witmoot/blob/master/internal/forum/store.go"
click node_authentication "https://github.com/airencracken/witmoot/blob/master/internal/forum/auth.go"
click node_accounts "https://github.com/airencracken/witmoot/blob/master/cmd/witmoot/accounts.go"
click node_invitations "https://github.com/airencracken/witmoot/blob/master/internal/forum/invitations.go"
click node_boards "https://github.com/airencracken/witmoot/blob/master/internal/forum/boards.go"
click node_board_lifecycle "https://github.com/airencracken/witmoot/blob/master/internal/forum/board_lifecycle.go"
click node_groups "https://github.com/airencracken/witmoot/blob/master/internal/forum/groups.go"
click node_access "https://github.com/airencracken/witmoot/blob/master/internal/forum/access.go"
click node_discussions "https://github.com/airencracken/witmoot/blob/master/internal/suite/discussion.go"
click node_discussion_page "https://github.com/airencracken/witmoot/blob/master/internal/suite/discussion_page.go"
click node_recent "https://github.com/airencracken/witmoot/blob/master/internal/forum/recent.go"
click node_images "https://github.com/airencracken/witmoot/blob/master/internal/forum/images.go"
click node_avatar "https://github.com/airencracken/witmoot/blob/master/internal/forum/avatar.go"
click node_admin "https://github.com/airencracken/witmoot/blob/master/internal/admin/admin.go"
click node_settings "https://github.com/airencracken/witmoot/blob/master/internal/forum/settings.go"
click node_export "https://github.com/airencracken/witmoot/blob/master/internal/forum/export.go"
click node_backups "https://github.com/airencracken/witmoot/blob/master/internal/forum/automatic_backup.go"
click node_reset "https://github.com/airencracken/witmoot/blob/master/internal/forum/reset.go"
click node_shared_signin "https://github.com/airencracken/witmoot/blob/master/internal/sharedoidc/provider.go"
click node_suite_nav "https://github.com/airencracken/witmoot/blob/master/internal/suite/apps.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_server,node_http,node_database toneBlue
class node_authentication,node_accounts,node_invitations,node_boards,node_board_lifecycle,node_groups,node_access toneAmber
class node_discussions,node_discussion_page,node_recent,node_images,node_avatar toneMint
class node_admin,node_settings,node_export,node_backups,node_reset toneRose
class node_imvault,node_shared_signin,node_suite_nav,node_smtp,node_visitors,node_owner toneIndigo
```

## Components

### Server runtime

- [HTTP server setup](https://github.com/airencracken/witmoot/blob/master/cmd/witmoot/main.go): `cmd/witmoot/main.go`
- [Web interface](https://github.com/airencracken/witmoot/blob/master/internal/forum/web.go): `internal/forum/web.go`
- [SQLite store](https://github.com/airencracken/witmoot/blob/master/internal/forum/store.go): `internal/forum/store.go`

### Community and access

- [Authentication](https://github.com/airencracken/witmoot/blob/master/internal/forum/auth.go): `internal/forum/auth.go`
- [Accounts](https://github.com/airencracken/witmoot/blob/master/cmd/witmoot/accounts.go): `cmd/witmoot/accounts.go`
- [Invitations](https://github.com/airencracken/witmoot/blob/master/internal/forum/invitations.go): `internal/forum/invitations.go`
- [Boards](https://github.com/airencracken/witmoot/blob/master/internal/forum/boards.go): `internal/forum/boards.go`
- [Board lifecycle](https://github.com/airencracken/witmoot/blob/master/internal/forum/board_lifecycle.go): `internal/forum/board_lifecycle.go`
- [Groups and grants](https://github.com/airencracken/witmoot/blob/master/internal/forum/groups.go): `internal/forum/groups.go`
- [Access rules](https://github.com/airencracken/witmoot/blob/master/internal/forum/access.go): `internal/forum/access.go`

### Conversations and media

- [Discussions](https://github.com/airencracken/witmoot/blob/master/internal/suite/discussion.go): `internal/suite/discussion.go`
- [Discussion pages](https://github.com/airencracken/witmoot/blob/master/internal/suite/discussion_page.go): `internal/suite/discussion_page.go`
- [Recent activity](https://github.com/airencracken/witmoot/blob/master/internal/forum/recent.go): `internal/forum/recent.go`
- [Image handling](https://github.com/airencracken/witmoot/blob/master/internal/forum/images.go): `internal/forum/images.go`
- [Avatars](https://github.com/airencracken/witmoot/blob/master/internal/forum/avatar.go): `internal/forum/avatar.go`

### Governance and portability

- [Administration](https://github.com/airencracken/witmoot/blob/master/internal/admin/admin.go): `internal/admin/admin.go`
- [Site settings](https://github.com/airencracken/witmoot/blob/master/internal/forum/settings.go): `internal/forum/settings.go`
- [Community export](https://github.com/airencracken/witmoot/blob/master/internal/forum/export.go): `internal/forum/export.go`
- [Automatic backups](https://github.com/airencracken/witmoot/blob/master/internal/forum/automatic_backup.go): `internal/forum/automatic_backup.go`
- [Password resets](https://github.com/airencracken/witmoot/blob/master/internal/forum/reset.go): `internal/forum/reset.go`

### External integrations

- **Imvault service**
- [Shared sign-in](https://github.com/airencracken/witmoot/blob/master/internal/sharedoidc/provider.go): `internal/sharedoidc/provider.go`
- [App navigation](https://github.com/airencracken/witmoot/blob/master/internal/suite/apps.go): `internal/suite/apps.go`
- **SMTP relay**

### Other components

- **Visitors and members**
- **Community owner**

## Connections

- Visitors and members → Web interface: browse and submit (evidence: `README.md`)
- Community owner → Web interface: manage community (evidence: `README.md`)
- HTTP server setup → SQLite store: opens (evidence: `cmd/witmoot/main.go`)
- HTTP server setup → Web interface: serves
- HTTP server setup → Automatic backups: starts (evidence: `cmd/witmoot/main.go`)
- Web interface → Authentication: handles sign-in
- Web interface → Discussions: serves conversations
- Web interface → Boards: serves boards
- Web interface → Invitations: handles invites
- Web interface → Administration: routes management
- Authentication → SQLite store: reads credentials
- Accounts → SQLite store: creates accounts
- Invitations → SQLite store: stores invitations
- Boards → Access rules: checks permissions
- Groups and grants → Access rules: defines grants
- Discussions → Discussion pages: renders pages
- Discussions → SQLite store: stores conversations
- Recent activity → SQLite store: reads posts
- Image handling → Imvault service: uses optionally (evidence: `README.md`)
- Avatars → Imvault service: uses optionally (evidence: `README.md`)
- Administration → Accounts: manages members
- Administration → Boards: manages boards
- Administration → Groups and grants: manages groups
- Site settings → SQLite store: stores settings
- Community export → SQLite store: exports data
- Automatic backups → SQLite store: backs up
- Password resets → SQLite store: stores reset links
- Web interface → Shared sign-in: supports optional
- Web interface → App navigation: shows configured apps
- HTTP server setup → SMTP relay: configures optionally (evidence: `cmd/witmoot/main.go`)
