Thank you for considering contributing to Kuma Mieru! This document provides guidelines and instructions for contributing to this project.
Please be respectful and considerate of others when contributing to this project. We want to foster an inclusive and welcoming community.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/kuma-mieru.git cd kuma-mieru - Add the original repository as an upstream remote:
git remote add upstream https://github.com/Alice39s/kuma-mieru.git
- Install dependencies:
bun install
-
Create a new branch for your feature or bugfix:
git checkout -b feature/amazing-feature # or git checkout -b fix/bug-description -
Make your changes
-
Run the development server to test your changes:
bun run dev
-
Make sure your code follows the project's coding standards:
bun run lint bun run format
-
Commit your changes with a descriptive commit message:
git commit -m 'feat(component): add some amazing feature'Follow the conventional commit format:
feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Changes that do not affect the meaning of the code (formatting, etc.)refactor: Code changes that neither fix a bug nor add a featureperf: Performance improvementstest: Adding or correcting testschore: Changes to the build process or auxiliary tools
-
Push to your fork:
git push origin feature/amazing-feature
-
Create a Pull Request from your fork to the main repository
- Keep your PR focused on a single issue or feature
- Write clear descriptions of what your PR accomplishes
- Include screenshots for UI changes if possible
- Ensure your code passes all linting and formatting checks
- Make sure your code works in both light and dark themes
- Keep your PR up-to-date with the main branch by rebasing
- Write concise, readable TypeScript code
- Use functional and declarative programming patterns
- Follow DRY (Don't Repeat Yourself) principle
- Implement early returns for better readability
- Structure components logically: exports, subcomponents, helpers, types
- Use descriptive names with auxiliary verbs (isLoading, hasError)
- Prefix event handlers with "handle" (handleClick, handleSubmit)
- Use lowercase with dashes for directories (components/auth-wizard)
- Favor named exports for components
- Use TypeScript for all code
- Prefer interfaces over types
- Avoid enums; use const maps instead
- Implement proper type safety and inference
- Use
satisfiesoperator for type validation
- Favor React Server Components (RSC) where possible
- Minimize 'use client' directives
- Implement proper error boundaries
- Use Suspense for async operations
- Optimize for performance and Web Vitals
- Write tests for your code when applicable
- Ensure your changes don't break existing functionality
- Update the README.md and README.zh.md if your changes affect the project's functionality
- Document your components with descriptive comments
- Update the messages in the
./messages/folder
- Add your language to the locales array in the
./utils/i18n/config.tsfile - Add your language to the languages json file in the
./messages/folder, example:./messages/en-US.json
If you have any questions or need help with your contribution, feel free to open an issue asking for guidance.
Thank you for contributing to Kuma Mieru!