Thank you for investing your time in contributing to SoroScan!
SoroScan is an open-source indexing layer designed to make Soroban smart contract data accessible and queryable. Whether you're fixing a bug, improving documentation, or building a new feature, we welcome your involvement.
For more detailed contributor guidance:
- 🔰 Getting Started: Read the Developer Onboarding Guide.
- 🎨 Code Style & Linting: Follow the Code Style Guidelines.
- 🌿 Git & PR Workflows: See the Git & PR Workflow Guide.
- 📄 Writing Documentation: See the Documentation Contribution Guide.
- 🤝 Community & Code of Conduct: Read the Community Standards.
- 📝 Logging Standards: Follow the Logging Standards.
- 🏛️ Architecture Decisions: Review the Architecture Decision Records.
By participating in this project you agree to abide by our Community Standards & Code of Conduct.
We are committed to making participation in SoroScan a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
Security vulnerabilities should not be reported through public issues. See the Security Issues section below.
Before starting your first contribution, complete the following checklist:
- Fork
SoroScan/soroscanon GitHub. - Clone your fork locally.
- Add the official SoroScan repository as
upstream. - Fetch the latest upstream changes.
- Check out an up-to-date
devbranch. - Install the dependencies required for the area you are changing.
- Configure the local backend environment if required.
- Install frontend dependencies if required.
- Install the repository pre-commit hooks.
- Run the relevant tests and lint checks.
- Create a contribution branch from
dev. - Keep changes limited to the assigned issue.
- Push your branch to your fork.
- Open a pull request against
dev.
Install the tools required for the area of SoroScan you plan to work on.
Core tools include:
- Git
- Python
- Node.js
- pnpm
- Docker
- Docker Compose
Rust and Cargo are also required when contributing to the Soroban contracts.
Check your installed tools:
git --version
python --version
node --version
pnpm --version
docker --version
docker compose versionOn systems where Python is available as python3, use:
python3 --versionFork:
https://github.com/SoroScan/soroscan
Then clone your fork:
git clone https://github.com/<your-username>/soroscan.git
cd soroscanYour fork should be configured as origin.
Verify:
git remote -vAdd the main SoroScan repository:
git remote add upstream https://github.com/SoroScan/soroscan.git
git fetch upstreamVerify:
git remote -vA typical setup should contain:
origin https://github.com/<your-username>/soroscan.git
upstream https://github.com/SoroScan/soroscan.git
If upstream already exists, simply run:
git fetch upstreamContributor branches should be created from the latest dev branch.
If dev already exists locally:
git switch dev
git pull --ff-only upstream devIf you do not yet have a local dev branch:
git switch -c dev --track upstream/devConfirm your branch:
git branch --show-currentExpected output:
dev
Create a descriptive branch from the updated dev branch:
git switch -c <branch-name>Recommended prefixes include:
feat/
fix/
docs/
refactor/
chore/
Examples:
feat/add-contract-filter
fix/webhook-retry-status
docs/contributor-onboarding
Do not make contribution commits directly on dev or main.
From the repository root, the quickest way to start the local stack is:
docker compose up --buildCheck running services:
docker compose psCommon local endpoints include:
Backend: http://localhost:8000
GraphQL: http://localhost:8000/graphql/
Frontend: http://localhost:3000
Stop the stack with:
docker compose downFrom the repository root:
cd django-backendCreate a virtual environment:
python -m venv .venvActivate it on Linux, macOS, WSL, or Git Bash:
source .venv/bin/activateOn Windows PowerShell:
.venv\Scripts\Activate.ps1Install dependencies:
pip install -r requirements.txtCreate the environment file if needed:
cp .env.example .envDo not commit .env files, credentials, API keys, JWTs, webhook secrets, or private keys.
Apply migrations:
python manage.py migrateStart the backend:
python manage.py runserverThe GraphQL endpoint is available at:
http://localhost:8000/graphql/
From the repository root:
cd soroscan-frontend
pnpm installStart the development server:
pnpm run devThe frontend normally runs at:
http://localhost:3000
Generate GraphQL types:
pnpm run codegenWhen generating against a running local backend on Bash, Git Bash, Linux, or macOS:
GRAPHQL_ENDPOINT=http://localhost:8000/graphql/ pnpm run codegenWatch GraphQL files and regenerate automatically:
pnpm run codegen:watchSoroScan provides a repository-level .pre-commit-config.yaml.
The configured hooks check:
- trailing whitespace;
- end-of-file newlines;
- YAML syntax;
- accidentally added large files;
- Python formatting with Black;
- Python linting with Flake8;
- Python import ordering with isort.
Install the tool:
python -m pip install pre-commitFrom the repository root, install the Git hook:
pre-commit installRun all hooks manually:
pre-commit run --all-filesAfter installation, the configured hooks run automatically when you create a commit.
If a hook modifies a file, review the change, stage it again, and rerun the checks.
Do not routinely bypass pre-commit using --no-verify. Fix the reported issue instead.
Run tests and checks relevant to the part of the repository you changed.
From django-backend/:
pytestOr:
make testRun linting:
ruff check .Or:
make lintCheck Black formatting:
black --check .Apply formatting when required:
make formatRun an individual backend test file when appropriate:
pytest soroscan/ingest/tests/test_schema.pyFrom soroscan-frontend/:
Run Jest tests:
pnpm testRun tests in CI mode:
pnpm run test:ciRun ESLint:
pnpm run lintRun GraphQL Code Generator:
pnpm run codegenRun the production build:
pnpm run buildRun Playwright end-to-end tests:
pnpm run test:e2eRun accessibility tests:
pnpm run test:a11yFrom admin/:
npm install
npm run lintFrom soroban-contracts/soroscan_core/:
cargo fmt --check
cargo clippy -- -D warnings
cargo testFrom sdk/typescript/, run the scripts relevant to your change, including:
pnpm testFrom sdk/python/:
ruff check .
pytestFor documentation-only pull requests:
- review the rendered Markdown;
- verify links and file paths;
- verify commands against the current repository;
- check examples for obvious syntax errors;
- run applicable pre-commit checks;
- confirm that no unrelated files were changed.
Check for whitespace errors with:
git diff --check- Browse the repository's GitHub Issues.
- Filter by
good-first-issueif you are new. - Comment that you would like to work on the issue when required.
- Wait for maintainer assignment when the task requires it.
- Read the complete issue description and acceptance criteria before starting.
Keep your contribution focused on the assigned issue.
Avoid unrelated refactors, dependency upgrades, formatting changes, or bug fixes in the same pull request.
Before creating a contribution branch:
git fetch upstream
git switch dev
git pull --ff-only upstream devThen create your branch:
git switch -c <branch-name>Use Conventional Commits:
<type>(<optional-scope>): <description>
Optional issue footer:
Closes #123
Allowed types include:
feat
fix
docs
style
refactor
perf
test
chore
Examples:
feat(ingest): support parallel streaming of event logs
fix(sdk-python): retry failed service requests
docs: add contributor onboarding instructions
cd django-backend
black .
ruff check .
pytestcd soroscan-frontend
pnpm run lint
pnpm testFor GraphQL changes:
pnpm run codegencd admin
npm run lintcd soroban-contracts/soroscan_core
cargo fmt --check
cargo clippy -- -D warnings
cargo test| Sub-project | Main test command |
|---|---|
django-backend |
pytest |
soroscan-frontend |
pnpm test |
soroscan-frontend end-to-end |
pnpm run test:e2e |
admin |
Run relevant package checks |
soroban-contracts |
cargo test |
sdk/typescript |
pnpm test |
sdk/python |
pytest |
New features should include appropriate tests.
Bug fixes should include a regression test where practical.
Documentation-only changes should validate documentation, links, examples, and applicable repository checks.
Fetch the latest upstream changes:
git fetch upstreamMake sure you are on your contribution branch:
git branch --show-currentThen rebase on the latest dev:
git rebase upstream/devIf conflicts occur:
- resolve the conflicting files;
- stage the resolved files:
git add <resolved-file>- continue the rebase:
git rebase --continueBefore committing or opening the PR:
git status
git diff
git diff --checkConfirm:
- only files required by the issue were changed;
- no credentials or environment files were added;
- required tests or documentation checks pass;
- the acceptance criteria are satisfied.
Push to your fork:
git push -u origin <branch-name>For later updates:
git pushIf you rebased a branch that was already pushed, use:
git push --force-with-lease origin <branch-name>Use force-with-lease only for your own contribution branch.
Open the PR with:
base: dev
compare: <your-branch>
Use a clear Conventional Commit-style title.
Examples:
docs: add contributor onboarding guide
fix(webhooks): handle delivery timeout
feat(graphql): add event filtering
Use GitHub closing keywords when the PR fully resolves an issue:
Closes #123
If one PR intentionally resolves multiple assigned issues:
Closes #123
Closes #124
Closes #125
Only list issues actually resolved by the PR.
Use the structure below when appropriate:
## Summary
Briefly describe what this PR changes and why.
## Changes
- Change one
- Change two
- Change three
## Testing
Describe how the change was verified.
Commands run:
```bash
<command>Closes #123
Add screenshots when required by the issue or when they help reviewers verify a UI change.
- Changes are limited to the assigned issue
- Relevant tests/checks pass
- Documentation is updated where required
- No secrets or environment files are committed
- Conventional Commit format is used
- PR targets
dev
---
## 👀 Review Process
After opening the PR:
1. wait for CI checks to complete;
2. respond to reviewer feedback;
3. make requested changes on the same branch;
4. commit and push the updates;
5. allow GitHub to update the existing PR.
Do not open a new PR for each review round.
Accepted contributions are normally merged according to the maintainers' repository workflow.
---
## 🏷️ Issue Labels
| Label | Meaning |
|---|---|
| `good-first-issue` | Simple fix suitable for first-time contributors |
| `bug` | Something is not working as intended |
| `enhancement` | New feature or UX improvement |
| `documentation` | Missing or outdated documentation |
| `priority/high` | Blocker, critical bug, or core-path dependency |
| `help-wanted` | Needs an external contributor with specific skills |
| `needs-info` | Waiting for reproduction details or clarification |
| `wontfix` | Out of scope or duplicate |
| `design` | UI/UX design task or design-system specification |
---
## 🔒 Security Issues
**Do not open a public issue for security vulnerabilities.**
Use the repository's private GitHub Security reporting features or contact the maintainers directly.
Never publish credentials, private keys, access tokens, webhook secrets, or security-sensitive exploit details in a public issue or pull request.
---
## 🤝 Community & Recognition
When asking for help with a setup problem, include:
- your operating system;
- the command you ran;
- the relevant error output;
- troubleshooting you already attempted.
Never include credentials or other sensitive information in logs posted publicly.
Full contributor documentation is available under [`docs/contributing/`](docs/contributing/).
Thank you for contributing to SoroScan!