First off — thank you for taking the time to contribute! 🎉
This document explains how to set up your environment, the standards we follow, and how to submit changes. By participating, you agree to abide by our Code of Conduct.
- Ways to Contribute
- Development Setup
- Branching & Commits
- Code Style
- Testing
- Submitting a Pull Request
- Reporting Bugs
- Security Issues
- 🐛 Report bugs — open a bug report.
- 💡 Suggest features — open a feature request.
- 📖 Improve docs — typo fixes and clarifications are always welcome.
- 🧩 Submit code — pick up an open issue or propose a change.
For anything non-trivial, please open an issue first to discuss the approach before investing time in a pull request.
- Docker & Docker Compose
- Python 3.11+ (for backend work without Docker)
- Node.js 20+ (for frontend work without Docker)
git clone https://github.com/sanmaxdev/twingrid-binance.git
cd twingrid-binance
cp .env.example .env # then edit values
docker compose up -dcd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
alembic upgrade head
uvicorn app.main:app --reload --port 8000cd frontend
npm install
npm run dev- Branch off
master:git checkout -b feat/short-descriptionorfix/short-description. - We follow Conventional Commits:
feat:a new featurefix:a bug fixdocs:documentation onlyrefactor:code change that neither fixes a bug nor adds a featuretest:adding or fixing testschore:tooling, dependencies, build
Example: fix: prevent duplicate grid orders on websocket reconnect
- Formatted and linted with ruff (config in
backend/pyproject.toml). - Type-checked with mypy (strict mode).
cd backend
ruff check app # lint
ruff check --fix app # auto-fix where possible
ruff format app # format
mypy app # type checkNote:
ruff checkandruff format --checkrun in CI and must pass. Keep new and changed code ruff-clean and formatted.
- Linted with ESLint (
eslint-config-next).
cd frontend
npm run lintcd backend
pytest -vThe test suite is in its early stages — new features and bug fixes should include tests. This is one of the most valuable ways to contribute right now.
- Fork the repo and create your branch from
master. - Make your changes, with tests where applicable.
- Ensure the backend tests pass and your code is ruff-clean.
- Update documentation if you changed behavior.
- Open a PR using the template — fill in the description and check the boxes.
- Link any related issues (
Closes #123).
A maintainer will review your PR. CI must pass (the Backend · Tests check is required).
Use the bug report template. Include steps to reproduce, expected vs. actual behavior, and your environment.
Do not open public issues for security vulnerabilities. Please follow the process in SECURITY.md to report them privately.
Thanks again for helping make TWIN GRID better! ⚡