Welcome Contributors
Thank you for your interest in contributing to Salud! This privacy-preserving medical records system is built on Aleo blockchain and welcomes contributions from developers passionate about healthcare privacy.Ways to Contribute
Code Contributions
- Frontend Development: React/TypeScript UI improvements
- Backend Development: Node.js API enhancements
- Smart Contract: Leo programming language improvements
- Documentation: Help improve our docs
- Testing: Write unit, integration, or E2E tests
Non-Code Contributions
- Report bugs and issues
- Suggest new features
- Improve user experience
- Join community discussions
Getting Started
Create a Feature Branch
Always create a new branch for your work.Branch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions or updates
Set Up Development Environment
Follow the Local Setup guide to configure your environment.
Make Your Changes
- Write clean, readable code
- Follow existing code style
- Add comments for complex logic
- Update documentation as needed
Test Your Changes
Run tests to ensure nothing breaks. See Testing for details.
Commit Your Changes
Write clear, descriptive commit messages.Good commit messages:
Add QR code scanning timeout featureFix: Wallet connection error on SafariRefactor: Simplify encryption serviceDocs: Update API endpoint documentation
Code Style Guidelines
TypeScript/JavaScript (Frontend & Backend)
- Use TypeScript types for all functions
- Prefer
constoverlet - Use async/await over promise chains
- Add JSDoc comments for complex functions
- Keep functions small and focused
Leo (Smart Contracts)
- Validate all inputs
- Use descriptive transition names
- Add comments for complex cryptographic logic
- Follow Aleo best practices
React Components
- Define prop interfaces
- Use functional components
- Extract reusable logic to hooks
- Keep components focused on presentation
Project-Specific Guidelines
Frontend Development
File Organization:- Use Zustand for global state
- Use React hooks for local state
- Keep state as close to usage as possible
- Use the
api.tsclient - Handle errors gracefully
- Show loading states
Backend Development
API Endpoints:- Follow REST conventions
- Return consistent response formats
- Include proper error codes
- Log important operations
Smart Contract Development
Security First:- Always validate inputs
- Check ownership before state changes
- Use block height for time-based logic
- Test edge cases thoroughly
- Minimize on-chain storage
- Use efficient data structures
- Batch operations when possible
Testing Requirements
Required Tests for Pull Requests
Frontend:- Must pass ESLint:
npm run lint - Must build successfully:
npm run build - Test new components manually
- Must start without errors
- Test new endpoints with curl/Postman
- Verify Aleo SDK integration
- All Leo tests must pass:
leo test - Add tests for new transitions
- Test security edge cases
Writing Tests
Leo Tests:Pull Request Guidelines
PR Title Format
PR Description Template
Review Process
- Automatic Checks: Linting, build verification
- Code Review: Maintainer reviews code quality
- Testing: Verify functionality works
- Approval: At least one maintainer approval required
- Merge: Squash and merge to main branch
Issue Reporting
Bug Reports
When reporting bugs, include:- Description: Clear description of the bug
- Steps to Reproduce: Numbered steps
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Environment:
- Browser/OS version
- Wallet used (Leo, Shield, etc.)
- Network (testnet/mainnet)
- Screenshots: If applicable
- Console Errors: Browser console output
Feature Requests
When suggesting features:- Use Case: Why is this needed?
- Proposed Solution: How should it work?
- Alternatives: Other approaches considered
- Impact: Who benefits from this?
Code of Conduct
Our Standards
✅ Do:- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help newcomers learn
- Credit others’ contributions
- Use offensive language
- Make personal attacks
- Spam issues or PRs
- Copy code without attribution
Scope
This applies to all project spaces:- GitHub repository
- Pull requests and issues
- Community discussions
- Social media related to the project
License
By contributing to Salud, you agree that your contributions will be licensed under the MIT License.Questions?
- Create an issue for bugs or features
- Check existing issues before creating new ones
- Join Aleo Discord for general questions
- Review documentation at docs.salud.health
Recognition
All contributors will be:- Listed in the GitHub contributors page
- Credited in release notes for significant contributions
- Part of building privacy-preserving healthcare technology
Thank you for contributing to Salud! 🏥❤️