Thank you for your interest in contributing to Starr! This document provides guidelines and instructions for contributing to the project.
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Respect different viewpoints and experiences
If you find a bug, please open an issue with:
- Clear title and description of the bug
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Environment details (OS, device, app version)
- Screenshots or logs if applicable
- Severity (critical, high, medium, low)
We welcome feature suggestions! Please open an issue with:
- Clear description of the feature
- Use case - why this feature would be useful
- Proposed implementation (if you have ideas)
- Alternatives considered (if any)
-
Fork the repository and create a branch from
maingit checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes
- Follow the existing code style
- Write clear, self-documenting code
- Add comments for complex logic
- Update documentation if needed
-
Test your changes
- Test on both iOS and Android if possible
- Ensure existing functionality still works
- Test edge cases
-
Commit your changes
- Write clear, descriptive commit messages
- Use conventional commit format:
feat: add new feature fix: resolve bug in payment flow docs: update README refactor: improve code organization test: add unit tests
-
Push and create a Pull Request
- Push to your fork
- Create a PR with a clear title and description
- Reference any related issues
- Wait for review and address feedback
- Node.js 18+
- npm or yarn
- Expo CLI
- iOS Simulator (Mac) or Android Emulator
- Git
-
Clone the repository
git clone https://github.com/yourusername/starr.git cd starr -
Install dependencies
npm install
-
Set up environment variables
- Create a
.envfile in the root directory - Add your Lightning Network configuration:
EXPO_PUBLIC_LND_REST_URL=https://your-lnd-node:8080 EXPO_PUBLIC_LND_MACAROON=your_macaroon_hex EXPO_PUBLIC_NETWORK=testnet # Use testnet for development
- Create a
-
Start the development server
npm start
-
Run on device/simulator
npm run ios # iOS npm run android # Android
- Use TypeScript for all new code
- Define proper types and interfaces
- Avoid
anytypes - useunknownif necessary - Use meaningful variable and function names
- Follow React Native best practices
- Use functional components with hooks
- Keep components small and focused
- Extract reusable logic into custom hooks
- Use Expo Router for navigation
- Follow the existing project structure
- Place components in
src/components/ - Place services in
src/services/ - Place utilities in
src/utils/ - Use index files for clean imports
- Components: PascalCase (e.g.,
BalanceCard.tsx) - Files: PascalCase for components, camelCase for utilities
- Functions: camelCase (e.g.,
formatAmount) - Constants: UPPER_SNAKE_CASE (e.g.,
MAX_AMOUNT) - Types/Interfaces: PascalCase (e.g.,
WalletState)
- Use 2 spaces for indentation
- Use single quotes for strings (unless escaping)
- Add trailing commas in multi-line objects/arrays
- Keep lines under 100 characters when possible
- Test on both iOS and Android
- Test on different screen sizes
- Test with different network conditions
- Test edge cases (empty states, errors, etc.)
- Write unit tests for utility functions
- Write integration tests for services
- Ensure tests pass before submitting PRs
- Never commit API keys, secrets, or private keys
- Never commit seed phrases or recovery phrases
- Review security implications of your changes
- Follow secure coding practices
- Report security vulnerabilities privately (see Security section)
starr/
├── app/ # Expo Router screens
│ ├── (tabs)/ # Tab navigation screens
│ ├── onboarding/ # Onboarding flow
│ └── ... # Modal screens
├── src/
│ ├── components/ # Reusable components
│ │ ├── ui/ # Base UI components
│ │ └── wallet/ # Wallet-specific components
│ ├── services/ # Core services
│ │ ├── breez/ # Breez SDK integration
│ │ ├── keychain/ # Secure key storage
│ │ └── backup/ # Backup management
│ ├── stores/ # Zustand state stores
│ ├── theme/ # Design system
│ ├── types/ # TypeScript types
│ └── utils/ # Utility functions
└── assets/ # Images and fonts
We welcome contributions in these areas:
- 🐛 Bug fixes - Fix reported issues
- ✨ Features - Implement new functionality
- 📚 Documentation - Improve docs and README
- 🎨 UI/UX - Enhance the user interface
- ⚡ Performance - Optimize app performance
- 🔒 Security - Improve security practices
- 🧪 Testing - Add tests and improve coverage
- 🌐 Internationalization - Add translations
- ♿ Accessibility - Improve accessibility
- All PRs require at least one review
- Maintainers will review for:
- Code quality and style
- Functionality and correctness
- Security implications
- Test coverage
- Documentation updates
- Address review feedback promptly
- PRs will be merged once approved
- Open an issue for questions or discussions
- Check existing issues and PRs first
- Be patient - maintainers are volunteers
By contributing to Starr, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Starr! 🚀