This guide is designed to get a new SoroScan developer from zero to first contribution in under 2 hours. It includes local setup, running the full stack, understanding the codebase, and submitting your first PR.
If you prefer a quick local start, use the Docker Compose path in Section 3.
Install the following tools on your machine:
- Python 3.12+
- Node.js 18+
- Docker Engine and Docker Compose
- Git
Open a terminal and confirm versions:
python --version
node --version
docker --version
docker compose version
git --version- Linux or macOS: easiest for local services and
docker compose - Windows: use WSL 2 for best compatibility with Docker and Python virtual environments
- Fork the
SoroScan/soroscanrepository in GitHub. - Clone your fork:
git clone https://github.com/<your-username>/soroscan.git
cd soroscan- Add the upstream remote:
git remote add upstream https://github.com/SoroScan/soroscan.git
git fetch upstream- Create a working branch for your first change:
git checkout -b feat/onboarding-first-contributionSoroScan is a polyrepo with:
django-backend/for API and ingestionsoroscan-frontend/for the customer-facing exploreradmin/for the admin dashboardsoroban-contracts/for the Soroban smart contractssdk/for Python and TypeScript SDK packages
The fastest local setup is the repository root Docker Compose stack.
docker compose up --buildOpen a second terminal and verify the stack:
docker compose psThen visit:
- Backend:
http://localhost:8000 - Frontend explorer:
http://localhost:3000
cd django-backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envEdit django-backend/.env and confirm the local database and Redis values.
If you use Docker Compose, the default values inside the web service are already configured.
Run migrations:
python manage.py migrateStart the backend locally:
python manage.py runservercd ../soroscan-frontend
pnpm installIf the frontend needs generated GraphQL types, run:
GRAPHQL_ENDPOINT=http://localhost:8000/graphql/ pnpm run codegenStart the frontend:
pnpm run devcd ../admin
npm install
npm run devBy default the admin app will run on ports beginning at 3001.
cd ../soroban-contracts/soroscan_core
cargo test
cargo build --target wasm32-unknown-unknown --releaseIf you are only working on backend or frontend features, you can skip contract compilation for your first contribution.
From the repository root:
docker compose up --build- Start PostgreSQL and Redis manually.
- Start the backend:
python manage.py runserver - Start the frontend:
pnpm run dev - Start the admin dashboard:
npm run dev
Open these URLs:
http://localhost:8000/readyshould return200 OKhttp://localhost:3000should show the SoroScan explorer
If the stack is healthy, open the explorer and verify at least one event row appears. If the explorer did not load or no events appear, continue to Section 12 for troubleshooting.
manage.py— Django command-line entrypointrequirements.txt— Python dependenciessoroscan/— Django project and appssoroscan/ingest/— ingestion models, serializers, views, GraphQL schema, testssoroscan/ingest/tests/— backend unit and integration tests
package.json— frontend dependencies and scriptsapp/— Next.js app routes and pagessrc/— shared UI components and GraphQL helpersgenerated/— generated GraphQL typesGRAPHQL_CODEGEN_SETUP.md— how to regenerate GraphQL types
package.json— admin dashboard dependenciesapp/— admin dashboard source code and pagescomponents/— reusable admin UI components
soroscan_core/— Rust smart contract that emits indexed eventsCargo.toml— Rust package configuration
python/— Python SDK packagetypescript/— TypeScript SDK packageREADME.md— SDK usage and contribution references
getting-started.md— user-focused onboarding for SDKs and APIdeployment/— deployment and Docker Compose guidesapi-reference/— generated OpenAPI/API docs
- Use repository search for keywords such as
event_type,filter,graphql, orCelery. - Start from the user-facing feature and follow the call chain.
Example: event filtering
- Backend model:
django-backend/soroscan/ingest/models.py - Backend view filters:
django-backend/soroscan/ingest/views.py - GraphQL query handling:
django-backend/soroscan/ingest/schema.py - Frontend filter UI:
soroscan-frontend/app/dashboard/components/FilterBar.tsx - Frontend timeline filter:
soroscan-frontend/components/ingest/TimelineView.tsx
- Backend tests:
django-backend/soroscan/ingest/tests/ - Frontend tests:
soroscan-frontend/__tests__/andsoroscan-frontend/app/ - Contract tests:
soroban-contracts/soroscan_core/
Search for .test.py, .spec.ts, or .test.tsx when you need related coverage.
- Django settings:
django-backend/soroscan/settings.py - Backend environment:
django-backend/.env.example - Frontend environment:
soroscan-frontend/.envif present ornext.config.ts - Admin environment:
admin/package.json - Docker Compose:
docker-compose.yml
- Python: PEP 8,
black,ruff - TypeScript/React:
pnpm lint,pnpm test - Rust:
cargo fmt,cargo clippy - Git commits: use clear scopes such as
feat:,fix:,docs:
- Keep
mainin sync:
git fetch upstream
git checkout main
git merge upstream/main- Create a feature branch:
git checkout -b feat/describe-your-change- Commit often with focused changes.
- Push your branch to your fork:
git push origin feat/describe-your-change- Open a PR against
main.
- Check for issues labeled
good-first-issue. - If
ALT_ISSUES.mdexists at the repository root, review it for starter tasks. - If you are unsure, ask a maintainer in the issue comments.
- Choose a small bug or documentation issue.
- Reproduce the issue locally in the full stack.
- Edit the code and run a focused test.
- Commit the change with a concise message.
- Push your branch and open a PR.
- Ensure your local
mainbranch is current. - Pick one small scope for your first change.
- Add an issue comment: "I’d like to work on this."
cd django-backend
source .venv/bin/activate
pytestor
python manage.py testcd soroscan-frontend
pnpm install
pnpm testcd soroban-contracts/soroscan_core
cargo test- Find the component or function you changed.
- Add a new test file or extend an existing one.
- Run the targeted test case.
- Confirm it passes before pushing.
- There is no strict numeric requirement, but every bug fix or feature should include a regression test.
- For docs or process-only PRs, validate the steps and links rather than code coverage.
Use this checklist before opening a pull request:
- My branch is based on up-to-date
main - I ran relevant tests locally
- I included a clear PR title and description
- I linked the issue I am solving
- I added any required migration files
- I followed the repo’s code style
feat: add event filter dropdown to explorerfix: resolve backend event query bugdocs: add onboarding guide
- What changed
- Why it was needed
- How to verify locally
- Link to issue or discussion
- Confirm the database process is running on
5432. - Confirm
DATABASE_URLpoints to the right host and port. - In Docker Compose, run:
docker compose logs db- Confirm Redis is running on
6379. - In Docker Compose, run:
docker compose logs redis- Common ports:
5432,6379,8000,3000,3001 - If a port is already in use, stop the conflicting service or change the mapping in
docker-compose.yml.
- Delete
node_modulesand reinstall:
rm -rf node_modules
pnpm install- If you see lockfile mismatch errors, do not commit a changed lockfile unless you updated dependencies intentionally.
If the local database is inconsistent, use the helper script:
./scripts/reset.sh- Verify the backend is healthy at
http://localhost:8000/ready - Confirm the frontend is running at
http://localhost:3000 - Inspect the backend logs for ingestion errors
- Restart the stack if needed
Recommended extensions:
- Python
- Pylance
- ESLint
- Tailwind CSS IntelliSense
- Rust Analyzer
- Docker
- Use the Python interpreter from
django-backend/.venv - Enable Django support and set
manage.pyas the run configuration
- Set a run configuration for
manage.py runserver - Use breakpoints inside
django-backend/soroscan/ingest/
- Use
pnpm run devinsoroscan-frontend - Attach the debugger to
http://localhost:3000
- Open an issue or comment on an existing issue
- Ask in the project discussions or chat if available
- If you are blocked by setup, include your local log output and the commands you used