---
title: Contributing
type: guide
summary: How to contribute to the Distats Panel open-source project.
related:
  - /docs/getting-started
  - /docs/tech-stack
---

# Contributing



Distats Panel is open source [#distats-panel-is-open-source]

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

Prerequisites [#prerequisites]

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

Setting up a development environment [#setting-up-a-development-environment]

1\. Fork and clone the repository [#1-fork-and-clone-the-repository]

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

2\. Install dependencies [#2-install-dependencies]

```bash
npm install
```

3\. Create the config file [#3-create-the-config-file]

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

```json
{
  "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 [#4-create-a-test-user]

```bash
npx distats-cli@latest create-user
```

5\. Start the dev server [#5-start-the-dev-server]

```bash
npm run dev
```

The panel will be available at [http://localhost:3000](http://localhost:3000).

***

Submitting a pull request [#submitting-a-pull-request]

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

Commit message conventions [#commit-message-conventions]

We follow the [Conventional Commits](https://www.conventionalcommits.org/) spec:

| Prefix      | When 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 [#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 [#reporting-issues]

Found a bug? [Open an issue](https://github.com/distats/panel/issues) with:

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