2.7 KiB
2.7 KiB
Project: Mattermore
Purpose
Mattermore is a Mattermost (Community Edition) plugin that connects chat to
remote LLMs via Ollama. Users invoke it with a /ai slash command and
receive streamed AI responses directly in the channel.
Structure
mattermore/
├── DESIGN.md — Functional design document
├── DECISIONS.md — Design rationale log
├── PROJECT.md — This file
├── CHANGES.md — Per-release changelog
├── README.md — User-facing docs
├── plugin.json — Mattermost plugin manifest
├── Makefile — Build, lint, dist targets
├── .gitignore — Go + plugin ignores
├── server/
│ ├── main.go — Plugin entry point (OnActivate, ExecuteCommand)
│ ├── plugin.go — Core plugin struct and hooks
│ ├── configuration.go — Config reading and validation
│ ├── command.go — Slash command parsing and dispatch
│ ├── ollama/
│ │ ├── client.go — Ollama API client (ChatCompletion, ListModels, Ping)
│ │ └── client_test.go — Unit tests (mocked HTTP server)
│ ├── store/
│ │ ├── conversation.go — KV-backed conversation storage
│ │ └── conversation_test.go
│ └── rate/
│ └── limiter.go — Token-bucket rate limiter
└── webapp/ (future — optional)
└── .placeholder
Key Files
| Path | Purpose |
|---|---|
plugin.json |
Manifest: id, name, version, settings schema |
server/main.go |
OnActivate(), OnDeactivate(), ExecuteCommand() |
server/ollama/client.go |
HTTP client for Ollama REST API |
server/store/conversation.go |
Context persistence via Mattermost KV store |
DESIGN.md |
Full functional design with open decisions |
DECISIONS.md |
Record of architectural decisions and their rationale |
External Dependencies
- Go ≥ 1.21 (toolchain)
- Mattermost Server ≥ v8.x (plugin API)
- Ollama (remote inference server)
- Go modules (see
go.mod):github.com/mattermost/mattermost-server/v6— Plugin SDK- Standard library only for Ollama HTTP client (no external AI SDKs)
Release Cadence
- Tags:
v0.x.y - CI builds on tag (see
.gitea/workflows/ci.yml) - Plugin bundle published as Gitea release artifact
- Follows
release-workflowskill: draft → user test → publish
Documentation
DESIGN.md— functional design (living document)DECISIONS.md— why key decisions were madeCHANGES.md— user-facing changelogREADME.md— quick start, config reference, build instructions