Fluxy bot codebase used for Checksum Flux.
  • TypeScript 99.4%
  • Shell 0.2%
  • JavaScript 0.2%
Find a file
2026-06-19 20:04:51 +02:00
.forgejo chore(deps): batch renovate bumps (#170-#181) 2026-06-14 18:13:45 -04:00
.github style: prettier on copilot-instructions and CLAUDE.md 2026-06-13 11:25:29 -04:00
dashboard fluxeusercontent.com 2026-06-19 00:05:00 +02:00
docker Add Docker assets for split bot/web compose stack 2026-06-14 16:24:39 -04:00
docs the checksumining 2026-06-18 22:43:33 +02:00
k8s chore: not needed 2026-06-16 02:21:25 +00:00
logs Import of the CENTURY. 2026-03-25 14:13:15 -04:00
packages/fluxerjs-ws the checksumining 2026-06-18 22:43:33 +02:00
scripts fix(i18n): sync missing locale keys from en.json 2026-06-13 01:51:54 -04:00
src maybe fix dashboard not looking up roles and channels 2026-06-19 20:04:51 +02:00
tests the checksumining 2026-06-18 22:43:33 +02:00
.dockerignore Add Docker assets for split bot/web compose stack 2026-06-14 16:24:39 -04:00
.env.docker.example Trim self-host docs 2026-06-14 16:40:23 -04:00
.env.example Document docker and k8s self-host paths in README 2026-06-14 16:38:15 -04:00
.gitignore Add self-host k8s deployment guide 2026-06-14 16:25:09 -04:00
.prettierignore fix(ci): ignore fluxerjs-ws dist from prettier, bump ban test timeout 2026-06-13 01:45:56 -04:00
.prettierrc Import of the CENTURY. 2026-03-25 14:13:15 -04:00
CHANGELOG.md Trim self-host docs 2026-06-14 16:40:23 -04:00
CLAUDE.md style: prettier on copilot-instructions and CLAUDE.md 2026-06-13 11:25:29 -04:00
CODE_OF_CONDUCT.md I have added the initial documentation files :P 2026-03-25 18:26:30 -04:00
COMMERCIAL.md chore(license): switch from ELv2 to AGPL-3.0 2026-06-13 01:12:44 -04:00
CONTRIBUTING.md chore(license): switch from ELv2 to AGPL-3.0 2026-06-13 01:12:44 -04:00
crowdin.yml Update Crowdin configuration file 2026-03-31 12:45:31 -04:00
deploy.sh deploy: rsync docs to /var/www for Caddy 2026-06-13 12:54:47 -04:00
docker-compose.yml fix(ci): sticky locales, docs generate, prettier 2026-06-14 16:45:39 -04:00
Dockerfile chore(deps): batch renovate bumps (#170-#181) 2026-06-14 18:13:45 -04:00
ecosystem.config.js feat: split bot and web into separate processes 2026-06-13 01:12:44 -04:00
eslint.config.js finish i18n and clean up missed runtime strings 2026-04-06 19:21:54 -04:00
LICENSE chore(license): switch from ELv2 to AGPL-3.0 2026-06-13 01:12:44 -04:00
package.json chore(deps): batch renovate bumps (#170-#181) 2026-06-14 18:13:45 -04:00
pnpm-lock.yaml fix(ci): restore pnpm overrides in lockfiles 2026-06-14 18:25:57 -04:00
pnpm-workspace.yaml add VitePress docs site with guides, CI, and deploy wiring 2026-06-13 12:39:51 -04:00
README.md the checksumining 2026-06-18 22:43:33 +02:00
renovate.json chore(renovate): pin actions to v4 and lucide below 1.18 (#149) 2026-06-13 04:22:21 +00:00
SECURITY.md apply formatting to remaining utility and test files 2026-04-06 19:19:13 -04:00
server-icon.png Import of the CENTURY. 2026-03-25 14:13:15 -04:00
tsconfig.json clean the lint warnings and migrate to ts 6.0.2 2026-04-01 19:13:24 -04:00

Fluxy

License: AGPL-3.0 Node Crowdin

Fluxy is a Fluxer moderation and server-management bot written in TypeScript.

Moderation - ban, kick, warn, timeout, and the usual suspects
Automod - anti-link, anti-spam, anti-raid, ghost ping detection
Admin & utility - tickets, reaction roles, verification, logging, lockdown
Optional - REST API + dashboard backend


Just want the bot?

Use the hosted version. You get updates and infrastructure without doing anything at all!

Invite Fluxy to your server
Community & support: fluxer.gg/fluxy

The rest of this README is for self-hosters and contributors etc.


Self-hosting

Requirements

  • Node.js >=22
  • pnpm
  • MongoDB

Quick start

# 1. Install
pnpm install

# 2. Copy and fill in the env file
cp .env.example .env

# 3. Dev
pnpm run dev

# 4. Or build + run prod
pnpm run build && pnpm start

The two env vars you actually need to set are TOKEN and MONGO_URI. Everything else has a default or is optional.

Environment variables

Full list is in .env.example. The ones you'll actually touch:

Variable Required Default Description
TOKEN - Bot token
MONGO_URI - MongoDB connection string
PREFIX ! Default command prefix
OWNER_ID - Your user ID for owner-only commands
API_ENABLED false Enable the API/dashboard backend
API_PORT 4000 Port for the API
API_ADMIN_TOKEN - Privileged API access token - make it strong
FLUXER_OAUTH_CLIENT_ID - OAuth client ID
FLUXER_OAUTH_CLIENT_SECRET - OAuth client secret
FLUXER_OAUTH_REDIRECT_URI - OAuth redirect URI
DASHBOARD_URL - Dashboard origin for CORS
BOT_INTERNAL_BIND 127.0.0.1 Internal API bind (0.0.0.0 in k8s)
GATEWAY_SESSION_PATH cwd Gateway session file
GLITCHTIP_DSN - Optional error reporting

Scripts

Command What it does
pnpm run dev Watch mode
pnpm run build Compile TS → build/
pnpm start Run compiled bot
pnpm test Run tests
pnpm run test:watch Watch tests
pnpm run test:coverage Coverage report
pnpm run lint ESLint
pnpm run i18n:check Validate locale JSON files (keys + placeholders vs en.json)

Localization

Strings live under src/locales/: en.json is the source; other files are named by locale (for example de.json, zh-CN.json). The bot loads every *.json in that folder at runtime; pnpm run build copies them into build/locales/ for production.

Crowdin: Fluxy on Crowdin — translations are synced from this repo via crowdin.yml (source src/locales/en.json, translations src/locales/%locale%.json).

Deployment

Fluxy runs fine standalone or under PM2. There are pm2:* scripts in package.json for that. Don't commit your .env, and if you're enabling the API, set a strong API_ADMIN_TOKEN.

Uptime alerts: the dashboard only shows status when you open it. docs/MONITORING.md.

Docker Compose

cp .env.docker.example .env
docker compose up -d --build

Bot + web + mongo. Port 4000. docker-compose.yml.

Kubernetes

k8s/base/ — mongo, bot, web, ingress.

cp k8s/base/secret.example.yaml k8s/base/secret.yaml
kubectl apply -f k8s/base/secret.yaml
kubectl apply -k k8s/base/

Image: git.fluxy.gay/dog/fluxy:latest. docs/K8S.md, docs/FLUXERHOST.md.

k8s/docker: BOT_INTERNAL_BIND=0.0.0.0, GATEWAY_SESSION_PATH=/data/.gateway-session.json.


Contributing

PRs and issues are welcome. See CONTRIBUTING.md.


License

Licensed under AGPL-3.0 — see LICENSE.

Self-host and modify freely. If you run a modified version as a network service, you need to offer users the corresponding source. Need different terms? See COMMERCIAL.md.