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

# Matrix

# Matrix

Synapse homeserver with PostgreSQL for the AI assistant project. Messages from external platforms (Telegram, Discord, WhatsApp, iMessage) will be bridged into Matrix, where an AI bot processes and responds via LLM APIs.

## Status

* [x] Synapse + PostgreSQL deployed
* [x] Traefik routing at `matrix.augustin.ai`
* [x] Admin user `@admin:augustin.ai` created
* [ ] `.well-known` delegation (serve from `augustin.ai`)
* [ ] AI bot (Matrix client that listens and routes to LLM backends)
* [ ] Bridges (mautrix: Telegram, Discord, WhatsApp, iMessage)
* [x] Web-based Matrix client (Element Web)

## Architecture

```
External Platforms → mautrix bridges → Synapse ← AI Bot → LLM APIs
                                         ↑
                                    PostgreSQL
                                         ↑
                                    Element Web
```

## Access

* Synapse: `https://matrix.augustin.ai`
* Element Web: `https://element.augustin.ai`
* Admin user: `@admin:augustin.ai`
* Credentials: stored in `.env`

## Configuration

* `compose.yaml` — Synapse + PostgreSQL + Element Web services
* `element-config.json` — Element Web client configuration
* `homeserver.yaml` — Synapse config (gitignored, contains secrets)
* `log.config` — Synapse logging config
* `.env` — Database password, registration secret, admin credentials

## Well-Known Delegation (TODO)

For federation and client discovery, `augustin.ai` needs to serve:

* `https://augustin.ai/.well-known/matrix/server` → `{"m.server": "matrix.augustin.ai:443"}`
* `https://augustin.ai/.well-known/matrix/client` → `{"m.homeserver": {"base_url": "https://matrix.augustin.ai"}}`

## Next Steps

1. Set up `.well-known` delegation via Cloudflare or Traefik
2. Build the AI bot as a Matrix appservice
3. Deploy mautrix bridges for external platforms
4. Add a web client (Element Web or Cinny)
