-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Dennis Decoene edited this page Dec 28, 2024
·
1 revision
We love your input! We want to make contributing to Semantic Seed as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Improving documentation
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
- Install dependencies:
yarn install- Start the development server:
yarn dev- Run tests:
yarn test- Lint your code:
yarn lintsrc/
├── components/ # React components
│ ├── ui/ # Base UI components
│ └── ... # Feature components
├── lib/ # Core functionality
│ ├── WordListManager.ts # Word list management
│ └── utils.ts # Utility functions
└── data/ # Static data and word lists
To add or modify word categories:
- Update
src/lib/categorizedWordlist.ts - Ensure all words are from the official BIP39 wordlist
- Add category to the
CategoryWordListstype - Update word selection logic if needed
- Add tests for the new category
To add new sentence templates:
- Add template to
src/components/SentenceTemplate.tsx - Follow existing template structure
- Ensure template generates valid BIP39 phrases
- Add examples and documentation
- Add template tests
When adding new UI components:
- Use existing UI components from
components/ui - Follow the Shadcn/UI pattern
- Use Tailwind's core utility classes only
- Ensure responsive design
- Add component documentation
- Use TypeScript for all new code
- Define proper interfaces and types
- Use strict type checking
- Follow existing type patterns
- Use functional components
- Implement proper hooks usage
- Follow React best practices
- Maintain consistent component structure
- Use Tailwind CSS utilities
- Never use arbitrary values [mt-[27px]]
- Follow existing component styling patterns
- Maintain consistent spacing
- Write tests for new functionality
- Follow existing test patterns
- Ensure high coverage
- Test edge cases
- Add integration tests for new features
- Test component interactions
- Verify state management
- Test user workflows
- Add JSDoc comments for functions
- Document complex logic
- Explain non-obvious decisions
- Keep comments up to date
- Update relevant wiki pages
- Add new pages as needed
- Include examples
- Keep documentation current
- Maintain air-gapped operation capability
- Ensure cryptographic security
- Follow security best practices
- Document security implications
- Security review for new features
- Cryptographic review when relevant
- Document security assumptions
- Consider threat models
- Quick summary and background
- Steps to reproduce
- Expected behavior
- Actual behavior
- Notes (possibly including why you think this might be happening)
- Screenshots if relevant
- Do not file public issues for security vulnerabilities
- Email security team directly
- Follow responsible disclosure
- Wait for response before disclosure
When requesting new features:
- Check existing issues first
- Describe the feature in detail
- Explain the use case
- Consider implementation details
- Discuss potential drawbacks
- Be respectful and inclusive
- Follow GitHub community guidelines
- Maintain professional discourse
- Help others when possible
- Use GitHub issues for bugs
- Discussions for feature ideas
- Pull requests for code changes
- Wiki for documentation
By contributing, you agree that your contributions will be licensed under the MIT License.