Skip to content
Baytae Tistear edited this page Jul 12, 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. Installation and Setup - install order and setup map.
    • Server Installation - full production server install.
    • Bot Setup - Discord application, bot invite, slash commands, channels, categories, and server features.
    • Server Owner Quick Setup - fast invite, /sdac setup, custom command names, command sync, and restart checks.
    • Dashboard Setup - admin accounts, OAuth, Nginx/HTTPS, sidebar/theme/layout, and public pages.
  3. Core Components - how the major SDAC pieces work after setup.
    • Server - production path, services, environment variables, Nginx, health, and deployment.
    • Bot - Discord commands, submissions, games, polls, setup, backups, and bot-owner controls.
    • Dashboard - public pages, admin pages, sidebar/theme/layout controls, OAuth, and APIs.
    • App - SDACCompanion, Android builds, signing, backend API expectations, and SDK app direction.
  4. Administration - access, permissions, and data/privacy handling.
  5. Operations - production care, releases, and troubleshooting.

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