Thank you for your interest in contributing to Neko! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Development Workflow
- Code Style Guidelines
- Testing
- Pull Request Process
- Commit Message Conventions
- Project Structure
- Getting Help
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
Before you begin:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Neko-DApp.git cd Neko-DApp - Add the upstream remote:
git remote add upstream https://github.com/Neko-Protocol/Neko-DApp.git
Ensure you have the following installed:
- Node.js (v18 or higher)
- npm (v10.2.3 or higher)
- Rust (v1.70 or higher) - for smart contract development
- Stellar CLI (v23.1.0 or higher) - for contract bindings
See the README.md for detailed installation instructions.
-
Install dependencies:
npm install
-
Build contract packages:
npm run build
-
Set up environment variables: Create
apps/web-app/.env.localwith the required configuration (see README.md) -
Start the development server:
npm run dev
If you find a bug, please open an issue using the Bug Report template and include:
- A clear description of the bug
- Steps to reproduce the issue
- Expected vs. actual behavior
- Screenshots or logs (if applicable)
- Environment details (OS, browser, version)
If you get assigned an issue, use the Pull Request template with:
- A clear description of the changes
- Evidence of said changes
- Any examples or comments
- Choose an issue to work on.
- Get assigned the issue and start working.
- 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 code style guidelines
- Test your changes thoroughly
- Commit your changes using conventional commits
- Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request (see Pull Request Process)
Use descriptive branch names with prefixes:
feat/- New featuresfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions or updateschore/- Maintenance tasks
Regularly sync your branch with the upstream repository:
git fetch upstream
git checkout main
git merge upstream/main
git checkout your-branch
git merge main- Use TypeScript for all new code
- Follow existing code patterns and conventions
- Use meaningful variable and function names
- Keep functions focused and single-purpose
- Avoid deep nesting - prefer early returns
- Run Prettier before committing:
npm run format
- Prettier will automatically format staged files via Husky pre-commit hook
- Check formatting:
npm run format:check
- Run ESLint before committing:
npm run lint
- Fix all linting errors before submitting a PR
- Use functional components with hooks
- Follow the feature-based architecture (see Project Structure)
- Use TypeScript interfaces for props and state
- Keep components small and focused
- Use custom hooks for reusable logic
- Follow Rust naming conventions (snake_case for functions/variables)
- Add documentation comments (
///) for public items - Use meaningful error types
- Write tests for contract functions
- Place feature-specific code in
apps/web-app/src/features/[feature-name]/ - Use shared components from
apps/web-app/src/components/ - Add utilities to
apps/web-app/src/lib/helpers/ - Keep constants in
apps/web-app/src/lib/constants/
- Test your changes in the development environment
- Verify functionality across different browsers (Chrome, Firefox, Safari)
- Test responsive design on different screen sizes
- Check wallet integration works correctly
- Write unit tests for contract functions
- Test edge cases and error conditions
- Verify contract interactions work as expected
- Ensure all existing tests pass
- Test your changes thoroughly
- Verify no console errors or warnings
Before submitting a PR, ensure:
- Your code follows the code style guidelines
- All linting checks pass (
npm run lint) - Code is formatted (
npm run format) - TypeScript types are properly defined
- Your branch is up to date with
main - You've tested your changes
- You've added/updated documentation if needed
When opening a PR, fill out the Pull Request template completely:
- Type of Change: Mark the appropriate checkbox
- Changes Description: Clearly describe what you changed and why
- Evidence: REQUIRED - Include a Loom/Cap video or screenshots demonstrating your changes
- Time Spent Breakdown: Estimate time spent on different parts
- Comments: Any additional notes or context
- Evidence is mandatory - PRs without evidence will not be merged
- Link to related issues if applicable
- Keep PRs focused - one feature or fix per PR
- Keep PRs reasonably sized - break large changes into smaller PRs when possible
- Automated checks will run (linting, formatting, etc.)
- Maintainers will review your code
- Address feedback by pushing new commits to your branch
- Once approved, your PR will be merged
We use Conventional Commits for commit messages:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Test additions or changeschore: Maintenance tasks (dependencies, config, etc.)perf: Performance improvementsci: CI/CD changes
feat(lending): add collateral ratio calculation
Implement dynamic collateral ratio based on asset type and market conditions.
Closes #123
fix(swap): resolve token balance display issue
The balance was not updating after successful swaps. Fixed by adding proper state updates.
Fixes #456
docs: update contributing guide
Add section on commit message conventions.
This is a monorepo managed with Turborepo. Key directories:
neko-dapp/
├── apps/
│ ├── web-app/ # Next.js frontend application
│ │ └── src/
│ │ ├── app/ # Next.js App Router pages
│ │ ├── features/ # Feature-based modules
│ │ ├── components/ # Shared UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities and helpers
│ │ └── providers/ # Context providers
│ └── contracts/
│ └── stellar-contracts/ # Rust smart contracts
└── packages/
├── config/ # Shared configuration
└── contracts/ # Contract client packages
- Create a new directory in
apps/web-app/src/features/[feature-name]/ - Add feature-specific components, hooks, and utilities
- Create a route in
apps/web-app/src/app/dashboard/if needed - Update navigation in
apps/web-app/src/components/navigation/Navbar.tsx
- Create a new directory in
packages/contracts/ - Add
package.jsonwith name@neko/your-contract - Create TypeScript bindings in
src/index.ts - Build with
npm run buildfrom root
- Documentation: Check the README.md for setup and usage
- Issues: Search existing GitHub Issues
- Discussions: Open a discussion for questions or ideas
- Contact: Reach out to the team through GitHub
- Stellar Documentation
- Soroban Smart Contracts
- Next.js Documentation
- Turborepo Documentation
- Conventional Commits
Thank you for contributing to Neko DApp! Your efforts help make RWAs consumer-friendly on Stellar. 🚀