Thank you for your interest in contributing to the Ethereum Explorer project! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Reporting Issues
This project adheres to a code of conduct that all contributors are expected to follow. Please be respectful, inclusive, and constructive in all interactions.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/nextjs-ethereum-explorer.git cd nextjs-ethereum-explorer - Add the upstream remote:
git remote add upstream https://github.com/aakash4dev/nextjs-ethereum-explorer.git
-
Install dependencies:
npm install
-
Set up environment variables:
cp .example.env .env # Edit .env with your configuration -
Set up MongoDB (local or Atlas)
-
Run the development server:
npm run dev
-
Run the sync service (in a separate terminal):
npm run sync
- Use the GitHub issue tracker
- Include a clear title and description
- Provide steps to reproduce
- Include error messages and logs
- Specify your environment (OS, Node version, etc.)
- Open an issue with the "enhancement" label
- Clearly describe the feature and its use case
- Explain why it would be useful
-
Create a branch from
main:git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes following the coding standards
-
Test your changes:
npm run lint npm run build
-
Commit your changes:
git add . git commit -m "feat: add your feature description"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
-
Update your branch with the latest changes:
git fetch upstream git rebase upstream/main
-
Ensure all tests pass and code is linted
-
Write a clear PR description:
- What changes were made
- Why the changes were needed
- How to test the changes
- Screenshots (if UI changes)
-
Wait for review and address any feedback
-
Squash commits if requested before merging
- Follow existing code patterns
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and small
Follow the Conventional Commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for adding testschore:for maintenance tasks
Examples:
feat: add address analytics page
fix: resolve BigInt conversion error in indexer
docs: update README with deployment instructions
- Keep components in
src/app/components/ - API routes in
src/app/api/ - Library functions in
src/lib/ - Use descriptive file names
- Test your changes locally
- Ensure the build passes:
npm run build - Test API endpoints
- Verify database operations
When reporting issues, please include:
-
Environment:
- OS and version
- Node.js version
- MongoDB version
- Package versions
-
Steps to Reproduce:
- Clear, numbered steps
- Expected vs actual behavior
-
Error Messages:
- Full error stack traces
- Console logs
- Screenshots if applicable
-
Additional Context:
- Related issues
- Possible solutions you've tried
We welcome contributions in these areas:
- Performance improvements: Optimize database queries, caching
- New features: Additional blockchain data, analytics, charts
- UI/UX enhancements: Better user experience, accessibility
- Documentation: Improve README, add examples, tutorials
- Testing: Add unit tests, integration tests
- Bug fixes: Fix reported issues
- Code quality: Refactoring, code organization
- Open an issue for questions
- Check existing issues and PRs
- Review the README for setup instructions
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT License).
Thank you for contributing to Ethereum Explorer! 🚀