Thank you for your interest in contributing to the Klever Bridge Assets transparency dashboard! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Adding New Tokens
- Adding New Chains
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to security@klever.org.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/klv-bridge-assets.git cd klv-bridge-assets - Add the upstream remote:
git remote add upstream https://github.com/klever-io/klv-bridge-assets.git
- Node.js 20 or higher
- pnpm 9 or higher
- Git
# Install dependencies
pnpm install
# Copy environment variables
cp .env.example .env.local
# Start development server
pnpm dev| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm lint |
Run ESLint |
pnpm lint:fix |
Fix ESLint issues |
pnpm type-check |
Run TypeScript type checking |
Before creating a bug report, please check existing issues to avoid duplicates.
When filing a bug report, include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Screenshots (if applicable)
- Browser/OS information
- Any relevant error messages
We welcome feature suggestions! Please:
- Check existing issues/discussions first
- Provide a clear use case
- Explain how it benefits users
- Consider implementation complexity
- Find an issue to work on, or create one
- Comment on the issue to let others know you're working on it
- Create a branch from
main:git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix - Make your changes following our coding standards
- Test thoroughly - ensure lint and type-check pass
- Commit your changes using conventional commits
- Push and create a PR
- Run
pnpm lintand fix any issues - Run
pnpm type-checkand fix any errors - Run
pnpm buildto ensure production build works - Update documentation if needed
- Add/update tests if applicable
-
Title: Use a clear, descriptive title
feat: Add BSC chain supportfix: Correct balance calculation for 18-decimal tokensdocs: Update README with new setup instructions
-
Description: Fill out the PR template completely
- Describe what changes you made
- Link related issues
- Include screenshots for UI changes
- List any breaking changes
-
Size: Keep PRs focused and reasonably sized
- One feature/fix per PR
- Break large changes into smaller PRs
- Automated checks must pass (lint, type-check, build)
- At least one maintainer review required
- Address review feedback promptly
- Squash commits before merging (if requested)
- Use strict TypeScript - no
anytypes - Define interfaces for all data structures
- Use Zod for runtime validation
- Export types from
src/types/
// Good
interface TokenConfig {
id: string;
symbol: string;
decimals: number;
}
// Avoid
const token: any = { ... };- Use functional components with hooks
- Keep components focused and single-purpose
- Use proper TypeScript props interfaces
- Follow accessibility best practices
// Good
interface ButtonProps {
label: string;
onClick: () => void;
disabled?: boolean;
}
export function Button({ label, onClick, disabled = false }: ButtonProps) {
return (
<button
onClick={onClick}
disabled={disabled}
aria-disabled={disabled}
>
{label}
</button>
);
}- Use Tailwind CSS utilities
- Use CSS variables for theming (
var(--primary)) - Follow mobile-first responsive design
- Maintain accessibility (color contrast, focus states)
src/
├── app/ # Pages and layouts
├── components/
│ ├── ui/ # Reusable primitives
│ └── [feature]/ # Feature-specific components
├── hooks/ # Custom React hooks
├── services/ # API clients
├── types/ # TypeScript definitions
└── utils/ # Utility functions
Follow Conventional Commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Adding/updating testschore: Maintenance tasks
Examples:
feat(chains): add Polygon network support
fix(balance): correct decimal conversion for USDC
docs(readme): add deployment instructions
To add a new token to the dashboard:
-
Edit
src/config/bridge-assets.json:{ "id": "newtoken", "symbol": "NEW", "name": "New Token", "decimals": 18, "logo": "/assets/wNEW.png", "kleverChain": { "baseTokenId": "NEW-XXXX" }, "liquidityTokens": [ { "chainId": "ethereum", "kdaId": "ETHNEW-XXXX" } ], "sourceChains": [ { "chainId": "ethereum", "chainName": "Ethereum", "evmChainId": 1, "bridgeContract": "0x...", "tokenContract": "0x...", "decimals": 18, "enabled": true } ] } -
Add token logo to
public/assets/wNEW.png- Use PNG format
- Recommended size: 128x128 or 256x256
- Transparent background
-
Test the changes:
pnpm dev # Verify token appears and data loads correctly -
Submit a PR with your changes
To add support for a new blockchain:
- Add chain to wagmi config (
src/config/wagmi.ts) - Add chain logo to
public/assets/chains/ - Update chain config in
src/config/bridge-assets.json - Add chain color to
src/app/globals.css - Update About page chain list
- Test thoroughly with actual RPC endpoints
- Open a GitHub Discussion
- Join our Discord
- Check existing Issues
Thank you for contributing!