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

41
argocd-application.yaml Normal file
View File

@@ -0,0 +1,41 @@
# Optional: GitOps deployment with Argo CD. Point repoURL at your fork,
# adjust the project and the destination namespace.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: latexgrambot
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/your-org/latexgrambot.git
targetRevision: main
path: k8s
directory:
recurse: false
# secret.example.yaml is intentionally excluded: the Telegram token
# and the S3 credentials are applied manually and must never reach
# the repository.
include: '{configmap.yaml,deployment.yaml,service.yaml}'
destination:
server: https://kubernetes.default.svc
namespace: latexgrambot
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m