No description
  • Go 96.4%
  • Shell 3.6%
Find a file
Andrea Zucchelli de2714c3fa
All checks were successful
release / build-and-release (push) Successful in 1m15s
fix(ui): escape dash in HTML group-name pattern
2026-03-24 00:04:25 +01:00
.forgejo/workflows feat: add proxy-aware config, release workflow, and service unit 2026-03-21 13:04:48 +01:00
cmd feat: secure debug endpoint with auth key 2026-03-21 14:37:57 +01:00
docs docs: add UI screenshot to README 2026-03-21 14:47:33 +01:00
internal fix(ui): escape dash in HTML group-name pattern 2026-03-24 00:04:25 +01:00
packaging/systemd feat: add managed-group cleanup lifecycle 2026-03-21 14:04:15 +01:00
scripts feat: add proxy-aware config, release workflow, and service unit 2026-03-21 13:04:48 +01:00
.gitignore feat: initial galene ui web app 2026-03-21 04:11:55 +01:00
config.example.yaml feat: secure debug endpoint with auth key 2026-03-21 14:37:57 +01:00
go.mod feat: add proxy-aware config, release workflow, and service unit 2026-03-21 13:04:48 +01:00
go.sum feat: initial galene ui web app 2026-03-21 04:11:55 +01:00
LICENSE docs: add AGPL-3.0 license 2026-03-21 19:05:27 +01:00
main.go feat: add proxy-aware config, release workflow, and service unit 2026-03-21 13:04:48 +01:00
README.md docs: add AGPL-3.0 license 2026-03-21 19:05:27 +01:00

galene-ui

Minimal anonymous web UI for creating Galene groups and redirecting users to the room URL.

Screenshot

Galene UI screenshot

Features

  • Go backend using Gin.
  • CLI and configuration management with Cobra + Viper.
  • Configurable via flags, environment variables, or YAML config file.
  • HTMX (local static asset, version 2.0.8) for progressive enhancement.
  • English and Italian UI pages.
  • Creates <group>.json in Galene group directory with an anonymous-friendly template.
  • In-memory synchronized group counter.
  • Automatic cleanup of empty groups based on Galene .status.

Build

./scripts/build.sh

Custom output path:

./scripts/build.sh /tmp/galene-ui

Version check:

./dist/galene-ui --version

Run

./dist/galene-ui \
  --listen 127.0.0.1:8090 \
  --prefix /galene-ui \
  --trusted-proxies 127.0.0.1/32,::1/128 \
  --galene-public-url https://galene.example.org \
  --galene-group-dir /var/lib/galene/groups \
  --max-groups 50 \
  --max-body-bytes 8192 \
  --empty-group-cleanup-timeout 10m \
  --cleanup-poll-interval 30s

Reverse Proxy Notes

  • Use prefix when serving the app under a sub-path (for example /galene-ui).
  • galene-public-url is optional for redirects, but required when empty-group cleanup is enabled.
  • galene-ui-public-url is optional. Default is relative links (works well behind reverse proxy/prefix).
  • Set galene-ui-public-url only if you explicitly need absolute language links.
  • Configure trusted_proxies with proxy CIDRs or IPs. Default is empty (trust disabled).
  • Security headers are set directly by the app response.

Cleanup Logic

  • Cleanup polls /group/<name>/.status; if clientCount == 0 continuously for empty-group-cleanup-timeout, the group JSON file is deleted.
  • max-groups and cleanup apply only to managed groups:
    • "public": true
    • "wildcard-user": { "password": { "type": "wildcard" } }
    • other keys (including "permissions") are ignored for detection.
  • At startup, if existing managed groups are more than max-groups, the limit is automatically raised to that count.
  • Debug endpoint is enabled only when debug_key is set and the correct ?auth= value is provided.

Routes

With prefix: /galene-ui:

  • GET /galene-ui/ default English UI
  • GET /galene-ui/en English UI
  • GET /galene-ui/it Italian UI
  • POST /galene-ui/fragments/group/:lang HTMX fragment endpoint
  • GET /galene-ui/debug/monitored-groups?auth=<debug_key> debug JSON

Environment variables

  • GALENE_UI_LISTEN
  • GALENE_UI_PREFIX
  • GALENE_UI_TRUSTED_PROXIES (comma-separated)
  • GALENE_UI_GALENE_PUBLIC_URL
  • GALENE_UI_GALENE_UI_PUBLIC_URL
  • GALENE_UI_GALENE_GROUP_DIR
  • GALENE_UI_DEBUG_KEY
  • GALENE_UI_MAX_GROUPS
  • GALENE_UI_MAX_BODY_BYTES
  • GALENE_UI_EMPTY_GROUP_CLEANUP_TIMEOUT (for example 10m, set 0 to disable)
  • GALENE_UI_CLEANUP_POLL_INTERVAL (for example 30s)
  • GALENE_UI_CONFIG

YAML config

Use --config /path/to/config.yaml or place config.yaml in working directory.

See config.example.yaml.

Release automation

  • Forgejo workflow: .forgejo/workflows/release.yml
  • Trigger: push of a tag matching v*
  • Output: release with linux-amd64 and linux-arm64 binaries
  • Release notes: generated from semantic commit subjects since the previous tag

License

AGPL-3.0-only. See LICENSE.