Skip to content
Baytae Tistear edited this page Jul 7, 2026 · 5 revisions

SDAC Project Wiki

SDAC is a Discord media submission, guessing-game, moderation, and web dashboard system. It lets Discord users submit screenshots, images, audio, and video through guided slash commands, while server staff manage categories, approvals, games, leaderboards, releases, backups, users, and server settings from Discord or the Flask dashboard.

This wiki documents the public and operational parts of the project. It intentionally does not include secrets, live tokens, private credentials, database contents, or private user data.

Main Categories

  1. Overview - what SDAC is, how the parts fit together, and where to start.
  2. Roles and Permissions - user, trusted, moderator, admin, server owner, and bot owner behavior.
  3. Bot - Discord commands, submissions, games, polls, setup, backups, and bot-owner controls.
  4. Dashboard - public pages, admin pages, sidebar/theme/layout controls, OAuth, and APIs.
  5. Server - production path, services, environment variables, Nginx, health, and deployment.
  6. Maintenance and Backups - backups, restores, storage cleanup, migrations, and doctor checks.
  7. Releases and Updates - official and experimental channels, version rules, update notifications, and scope labels.
  8. App - SDACCompanion, Android builds, signing, backend API expectations, and SDK app direction.
  9. Data and Privacy - what data exists, how it is scoped, and what to avoid publishing.
  10. Troubleshooting - common failures and first checks.

System Shape

SDAC is built around one shared backend/source of truth:

  • bot.py runs the Discord bot and slash commands.
  • dashboard.py runs the Flask dashboard and lightweight API endpoints.
  • database_migrations.py manages SQLite schema evolution.
  • database_backend.py provides the database abstraction and experimental PostgreSQL mode.
  • config.json stores non-secret server/guild configuration.
  • .env or the production env file stores secrets and deployment-specific values.
  • sdac.db stores submissions, users, games, votes, audit history, and runtime data.
  • media/ stores uploaded or generated media that should not be committed.
  • server/ mirrors files intended for deployment packaging.
  • apps/sdac-official-app/ contains the current SDACCompanion app scaffold.

Source Of Truth

The Flask dashboard and Discord bot both rely on the same database and configuration. The app should also treat the Flask dashboard/backend as the source of truth. Do not duplicate role rules, server selection rules, or submission state in the app without an API-backed sync path.

Security Rule

Never put real secrets in the wiki. Document names and locations only:

  • Good: DISCORD_TOKEN belongs in the server .env.
  • Bad: pasting the token value.

This applies to Discord tokens, OAuth client secrets, database dumps, private rclone configs, keystores, signing passwords, admin passwords, user emails beyond examples, and production private keys.

Update Rule

When a feature changes, update the matching wiki page in the same work:

Future app updates should remove the web-wrapper app approach and move to the SDK app approach.

Clone this wiki locally