docs: Add ARCHITECTURE.md with diagram of components

- For starters, this file is just a diagram of components of a
  chatmail server.  In the future, this document can grow into a more
  complete description of the architecture of the server, the
  deployment process, and the design intent behind what is and isn't
  in the code base.
- The name ARCHITECTURE.md is inspired by this article, which also has
  good suggestions about what to put in the file:
  https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html
This commit is contained in:
cliffmccarthy
2025-08-10 11:27:43 -05:00
committed by missytake
parent 3ce350de9e
commit 6b73f6933a

37
ARCHITECTURE.md Normal file
View File

@@ -0,0 +1,37 @@
This diagram shows components of the chatmail server:
```mermaid
graph LR;
cmdeploy --> sshd;
cron --> expunge;
cron --> acmetool;
cron --> chatmail-metrics;
chatmail-metrics --> /var/www/html;
acmetool --> certs;
acmetool --> acmetool-redirector;
acmetool-redirector --> certs;
nginx --> /var/www/html;
nginx --> certs;
nginx --> newemail.py;
nginx --> |465|postfix;
nginx --> autoconfig.xml;
nginx --> |993|dovecot;
autoconfig.xml --> postfix;
autoconfig.xml --> dovecot;
postfix --> certs;
postfix --> /home/vmail/mail;
postfix --> |10080,10081|filtermail;
postfix --> echobot;
postfix --> |doveauth.socket|doveauth;
dovecot --> certs;
dovecot --> |doveauth.socket|doveauth;
dovecot --> /home/vmail/mail;
dovecot --> |metadata.socket|chatmail-metadata;
doveauth --> /home/vmail/mail;
expunge --> /home/vmail/mail;
chatmail-metadata --> iroh-relay;
```
(Arrows in this diagram do not have a specific formal meaning; they
signify "depends on", or "uses", or "sends data to", or just "relates
to".)