Before You Start
Before opening a pull request:- Search existing issues to see if your bug/feature has already been reported
- Open an issue first for significant changes to discuss the approach
- Read the code of conduct and follow our style guidelines
- Ensure tests pass before submitting your PR
Getting Started
Install dependencies
Kivora uses pnpm for package management:
You must use pnpm (not npm or yarn) because this is a monorepo managed with pnpm workspaces.
Project Structure
Kivora React is organized by component categories:Development Workflow
Watch Mode
For active development, run the package in watch mode:Running Tests
Type Checking
Run TypeScript type checking without emitting files:Adding a New Component
Adding a New Hook
Branch Naming Conventions
Use descriptive branch names with prefixes:feat/— New component or hookfix/— Bug fixchore/— Tooling, dependencies, refactordocs/— Documentation onlytest/— Tests only
Commit Message Format
Use Conventional Commits format:- type:
feat,fix,docs,test,chore,refactor,perf - scope: Component or hook name (lowercase)
- subject: Brief description in present tense
Code Style Guidelines
Components
- Use
forwardReffor components that render HTML elements - Add
displayNameto all components - Include JSDoc comments with examples
- Use Tailwind utility classes for styling
- Destructure props in the function signature
- Use meaningful default values
Hooks
- Prefix all hooks with
use - Return objects for multiple values, not tuples (unless following React conventions)
- Include JSDoc with examples
- Add explicit return types
TypeScript
- Enable strict mode
- Use explicit types for function parameters and return values
- Prefer
interfaceovertypefor prop types - Use
React.ReactNodefor children - Avoid
any— useunknownif type is truly unknown
Testing Guidelines
Every component and hook must have tests:- Components: Use
@testing-library/reactto test rendering and user interactions - Hooks: Use
renderHookfrom@testing-library/react - Coverage: Aim for >80% code coverage
- Test file naming: Match the component/hook name (
Button.test.tsx,useDisclosure.test.ts)
Submitting a Pull Request
Make your changes
- Write clean, readable code
- Follow the style guidelines
- Add tests for new functionality
- Update documentation if needed
Pull Request Checklist
Before submitting your PR, ensure:- Code follows the style guidelines
- All tests pass (
pnpm --filter @kivora/react test) - TypeScript compiles without errors (
pnpm --filter @kivora/react type-check) - New features include tests
- JSDoc comments added to public APIs
- Documentation updated (if applicable)
- Commit messages follow Conventional Commits format
Reporting Issues
Found a bug or have a feature request?- Search existing issues first at github.com/your-org/kivora/issues
- Click New Issue and choose the appropriate template:
- 🐛 Bug report — Wrong behavior, broken styles, TypeScript errors
- 💡 Feature request — New component, new hook, new prop
- 📚 Documentation — Missing or incorrect docs
Bug Report Template
For bugs, always include:@kivora/reactversion- React version
- Browser and OS
- Minimal reproduction (StackBlitz or CodeSandbox link preferred)
- Expected vs actual behavior
- Steps to reproduce
Code Review Process
All PRs are reviewed by maintainers:- Automated checks run on every PR (tests, type checking, linting)
- Code review by at least one maintainer
- Feedback is provided for any necessary changes
- Approval and merge once all checks pass
Next Steps
Components
Explore existing components for reference
Hooks
See how hooks are implemented