Contributing

Distats Panel is open source

Contributions of all kinds are welcome — bug fixes, documentation improvements, new features, or UI enhancements.

Prerequisites

  • Node.js 18+
  • Git
  • A Discord bot token for testing

Setting up a development environment

1. Fork and clone the repository

git clone https://github.com/distats/panel.git
cd panel

2. Install dependencies

npm install

3. Create the config file

Create @distats_panel/config.json manually (or run npx distats-cli@latest init in a copy of the directory):

{
  "bot_token": "YOUR_TEST_BOT_TOKEN",
  "session_secret": "a-random-secret-string-for-dev",
  "database_type": "sqlite",
  "db_path": "./@distats_panel/database.sqlite",
  "installed_at": "",
  "repo": ""
}

4. Create a test user

npx distats-cli@latest create-user

5. Start the dev server

npm run dev

The panel will be available at http://localhost:3000.


Submitting a pull request

  1. Create a new branch from main:
    git checkout -b feat/your-feature-name
  2. Make your changes and commit with a descriptive message:
    git commit -m "feat: add your feature"
  3. Push your branch:
    git push origin feat/your-feature-name
  4. Open a Pull Request on GitHub against the main branch

Commit message conventions

We follow the Conventional Commits spec:

PrefixWhen to use
feat:New feature
fix:Bug fix
docs:Documentation changes
style:Formatting, no logic changes
refactor:Code restructuring without feature changes
chore:Build process, dependency updates

Code style

  • TypeScript is required for all new code
  • Follow the existing patterns in the codebase (Next.js App Router, Server Actions)
  • Keep components small and focused

Reporting issues

Found a bug? Open an issue with:

  • A clear description of the problem
  • Steps to reproduce
  • Your Node.js and npm version
  • Any relevant error messages or screenshots