Contributing to basecn
August 13, 2025 ยท View on GitHub
Thank you for your interest in contributing to basecn! We welcome contributions from the community and are excited to see what you'll bring to the project.
๐ Getting Started
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js (version 18 or higher)
- pnpm (recommended) or npm
- Git
Setting Up Your Development Environment
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/basecn.git
cd basecn
-
Install dependencies:
pnpm install -
Start the development server:
pnpm dev -
Open your browser and navigate to http://localhost:3000
๐ Types of Contributions
We welcome several types of contributions:
๐ Bug Reports
- Use the GitHub issue tracker
- Include a clear description of the problem
- Provide steps to reproduce the issue
- Include screenshots or code snippets when helpful
โจ Feature Requests
- Open an issue with the "feature request" label
- Describe the feature and its use case
- Explain why this feature would be beneficial
๐ง Code Contributions
- Bug fixes
- New components
- Component enhancements
- Documentation improvements
- Performance optimizations
๐ Documentation
- Improve existing documentation
- Add examples and use cases
- Fix typos and grammatical errors
๐ ๏ธ Development Workflow
Branch Naming Convention
Use descriptive branch names that indicate the type of work:
feature/add-button-component
fix/avatar-fallback-issue
docs/update-installation-guide
refactor/improve-component-structure
Making Changes
-
Create a new branch from
main:git checkout -b feature/your-feature-name -
Make your changes following our coding standards (see below)
-
Test your changes thoroughly:
pnpm dev # Test in development pnpm build # Ensure it builds correctly -
Commit your changes with a descriptive message:
git add . git commit -m "feat: add new button component with variants" -
Push to your fork:
git push origin feature/your-feature-name -
Open a Pull Request on GitHub
๐ Coding Standards
TypeScript Guidelines
- Use TypeScript for all new code
- Prefer
interfaceovertypefor object shapes - Avoid
anytypes - use proper typing - Export interfaces for component props
File Organization
- Place new components in
src/registry/components/ui/ - Add demo examples in
src/components/demo/ - Follow the existing naming conventions
- Create corresponding documentation in
content/docs/components/
๐ค Community Guidelines
Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and grow
- Maintain a positive environment
Communication
- Use GitHub issues for bug reports and feature requests
- Join discussions in pull requests
- Ask questions in GitHub discussions
- Be patient and helpful with newcomers
Getting Help
If you need help or have questions:
- Check existing issues on GitHub
- Search the documentation for answers
- Open a discussion on GitHub
- Ask in pull request comments for specific code questions
Thank you for contributing to basecn! Your efforts help make this project better for everyone.