Welcome Contributors
Thank you for your interest in contributing to KAIU Natural Living! This guide will help you get started.Getting Started
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/kaiu-natural-living.git
cd kaiu-natural-living
Follow the Local Development Setup guide.
Write code following our Code Style Guide.
Contribution Types
Bug Fixes
- Check if the bug is already reported in Issues
- Create a new issue if not exists
- Reference the issue in your PR: “Fixes #123”
- Include steps to reproduce and how your fix resolves it
New Features
- Open an issue to discuss the feature first
- Get approval from maintainers
- Implement following the project architecture
- Add tests for new functionality
- Update documentation
Documentation
- Fix typos, improve clarity
- Add missing documentation
- Update outdated information
- Add code examples
Tests
- Add tests for untested code
- Improve existing tests
- Fix flaky tests
Commit Message Format
We use Conventional Commits:Types
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksperf: Performance improvements
Examples
Scope Guidelines
Common scopes:products- Product-related changesorders- Order managementcheckout- Checkout flowwhatsapp- WhatsApp integrationai- AI orchestratordashboard- Admin dashboardapi- Backend APIdb- Database/Prisma changes
Code Review Process
Before Submitting
- Code follows style guide
- All tests pass
- Lint passes without errors
- Documentation updated
- Commit messages follow conventions
- No merge conflicts
PR Template
When creating a PR, include:Review Expectations
- Maintainers will review within 48 hours
- Address feedback promptly
- Keep PRs focused and small
- One feature/fix per PR
Code Standards
TypeScript
- Use TypeScript for all new frontend code
- Define proper types, avoid
any - Use interfaces for object shapes
React Components
- Use functional components
- Prefer hooks over class components
- Extract reusable logic into custom hooks
- Keep components small and focused
Backend Code
- Use async/await over callbacks
- Handle errors properly
- Add logging for debugging
- Keep functions focused
Testing Requirements
Unit Tests
Add tests for:- New components
- New utility functions
- Business logic
- API endpoints
Integration Tests
Test critical flows:- Checkout process
- Order creation
- Payment handling
Documentation Requirements
Code Comments
README Updates
Update README.md if you:- Add new environment variables
- Change setup instructions
- Add new dependencies
- Modify architecture
API Documentation
Document new endpoints:Database Changes
Schema Modifications
- Edit
prisma/schema.prisma - Create migration:
npx prisma migrate dev --name description - Test migration locally
- Include migration in PR
- Document breaking changes
Seed Data Updates
If modifyingprisma/seed.ts:
- Don’t remove existing seed data
- Add new data additively
- Test seed script:
npm run seed
Security Guidelines
Never Commit
- API keys or secrets
.envfiles- User data or passwords
- Database credentials
Security Best Practices
- Validate all user input
- Sanitize database queries
- Use environment variables for secrets
- Hash passwords with bcrypt
- Implement rate limiting
Performance Considerations
- Optimize database queries (use indexes)
- Implement pagination for large lists
- Cache expensive operations
- Lazy load images and components
- Monitor bundle size
Questions and Support
- Open an issue for questions
- Join community discussions
- Tag maintainers for urgent issues
- Be respectful and patient
Code of Conduct
Our Standards
- Be respectful and inclusive
- Accept constructive criticism
- Focus on what’s best for the project
- Show empathy towards others
Unacceptable Behavior
- Harassment or discrimination
- Trolling or insulting comments
- Publishing others’ private information
- Unprofessional conduct
License
By contributing, you agree that your contributions will be licensed under the project’s license.Recognition
Contributors will be recognized in:- README.md contributors section
- Release notes
- Project credits
Next Steps
- Review Code Style Guide
- Check Testing Guide
- Read Project Structure