Thank you for considering contributing to our project! This guide will help you understand how to participate in project development, including submitting code, reporting issues, and making suggestions. We value every contributor's effort and strive to make the contribution process as smooth as possible.
We adopt the Contributor Covenant as our code of conduct. As a project participant, you need to follow these principles:
- Use welcoming and inclusive language
- Be respectful of differing viewpoints and experiences
- Gracefully accept constructive criticism
- Focus on what is best for the community
- Show empathy towards other community members
If you observe violations of the code of conduct, please report them via email.
If this is your first time contributing to an open source project, we've prepared detailed steps for you:
- Register a GitHub account
- Fork this repository
- Clone your fork locally:
git clone https://github.com/your-username/view-shadcn-ui.git cd view-shadcn-ui
- Create a new branch:
git checkout -b my-contribution
- Make changes and commit them
- Push to your fork:
git push origin my-contribution
- Create a Pull Request
We have specially prepared tasks marked with good first issue
for newcomers, which are great starting points.
When submitting a bug report, please use our Issue template and include the following information:
### Description
[Clear and concise description of the bug]
### Steps to Reproduce
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Expected Behavior
[Describe what should happen]
### Actual Behavior
[Describe what actually happened]
### Environment
- OS: [e.g., Windows 10]
- Browser: [e.g., Chrome 90.0]
- Project Version: [e.g., v1.2.3]
### Additional Information
[Such as screenshots, error logs, etc.]
Feature suggestions should include:
- Feature description
- Use cases
- Expected outcome
- Possible implementation approaches
- Alternative solutions considered
Please use the Feature Request template to create an Issue.
- Ensure your local development environment is properly configured
- Create a feature branch:
git checkout -b feature/your-feature-name
- Write code and test cases
- Run the test suite:
npm run test
- Commit code (following commit conventions)
- Keep your branch synchronized with the main repository:
git remote add upstream https://github.com/devlive-community/view-shadcn-ui.git git fetch upstream git rebase upstream/dev
Documentation is an essential part of the project. We welcome:
- Correction of documentation errors
- Improvement of documentation descriptions
- Addition of code examples
- Writing tutorials
- Choose or create an Issue
- Discuss implementation approach in the Issue
- Write code and tests
- Submit Pull Request
- Code review
- Merge code
We use the following tools to ensure consistent code style:
- ESLint: JavaScript/TypeScript code checking
- Prettier: Code formatting
- EditorConfig: Editor configuration
The project root directory contains related configuration files:
.
├── .eslintrc.js
├── .prettierrc
└── .editorconfig
Run before submitting code:
pnpm run lint
pnpm run format
We use a strict commit message format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types must be one of the following:
feat
: New featurefix
: Bug fixdocs
: Documentation only changesstyle
: Changes that do not affect code meaning (spacing, formatting, etc.)refactor
: Code changes that neither fix a bug nor add a featureperf
: Code changes that improve performancetest
: Adding or correcting testschore
: Changes to build process or auxiliary toolsrevert
: Revert previous commits
Scope should be the name of the affected module.
Example:
feat(auth): implement JWT-based authentication
- Add JWT middleware
- Implement token generation and validation
- Add user authentication routes
- Integrate Redis for refresh token storage
close (#123)
PR titles should follow the same format as commit messages. PR descriptions should include:
- Related Issue links
- Change description
- Testing methods
- Screenshots (if applicable)
- Documentation updates (if applicable)
PR Checklist:
- Code follows project style guidelines
- Added/updated test cases
- Updated related documentation
- All CI checks pass
- At least one maintainer review approval
-
System requirements:
- Node.js >= 16
- pnpm >= 7
- Git
-
Install dependencies:
pnpm install
-
Start development server:
pnpm run dev
.
├── src/ # Source code directory
│ ├── ui/ # Components
│ └── utils/ # Utility functions
└── docs/ # Documentation
dev
: Main branch, always stabledev
: Development branchfeature/*
: New feature branchesbugfix/*
: Bug fix branchesrelease/*
: Release brancheshotfix/*
: Emergency fix branches
- Create
release
branch fromdev
- Update version number (following Semantic Versioning)
- Update CHANGELOG.md
- Conduct release testing
- Merge into
dev
- Tag and release
Q: How to handle merge conflicts?
A: Keep branches synchronized, use git rebase
instead of merge
, coordinate with other contributors when necessary.
Q: What if tests fail? A: Check test logs, ensure all dependencies are correctly installed, and environment variables are properly configured.
Q: How long until PR review? A: We strive to respond to all PRs within 2 business days.
- Read the Documentation
- Ask in Discussions
- Join our Discord community
- Email us at [email protected]
We acknowledge all contributors in our README. Significant contributors may be invited to become project maintainers.
Thank you for contributing to the open source community!