Thank you for your interest in contributing to Stellar Spend! This document provides guidelines and information for contributors.
- Node.js 18+ and npm
- Git
-
Fork and clone the repository
git clone https://github.com/your-username/stellar-spend.git cd stellar-spend -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start the development server
npm run dev
-
Verify formatting and linting
npm run format:check npm run lint
Use descriptive branch names with the following prefixes:
feat/- New featuresfix/- Bug fixesdocs/- Documentation updatesstyle/- Code style changes (formatting, etc.)refactor/- Code refactoringtest/- Adding or updating testschore/- Maintenance tasks
Examples:
feat/add-stellar-wallet-integrationfix/paycrest-webhook-validationdocs/update-api-documentation
We use Conventional Commits for consistent commit messages:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes (formatting, missing semicolons, etc.)refactor- Code refactoringtest- Adding or updating testschore- Maintenance tasksci- CI/CD changes
feat: add Stellar wallet connection
fix: resolve Paycrest webhook signature validation
docs: update environment setup instructions
style: format code with Prettier
refactor: extract common validation logic
test: add unit tests for bridge adapter
chore: update dependencies-
Create a feature branch from
maingit checkout -b feat/your-feature-name
-
Make your changes following the coding standards
- Write clear, self-documenting code
- Add comments for complex logic
- Follow TypeScript best practices
- Ensure proper error handling
-
Test your changes
npm run format:check npm run lint npm run build
-
Commit your changes using conventional commit format
git add . git commit -m "feat: add new feature description"
-
Push to your fork
git push origin feat/your-feature-name
-
Create a Pull Request
- Use a clear, descriptive title
- Reference any related issues
- Provide a detailed description of changes
- Include screenshots for UI changes
- Code follows the project's coding standards
- All tests pass
- Code is properly formatted (
npm run format:check) - No linting errors (
npm run lint) - Commit messages follow conventional format
- PR description clearly explains the changes
- Use TypeScript for all new code
- Define proper types and interfaces
- Avoid
anytype when possible - Use meaningful variable and function names
- Use functional components with hooks
- Follow React best practices
- Use proper error boundaries
- Implement proper loading states
- Use the centralized
src/lib/env.tsmodule - Never import server-side vars in client components
- Add new variables to
.env.example
- Code is automatically formatted with Prettier on save
- Use single quotes for strings
- 100 character line limit
- Trailing commas in multi-line structures
src/
├── app/ # Next.js app router
│ ├── api/ # API routes
│ └── ...
├── hooks/ # React hooks
├── lib/ # Utility libraries
│ ├── env.ts # Environment configuration
│ ├── offramp/ # Offramp logic
│ └── stellar/ # Stellar integration
└── types/ # TypeScript type definitions
- Check existing issues and discussions
- Create a new issue for bugs or feature requests
- Join our community discussions
- Review the project documentation
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
Thank you for contributing to Stellar Spend! 🚀