Thank you for your interest in contributing! This guide will help you get started.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/rajanpanth/instinctfi.git cd instinctfi - Create a branch for your feature or fix:
git checkout -b feature/your-feature-name
cd app
npm install
npm run devThe app runs at http://localhost:3000.
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Solana CLI
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
# Install Anchor CLI
cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked
# Build programs
anchor build
# Run tests
anchor testprograms/— Solana smart contracts (Rust/Anchor)app/— Next.js frontend (TypeScript/React)tests/— End-to-end Anchor tests
- Follow existing patterns in
app/src/components/andapp/src/lib/ - Use Tailwind CSS for styling
- TypeScript strict mode is enabled — no
anytypes - Test responsiveness on mobile viewport sizes
- Follow Anchor best practices and existing code patterns
- Add proper error variants to
errors.rs - Use
checked_*arithmetic operations to prevent overflow - Add tests for new instructions in
tests/voting.ts
Use clear, descriptive commit messages:
feat: add poll expiry notification
fix: handle edge case in reward calculation
docs: update setup instructions
refactor: extract PDA derivation helper
- Ensure your code builds without errors
- Update documentation if you've changed APIs or setup steps
- Write a clear PR description explaining what and why
- Link any related issues
- Request a review
- TypeScript/JS: Prettier formatting (run
npm run lint:fixfrom root) - Rust:
cargo fmtfor formatting,cargo clippyfor linting
- Use GitHub Issues
- Include steps to reproduce
- Include browser/OS/wallet version if relevant
- Label appropriately (bug, feature, docs, etc.)
Open a Discussion on GitHub or reach out via Issues.
Thank you for helping make InstinctFi better!