Thanks for contributing to Mind Block. This document is the process; the technical setup lives in docs/DEVELOPMENT.md.
| I need to... | Read |
|---|---|
| Set the project up locally | docs/DEVELOPMENT.md |
| Know which environment variables to set | docs/ENVIRONMENT.md |
| Understand the codebase layout | docs/ARCHITECTURE.md |
| Call or extend the API | docs/API.md |
| Run tests, lint, and builds | docs/TESTING.md |
- Find an issue. Pick an open issue and comment that you are taking it, or open one describing the problem before writing code.
good first issueis the easiest entry point. - Fork and clone. Work on a fork; branch protection blocks direct pushes to
mainanddevelop. - Set up. Follow docs/DEVELOPMENT.md: Node 20.x, npm, PostgreSQL, Redis, env files.
- Branch from
main. Use the naming convention below. - Make the change. Keep it scoped to the issue; unrelated refactors make review slower and merges riskier.
- Add tests. New behaviour needs a spec. See docs/TESTING.md.
- Run the local checks. The full list is below and must pass before you push.
- Commit using Conventional Commits.
- Open a PR against
mainwith a full description, and link the issue withcloses #<number>. - Respond to review with follow-up commits, keeping the branch up to date with
main.
Rule: Always use relative imports.
Bad:
import X from "src/components/X";Good:
import X from "../../components/X";CI will reject PRs containing src/* imports.
MUST RUN before submitting a PR:
npm ci
npm --workspace frontend run build
npm --workspace backend run build
npm --workspace frontend run lint
npm --workspace backend run lint
npm --workspace frontend exec -- tsc --noEmit -p tsconfig.json
npm --workspace backend exec -- tsc --noEmit -p tsconfig.json
npm --workspace backend run testThese mirror the CI jobs, so a clean local run means a green pipeline. Details and troubleshooting are in docs/TESTING.md.
Install the following tools before working on contracts:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add wasm32-unknown-unknown target
rustup target add wasm32-unknown-unknown
# Install Stellar CLI
cargo install --locked stellar-cliMUST RUN Local checks from inside contract/ before submitting a PR:
cd contract/
# Check formatting
cargo fmt --all -- --check
# Run clippy the way CI does
cargo clippy --locked --all-targets --all-features -- -D warnings
# Build the contract
stellar contract build
# Run tests
cargo test --lockedThe crate directory is contract/ (singular).
main and develop require status checks: lint-imports, build, type-check, contracts. Require branches to be up-to-date before merging.
To maintain a clean commit history and make reviews efficient, all pull requests must meet the following requirements:
- Use descriptive branch names:
feature/your-feature-namefix/issue-numberchore/tooling-updatedocs/what-you-documented
- Avoid vague names like
updateorpatch.
- Must follow Conventional Commits style:
- Format:
<type>(optional-scope): short description (#issue-number) - Allowed types:
feat,fix,docs,chore,test,refactor,ci
- Format:
- Examples:
fix(streaks): use user timezone for date strings (#241)feat(auth): add refresh token support (#250)docs(contributing): clarify PR standards (#234)
- Must provide enough context for maintainers to understand the change without reading every line of code.
- Minimum requirements:
- Problem: What issue does this PR solve?
- Solution: How was it solved?
- Acceptance Criteria: What conditions prove the fix works?
- Testing Notes: How was it tested?
- Link the issue with
closes #<issue-number>. - Avoid minimal descriptions like only writing
Closes #22.
- The CI pipeline will automatically reject PRs that:
- Have non-compliant titles (e.g.,
update,fix bug). - Have descriptions shorter than 20 characters or missing context.
- Have non-compliant titles (e.g.,
- The
build-and-deployjob depends on PR validation, so failing validation will block merges.
- TypeScript everywhere in
backend/andfrontend/; avoidanywhere a real type is expressible. - Backend layering: HTTP concerns in controllers, business rules in providers, persistence in entities and repositories. See docs/ARCHITECTURE.md.
- DTOs are the contract: the global
ValidationPiperuns withforbidNonWhitelisted, so any accepted field must be declared and validated on a DTO. - Document new endpoints with
@ApiOperationand@ApiResponseso Swagger at/apistays complete, and update the matching table in docs/API.md in the same PR. - New environment variables must be added to
backend/.env.exampleand documented in docs/ENVIRONMENT.md. - Never commit secrets. Env files are git-ignored; keep them that way.
- Formatting is handled by Prettier and ESLint. Run
npm --workspace backend run formatrather than hand-formatting.
Docs are part of the product. If your change alters setup steps, configuration,
endpoints, or commands, update the affected file under docs/ in the same pull
request. The acceptance bar is simple: a new contributor should be able to go
from clone to a running stack with passing tests using only what is committed
here.
By following these standards, contributors ensure their PRs are clear, maintainable, and easy to review.