Thank you for your interest in contributing to Macrofolio! This document provides guidelines and instructions for contributing.
There are many ways to contribute to Macrofolio:
- 🐛 Bug Reports: Submit bug reports through GitHub Issues
- 💡 Feature Requests: Suggest new features or improvements
- 📝 Documentation: Improve or translate documentation
- 🔧 Code Contributions: Fix bugs, add features, or improve performance
- 🎨 Design: Improve UI/UX or create design assets
- 📊 Testing: Write or improve test coverage
Before contributing, ensure you have:
- Node.js 18+
- Git
- npm, yarn, or pnpm
- Basic understanding of React, TypeScript, and blockchain concepts
-
Fork the Repository
Visit https://github.com/nutrazz/macrofolio and click "Fork"
-
Clone Your Fork
git clone https://github.com/YOUR_USERNAME/macrofolio.git cd macrofolio -
Set Up Development Environment
# Install dependencies npm install # Set up environment variables cp .env.example .env.local # Edit .env.local with your credentials
-
Create a Feature Branch
git checkout -b feature/amazing-feature
-
Make Changes
Follow the code standards outlined below.
-
Test Your Changes
# Run all tests npm test # Run specific test suites npm run test:contracts npm run test:security
-
Commit Changes
We follow conventional commits:
git commit -m "feat: add amazing new feature" git commit -m "fix: resolve critical security issue" git commit -m "docs: update API documentation"
-
Push and Create PR
git push origin feature/amazing-feature
Then create a Pull Request through GitHub.
- Strict mode enabled
- No
anytypes without explicit justification - Use interfaces over types for objects
- Prefer functional components with hooks
We use ESLint and Prettier for code formatting:
# Check formatting
npm run lint
# Auto-fix formatting
npm run lint:fixWe follow the Conventional Commits specification:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Formatting, missing semi-colons, etc.refactor: Code restructuringtest: Adding testschore: Maintenance tasks
- Aim for 80%+ test coverage
- Write tests for new features
- Include edge cases in test scenarios
- Use Jest for unit tests
src/
├── components/ # Reusable UI components
├── pages/ # Page-level components
├── sections/ # Dashboard sections
├── hooks/ # Custom React hooks
├── lib/ # Utilities and configurations
└── __tests__/ # Test files
- Follow Solidity best practices
- Include NatSpec documentation
- Write comprehensive tests
- Use OpenZeppelin contracts when possible
- Never commit secrets or API keys
- Use environment variables for sensitive data
- Follow secure coding practices
- Report security vulnerabilities privately
- Update README.md for user-facing changes
- Add code comments for complex logic
- Update API documentation for endpoint changes
- Include examples in documentation
When reporting bugs, include:
- Clear Title: Summarize the issue
- Description: Detailed explanation
- Steps to Reproduce: Numbered list
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Screenshots/Logs: Visual evidence
- Environment: OS, Node version, browser
When suggesting features, include:
- Problem Statement: What problem does this solve?
- Proposed Solution: Your suggested approach
- Use Cases: Specific scenarios
- Alternatives: Other approaches considered
- Additional Context: Relevant screenshots or mockups
- Keep PRs focused and small
- Include screenshots for UI changes
- Address all review comments
- Maintain test coverage
- Update documentation as needed
- Be respectful and inclusive
- Help other contributors
- Participate in discussions
- Follow our Code of Conduct
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make Macrofolio better! 🚀