latexgrambot: inline LaTeX bot for Telegram in Go

Renders LaTeX expressions into PNG pictures, PDF documents and native
Telegram rich text messages, entirely locally with TeX Live and poppler.

- Chat mode with /image, /pdf, /rich plus per-user preamble and DPI
- Inline mode delivering picture, PDF and rich text results
- Broad default package set preloaded into a TeX format at image build
- MongoDB persistence: settings, users, groups, render statistics
- Private S3-compatible bucket with short-lived presigned URLs
- OpenTelemetry traces over OTLP
- Kubernetes manifests and Argo CD application, Docker Compose, GitHub
  Actions CI, BSD 3-Clause license
This commit is contained in:
corrado.mulas
2026-10-04 03:38:08 +02:00
commit 98a3614d58
29 changed files with 5140 additions and 0 deletions

31
k8s/secret.example.yaml Normal file
View File

@@ -0,0 +1,31 @@
# Copy to a private file, fill in the values and apply it manually:
# kubectl apply -f latexgrambot-secrets.yaml
#
# Two secrets are used so the S3 credentials can be managed separately from
# the Telegram token.
---
apiVersion: v1
kind: Secret
metadata:
name: latexgrambot-secrets
namespace: latexgrambot
labels:
app.kubernetes.io/name: latexgrambot
type: Opaque
stringData:
# The token must not be long-polled by any other process (Telegram
# delivers updates to a single consumer per token).
TELEGRAM_BOT_TOKEN: "replace-with-bot-token"
---
apiVersion: v1
kind: Secret
metadata:
name: latexgrambot-s3
namespace: latexgrambot
labels:
app.kubernetes.io/name: latexgrambot
type: Opaque
stringData:
# Credentials of an S3-compatible bucket (read/write on S3_BUCKET).
AWS_ACCESS_KEY_ID: "replace-with-s3-access-key"
AWS_SECRET_ACCESS_KEY: "replace-with-s3-secret-key"