Thank you for your interest in contributing to OpenCow! This guide will help you get started.
- Development Setup
- Code Style
- Commit Message Format
- Pull Request Process
- Testing
- Code Review
- Reporting Issues
-
Fork and clone the repository:
git clone https://github.com/<your-username>/opencow.git cd opencow
-
Install dependencies using pnpm:
pnpm install
-
Start the development server:
pnpm dev
For additional project setup details, see the README.
- TypeScript is used throughout the project with strict mode enabled.
- Prettier handles code formatting. Run
pnpm formatto format your code. - ESLint enforces linting rules. Run
pnpm lintto check for issues. - Keep functions small and focused. Prefer explicit types over
any. - Use meaningful variable and function names.
Your editor should pick up the project's Prettier and ESLint configurations automatically. Please ensure there are no linting errors or formatting issues before submitting a pull request.
We follow the Conventional Commits specification. Each commit message should be structured as:
<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
Types:
| Type | Description |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation changes only |
style |
Formatting, missing semicolons, etc. (no logic) |
refactor |
Code change that neither fixes a bug nor adds a feature |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Build process, tooling, or dependency updates |
Examples:
feat(editor): add syntax highlighting for markdown
fix(sidebar): prevent crash when project list is empty
docs: update contributing guide with testing section
-
Create a feature branch from
main:git checkout -b feat/my-feature
-
Make your changes with clear, atomic commits following the commit message format above.
-
Ensure all tests pass and there are no linting errors:
pnpm test pnpm lint -
Push your branch and open a pull request against
main. -
Fill out the PR template completely, including a summary of changes, type of change, and testing details.
-
Address review feedback promptly. Push additional commits rather than force-pushing, so reviewers can see incremental changes.
-
Once approved, a maintainer will merge your PR.
-
We use Vitest as our test framework.
-
Write tests for all new features and bug fixes.
-
Run the test suite with:
pnpm test -
Aim for meaningful test coverage. Focus on testing behavior rather than implementation details.
-
Place test files alongside the source code they test, using the naming convention
*.test.tsor*.test.tsx.
All submissions require review before merging. Here is what reviewers look for:
- Correctness -- Does the code do what it claims?
- Clarity -- Is the code easy to read and understand?
- Test coverage -- Are there adequate tests for the changes?
- Performance -- Are there any obvious performance concerns?
- Consistency -- Does the code follow existing patterns and conventions?
Be respectful and constructive in code reviews. We are all here to learn and improve.
Before opening a new issue, please search existing issues to avoid duplicates.
When reporting a bug, include:
- A clear and descriptive title.
- Steps to reproduce the issue.
- Expected behavior vs. actual behavior.
- Your environment details (OS, Electron version, Node.js version).
- Screenshots or logs, if applicable.
For feature requests, describe the problem you are trying to solve and your proposed solution.
Use the provided issue templates when available.
Thank you for contributing to OpenCow!