Thank you for considering making contributions to IBC Explorer!
Contributing to this repo can mean many things such as participating in discussion or proposing code changes. To ensure a smooth workflow for all contributors, the general procedure for contributing has been established:
- either open or find an issue you'd like to help with,
- participate in thoughtful discussion on that issue,
- if you would then like to contribute code:
- if the issue is a proposal, ensure that the proposal has been accepted,
- ensure that nobody else has already begun working on this issue, if they have make sure to contact them to collaborate,
- if nobody has been assigned the issue and you would like to work on it make a comment on the issue to inform the community of your intentions to begin work,
- follow standard GitHub best practices: fork the repo,
if the issue is a bug fix, branch from the
tip of
develop, make some commits, and submit a PR todevelop; if the issue is a new feature, branch from the tip offeature/XXX, make some commits, and submit a PR tofeature/XXX - include
WIP:in the PR-title and submit your PR early, even if it's incomplete, this indicates to the community you're working on something and allows them to provide comments early in the development process. When the code is complete it can be marked as ready-for-review by replacingWIP:withReady for Review:in the PR-title.
Note that for very small or blatantly obvious problems (such as typos) it is not required to open an issue to submit a PR, but be aware that for more complex problems/features, if a PR is opened before an adequate design discussion has taken place in a GitHub issue, that PR runs a high likelihood of being rejected.
Please make sure to use the automated code formatting tools before every commit - ESLint and Prettier will run automatically via Husky hooks, but you can also run them manually.
To accommodate review process we suggest that PRs are categorically broken up.
Ideally each PR addresses only a single issue. Additionally, as much as possible
code refactoring and cleanup should be submitted as separate PRs. And the feature branch feature/XXX should be synced with develop regularly.
We use pnpm to manage dependencies. The dependencies are defined in package.json and pnpm-lock.yaml files.
Since some dependencies are not under our control, a third party may break our
build, in which case we can fall back on pnpm install or pnpm update to clean up and synchronize dependencies.
The project enforces strict code quality standards using automated tools:
- ESLint: Ensures code follows consistent patterns and catches potential issues
- Prettier: Automatic code formatting for consistent style
- TypeScript: Strict type checking enabled
- Husky: Git hooks for automated quality checks before commits
For any new feature, appropriate tests should be provided:
- Unit tests: For utility functions and composables
- Component tests: For Vue components using Vue Test Utils
- Integration tests: For complex user workflows
- E2E tests: For critical user paths
The following checks run automatically before each commit:
- TypeScript compilation (
vue-tsc --noEmit) - ESLint with auto-fix (
pnpm eslint) - Prettier formatting (
pnpm prettier) - Commitlint validation for commit message format
This project uses Conventional Commits with custom types defined in .cz-config.js:
feature: Add new featurefix: Fix bugbug: Bug number from testing feedbackui: Update UI components or stylingdocs: Documentation changesstyle: Code formatting (no functional changes)perf: Performance optimizationrefactor: Code refactoring (no feature/bug changes)chore: Build process or config changesmerge: Merge branches
Use the interactive commit tool for standardized messages:
# Use the interactive commit helper
pnpm commit
# Or if you have commitizen installed globally
git czEnsure that you base and target your PR on the correct branch:
release/vxx.yyfor a merge into a release candidatemainfor a merge of a releasedevelopin the usual case
All feature additions should be targeted against feature/XXX. Bug fixes for an outstanding release candidate
should be targeted against the release candidate branch. Release candidate branches themselves should be the
only pull requests targeted directly against main.
- the latest state of development is on
develop developmust never fail linting or type checking- no --force onto
develop(except when reverting a broken commit, which should seldom happen) - feature branches should be regularly synced with
develop
- ensure
feature/XXXis rebased ondevelop - ensure pull request branch is rebased on
feature/XXX - run type checking and linting to ensure all checks pass:
pnpm vue:tsc # TypeScript compilation check pnpm eslint # ESLint check and auto-fix pnpm prettier # Code formatting
- submit pull request
- push
feature/XXXintodevelopregularly
-
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env.development # Edit .env.development with your API endpoints -
Start development server:
pnpm dev
-
Run quality checks:
pnpm vue:tsc # Type check pnpm eslint # Lint check pnpm prettier # Format code
- start on
develop - prepare changelog/release issue
- bump versions in
package.json - push to
release-vX.X.Xto run CI/CD - run build verification:
pnpm build:prod # Production build pnpm preview # Test built application
- merge to
main - merge
mainback todevelop
- start on
release-vX.X.X - make the required changes
- these changes should be small and an absolute necessity
- add a note to CHANGELOG.md
- bump versions in
package.json - verify build works:
pnpm build:prod - merge
release-vX.X.Xtomainif necessary - merge
release-vX.X.Xtodevelopif necessary
When contributing to the project, please follow these structural conventions:
src/api/- API interface definitions and HTTP requestssrc/components/- Reusable Vue componentssrc/composables/- Vue 3 composition functionssrc/views/- Page-level componentssrc/utils/- Pure utility functionssrc/types/- TypeScript type definitionssrc/constants/- Application constantssrc/assets/- Static assets (images, fonts, etc.)
- Files: Use kebab-case for file names (
user-profile.vue) - Components: Use PascalCase for component names (
UserProfile.vue) - Composables: Use camelCase with
useprefix (useUserData.ts) - Constants: Use UPPER_SNAKE_CASE (
API_ENDPOINTS) - Types/Interfaces: Use PascalCase (
UserProfile,ApiResponse)
- Use
<script setup>syntax for new components - Define props and emits with TypeScript
- Use composition API over options API
- Follow single responsibility principle
- Include proper JSDoc comments for complex logic
- Use Tailwind CSS classes for styling when possible
- Use Less for complex custom styles
- Follow BEM methodology for custom CSS classes
- Ensure responsive design for all components
- Bundle Size: Monitor build output and avoid unnecessary dependencies
- Code Splitting: Use dynamic imports for large components
- Image Optimization: Use appropriate formats and sizes
- Lazy Loading: Implement for non-critical content
- Caching: Leverage browser caching for static assets
- Use semantic HTML elements
- Provide proper ARIA labels and roles
- Ensure keyboard navigation works properly
- Maintain sufficient color contrast ratios
- Test with screen readers when possible
- Follow WCAG 2.1 guidelines
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Test critical functionality across supported browsers
If you need help with your contribution:
- Documentation: Check the README and project documentation
- Issues: Search existing GitHub issues for similar problems
- Discussions: Start a GitHub discussion for broader questions
- Code Review: Don't hesitate to ask for feedback during PR review
Thank you for contributing to IBC Explorer! 🚀