Thank you for your interest in contributing to Ivy Framework! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Setup
- Contributing Guidelines
- Widget Contribution Requirements
- Pull Request Process
- Code Style and Standards
- Testing
- Documentation
- Reporting Issues
- Feature Requests
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally
- Set up the development environment (see Development Setup)
- Create a feature branch for your changes
- Make your changes
- Test your changes thoroughly
- Submit a pull request
-
Node.js 22.12+ & vp CLI (latest version)
-
Ivy Console Tool (for development):
# For stable releases dotnet tool install -g Ivy.Console # For prerelease versions (recommended for contributors) dotnet tool install -g Ivy.Console --prerelease
- ARM Mac Users: Rosetta 2 is required for the Google Protocol Buffers package to work properly:
# Install Rosetta 2 if not already installed /usr/sbin/softwareupdate --install-rosetta --agree-to-license
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/Ivy-Framework.git cd Ivy-Framework -
Follow the development setup in the main README.md
The main README contains detailed instructions for:
- Building the frontend
- Pre-generating documentation files
- Running the backend (Ivy.Samples or Ivy.Docs)
- Opening the application in your browser
Ivy Framework uses multiple testing approaches to ensure code quality:
- Backend (C#): Run
dotnet testin the root directory - Frontend (TypeScript): Run
vp testin thesrc/frontend/directory
E2E tests are written using Playwright and are located in src/frontend/e2e/. We provide vp scripts for running these tests:
# Run all E2E tests
vp run e2e
# Run only Ivy.Docs E2E tests
vp run e2e:docs
# Run only Ivy.Samples E2E tests
vp run e2e:samplesImportant: Always use the vp scripts (vp run e2e*) instead of npx playwright test to ensure consistent usage of the locally installed Playwright version and avoid version conflicts.
Additional Playwright options can be passed after --:
vp run e2e -- --headed # Run tests in headed mode
vp run e2e -- --debug # Run tests in debug mode
vp run e2e:samples -- --project=chromium # Run samples tests in Chrome only- Check existing issues and pull requests to avoid duplicates
- Discuss major changes in an issue before starting work
- Ensure your changes align with the project's goals and architecture
- Bug fixes - Help us squash bugs and improve stability
- Feature enhancements - Add new functionality that benefits users
- Documentation improvements - Help make Ivy easier to understand and use
- Performance optimizations - Make Ivy faster and more efficient
- UI/UX improvements - Enhance the user experience
- Widget contributions - New widgets that extend Ivy's functionality (see Widget Contribution Requirements)
- Breaking changes without discussion
- Changes that don't align with Ivy's architecture
- Features that are too specific to individual use cases
- Changes that compromise security or performance
When contributing a new widget to Ivy Framework, your submission must include all of the following components:
- Widget class in
Ivy/Widgets/with proper inheritance fromWidgetBase<T> - Comprehensive XML documentation with
<summary>,<param>, and<remarks>tags - Property documentation for all public properties using
[Prop]attribute - Constructor overloads where appropriate for different use cases
- Proper namespace declaration (
namespace Ivy;)
- React component in
src/frontend/src/widgets/following TypeScript conventions - Props interface with proper typing and optional properties
- Consistent styling using only Tailwind CSS and shadcn/ui components
- Accessibility support with proper ARIA attributes and semantic HTML
- Responsive design that works across different screen sizes
- XML documentation on the C# widget class (comprehensive, not verbose)
- Code examples showing common usage patterns
- Property descriptions for all configurable options
- Integration examples demonstrating how the widget fits into larger applications
- Screenshots showing the widget in different states (normal, disabled, error, etc.)
- Multiple variants if the widget supports different visual styles
- Light and dark mode examples where applicable
- Responsive behavior screenshots on different screen sizes
- C# unit tests in
src/Ivy.Test/covering widget functionality - Frontend unit tests using Vitest in
src/frontend/src/with.test.tsextension - Frontend E2E tests using Playwright in
src/frontend/e2e/- Run all E2E tests:
npm run e2e - Run Ivy.Docs tests:
npm run e2e:docs - Run Ivy.Samples tests:
npm run e2e:samples
- Run all E2E tests:
- Edge case testing including null values, empty states, and error conditions
- Accessibility testing ensuring proper keyboard navigation and screen reader support
- Approved dependencies only: New widgets may only use existing dependencies
- No new npm packages without prior approval and discussion
- Stick to shadcn/ui: Use existing shadcn/ui components where possible
- Tailwind CSS only: No custom CSS files or external styling libraries
When creating issues for widget contributions, use the contributors-welcome label and ensure:
- Clear requirements with detailed specifications
- Design mockups or examples when possible
- Acceptance criteria that can be easily verified
- Difficulty level indication (beginner, intermediate, advanced)
Before submitting your widget PR, ensure you have:
- Backend C# widget class with full XML documentation
- Frontend React component with TypeScript interfaces
- Comprehensive unit tests (C#) and frontend unit tests (Vitest)
- E2E tests (Playwright) for user interactions
- Screenshots showing different widget states
- Usage examples in documentation
- No new external dependencies added
- Accessibility features implemented
- Responsive design verified
- Code follows project style guidelines
- All existing tests still pass
When resolving merge conflicts:
- Ensure all conflict markers (
<<<<<<<,=======,>>>>>>>) are removed - Test that code builds and passes tests after resolution
- Use
git diff --checkto verify no conflict markers remain - Prefer PR workflow over direct pushes to main
The repository has automated protections against unresolved conflict markers:
- Pre-commit hook — blocks commits containing conflict markers
- CI check — a dedicated workflow scans all source files for conflict markers on every push and PR to main
-
Create a descriptive branch name:
feature/add-new-widget fix/button-styling-issue docs/update-getting-started -
Write a clear commit message:
feat: add new BadgeWidget component fix: resolve button hover state issue docs: update installation instructions -
Ensure your code follows our standards:
- Passes all tests
- Follows code style guidelines
- Includes appropriate documentation
- Doesn't introduce new warnings
-
Update documentation if your changes affect:
- Public APIs
- User-facing features
- Installation or setup processes
-
Submit your pull request with:
- Clear description of changes
- Link to related issues
- Screenshots for UI changes
- Test results
For a reference on what constitutes a well-structured pull request, see #1285.
Before submitting your code, ensure it follows the project's linting and formatting rules:
- Use
dotnet formatto format C# code according to the project's ruleset - Run this command in the root directory or specific project directories
- Use
vp lint --fix .to automatically fix ESLint issues - Use
vp fmt .to format code with Oxfmt - These commands should be run from the
src/frontend/directory
The project uses pre-commit hooks that will automatically run linting and formatting on staged files. Make sure your code passes these checks before committing. More details how pre-commit hooks are being set up can be found in src/frontend/README.md
TL;DR, if you have run vp install in the src/frontend, most likely all pre-commit hooks will be working for you, that cover linting and formatting for Ivy-Framework.
- Follow Microsoft C# Coding Conventions
- Use meaningful variable and method names
- Add XML documentation for public APIs
- Keep methods focused and concise
- Use async/await for asynchronous operations
- Follow TypeScript style guide
- Use functional components with hooks
- Prefer TypeScript over JavaScript
- Avoid using
anytype - use proper typing - Follow React best practices
IMPORTANT: Ivy Framework has strict guidelines for frontend dependencies to maintain consistency and avoid bloat.
- shadcn/ui - Primary UI component library
- Tailwind CSS - For all styling (no custom CSS files)
- Radix UI - Underlying primitives (already included via shadcn/ui)
- Lucide React - Icon library
- React Hook Form - Form handling
- Zod - Schema validation
- No new npm packages without explicit approval
- Discuss first - Open an issue before adding any dependency
- Justify necessity - Explain why existing tools can't solve the problem
- Consider bundle size - New packages must have minimal impact
- Security review - All packages undergo security evaluation
- ❌ Custom CSS files or styled-components
- ❌ Alternative UI libraries (Material-UI, Ant Design, etc.)
- ❌ Different icon libraries (FontAwesome, Heroicons, etc.)
- ❌ Utility libraries that duplicate existing functionality
- ❌ Packages that conflict with our existing stack
- Write self-documenting code
- Add comments for complex logic
- Keep functions small and focused
- Use consistent naming conventions
- Follow the DRY principle
# Run all backend tests
dotnet test
# Run specific test project
dotnet test src/Ivy.Test
# Run frontend unit tests
cd src/frontend
vp test
# Run all frontend E2E tests
cd src/frontend
vp run e2e
# Run specific E2E test suites
vp run e2e:docs # Ivy.Docs tests only
vp run e2e:samples # Ivy.Samples tests only- Write tests for new functionality
- Ensure existing tests pass
- Use descriptive test names
- Test both happy path and edge cases
- Mock external dependencies
- Write clear, concise documentation
- Use proper Markdown formatting
- Include code examples where appropriate
- Keep documentation up to date with code changes
- Check existing issues for duplicates
- Try to reproduce the issue
- Gather relevant information
When reporting an issue, include:
- Description - Clear description of the problem
- Steps to reproduce - Detailed steps to recreate the issue
- Expected behavior - What you expected to happen
- Actual behavior - What actually happened
- Environment - OS, .NET version, Node version, etc.
- Screenshots - If applicable
- Code samples - Minimal code to reproduce the issue
- Check if the feature already exists
- Consider if it aligns with Ivy's goals
- Think about the implementation complexity
- Description - What the feature should do
- Use case - Why this feature is needed
- Proposed solution - How it could be implemented
- Alternatives - Other ways to achieve the goal
- Impact - Who would benefit from this feature
- GitHub Issues - For bugs and feature requests
- GitHub Discussions - For questions and general discussion
- Join our Discord - https://discord.gg/sSwGzZAYb6
- Join our Slack - If you want, we can invite you to a dedicated Slack channel for Ivy Framework development.
- Documentation - Check the Ivy.Docs for guides and examples
Thank you for contributing to Ivy Framework! Your contributions help make Ivy better for everyone.