Thank you for your interest in contributing to Stellar Tipz! This guide will walk you through the process from fork to merged PR.
- Code of Conduct
- Getting Started
- Workflow
- Branch Naming
- Commit Messages
- Pull Request Process
- Code Standards
- Review Criteria
Be respectful, constructive, and inclusive. We follow the Contributor Covenant.
- Fork this repository to your GitHub account
- Clone your fork locally:
git clone https://github.com/<your-username>/stellar-tipz.git cd stellar-tipz
- Set upstream remote:
git remote add upstream https://github.com/akan_nigeria/stellar-tipz.git
- Follow the Setup Guide to configure your local environment
We use a fork-and-branch workflow:
1. Fork repo → 2. Create branch → 3. Implement → 4. Test → 5. PR → 6. Review → 7. Merge
-
Sync your fork before starting new work:
git checkout main git pull upstream main git push origin main
-
Create a feature branch from
main:git checkout -b <branch-name>
-
Implement the changes described in the issue
-
Test your changes:
- Contract changes:
cd contracts && cargo test - Frontend changes:
cd frontend-scaffold && npm run build
- Contract changes:
-
Commit with a clear message (see Commit Messages)
-
Push to your fork:
git push origin <branch-name>
-
Open a Pull Request against
mainon the upstream repo
Use this convention:
| Type | Pattern | Example |
|---|---|---|
| Feature | feat/<issue-number>-<short-description> |
feat/12-send-tip-function |
| Bug fix | fix/<issue-number>-<short-description> |
fix/25-withdraw-overflow |
| Test | test/<issue-number>-<short-description> |
test/30-credit-score-tests |
| Docs | docs/<issue-number>-<short-description> |
docs/5-contract-spec-update |
Follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer: Closes #<issue-number>]
| Type | Use |
|---|---|
feat |
New feature |
fix |
Bug fix |
test |
Adding or updating tests |
docs |
Documentation changes |
refactor |
Code restructuring (no feature/fix) |
ci |
CI/CD changes |
chore |
Maintenance tasks |
feat(contract): implement send_tip function
- Validate tip amount > 0
- Transfer XLM from tipper to contract
- Update creator balance in storage
- Emit TipSent event
Closes #12
test(contract): add unit tests for credit score calculation
Closes #18
- Code compiles without errors
- All existing tests pass
- New tests are written for new functionality
- Code follows project style guidelines
- Branch is up to date with
main
Use the PR template. Include:
- What — What does this PR do?
- Why — Link to the issue it resolves
- How — Brief technical approach
- Testing — How you verified it works
- Screenshots (for frontend changes)
- PRs are reviewed within 48 hours
- Address review feedback promptly
- Maintainer will merge once approved
- Format: Run
cargo fmtbefore committing - Lint:
cargo clippy -- -D warningsmust pass with zero warnings - Tests: Every public function must have tests
- Documentation: Add
///doc comments to public functions and types - Error handling: Use custom
ContractErrorenum, neverpanic!
- Lint: ESLint must pass (
npm run lint) - Types: No
anytypes — use proper TypeScript types - Components: Functional components with hooks
- Naming: PascalCase for components, camelCase for functions/variables
- Imports: Absolute imports from
src/using tsconfig paths
- No hardcoded secrets or private keys
- No
console.login production code (use proper error handling) - Keep functions focused and under 50 lines where possible
PRs are evaluated on:
| Criteria | Weight |
|---|---|
| Correctness — Does it solve the issue? | High |
| Tests — Are edge cases covered? | High |
| Security — No vulnerabilities introduced? | High |
| Code quality — Clean, readable, idiomatic? | Medium |
| Performance — No unnecessary computation? | Medium |
| Documentation — Clear comments where needed? | Low |
- Open a Discussion for general questions
- Comment on the relevant issue for task-specific questions
- Tag
@akan_nigeriafor urgent matters
Thank you for contributing to Stellar Tipz! Every contribution helps empower creators worldwide. 💫