We welcome contributions to the Enso DeFi Navigator! This document provides guidelines for contributing to the project.
- Node.js 18+
- npm or yarn
- Git
- Basic understanding of SvelteKit and TypeScript
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/defi-navigator.git cd defi-navigator - Install dependencies:
npm install
- Start the development server:
npm run dev
Use the following prefix conventions for your branches:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Adding tests
Examples:
feature/token-comparisonfix/filter-dropdown-overflowdocs/api-integration-guide
Follow the Conventional Commits specification:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, semicolons, etc.)refactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Example:
feat(filters): add TVL range filter support
- Add TVL range input component
- Implement range validation
- Update filter service to handle TVL ranges
- TypeScript: Use strict TypeScript settings
- ESLint: Follow the project's ESLint configuration
- Prettier: Use Prettier for code formatting
- Component Structure: Follow the established component organization in
lib/components/
Currently, the project doesn't have a formal testing setup, but you're encouraged to:
- Test your changes thoroughly in different browsers
- Verify mobile responsiveness
- Test with different API responses and edge cases
- Create a new branch from
main - Implement your feature following the existing patterns
- Test your feature thoroughly
- Update documentation if needed
- Create a pull request
- Create a branch named
fix/issue-description - Reproduce the bug first
- Fix the issue
- Verify the fix doesn't break other functionality
- Create a pull request
- Documentation lives in the
/docsfolder or README files - Use clear, concise language
- Include code examples where helpful
- Update relevant sections of README.md if needed
- Update Documentation: Ensure your PR includes any necessary documentation updates
- Add Examples: Include usage examples for new features
- Test Coverage: Describe how you tested your changes
- Description: Provide a clear description of what changes you made and why
- Screenshots: Include screenshots for UI changes
- Link Issues: Reference any related issues with "Fixes #123"
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
## Testing
How has this been tested? Please describe the tests you ran.
## Screenshots (if applicable)
Add screenshots for UI changes
## Checklist
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warningsWhen adding new components or features:
- Components: Add to
lib/components/following existing categories - Stores: Place state management in
lib/stores/ - Services: Add API or business logic to
lib/services/ - Types: Define TypeScript types in
lib/types/ - Utils: Helper functions go in
lib/utils/
When working with the Enso API:
- Follow the existing patterns in
lib/services/api/ - Handle errors appropriately
- Use TypeScript types for API responses
- Implement proper loading states
The project uses a custom Tailwind theme:
- Use existing utility classes when possible
- For custom styles, add to
app.css - Follow the color scheme defined in theme variables
- Ensure dark mode compatibility
- Be Respectful: Treat other contributors with respect
- Be Patient: Reviews take time
- Be Constructive: Provide helpful feedback
- Be Inclusive: Welcome newcomers
- Discord/Telegram: Join the Enso community channels
- GitHub Issues: Search existing issues before creating new ones
- Documentation: Check the project README and API docs
By contributing to Enso DeFi Navigator, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🚀