Thank you for your interest in contributing to FlashNotes! We welcome contributions from everyone. By participating in this project, you agree to abide by our code of conduct (we should add one!).
If you find a bug, please ensure the bug was not already reported by searching on GitHub under Issues. If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
If you have an idea for an enhancement, please search the Issues to see if it has already been suggested. If not, open a new issue, providing a clear description of the proposed enhancement and its potential benefits.
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/0010aor/FlashNotes.git
- Set up the development environment by following the instructions in the README.md.
- Install pre-commit hooks: After setting up the environment, run the following command in the project root to enable automatic code style checks before each commit:
# If you installed pre-commit via pip pre-commit install # Or if you are using uv to manage pre-commit # uv run pre-commit install
- Create a new branch for your feature or bug fix:
git checkout -b name-of-your-feature-or-fix
- Make your changes. Ensure your code follows the project's style guidelines.
- Write tests for your changes. For the backend, we use Pytest. Ensure all tests pass.
- Commit your changes:
(Consider using Conventional Commits for commit messages).
git commit -m "feat: Describe your feature" -m "Detailed description of the changes." # Or for a fix: # git commit -m "fix: Describe your fix" -m "Detailed description of the fix."
- Push your branch to your fork:
git push origin name-of-your-feature-or-fix
- Open a Pull Request (PR) to the
mainbranch of the original repository. Provide a clear title and description for your PR, linking to any relevant issues.
- Please ensure your code is formatted correctly before committing.
- Backend (Python): Follow PEP 8 guidelines. We use Ruff, configured in
backend/pyproject.toml. - Frontend (TypeScript/React): We use Biome for linting and formatting. Please ensure your code adheres to the configuration in
frontend/biome.json. Key aspects include:- 2-space indentation.
- 100-character line width.
- Single quotes for TS/JS, double quotes for JSX.
- Trailing commas on multiline structures.
- Adherence to recommended linter rules (with specific rules like
noExplicitAny,noArrayIndexKey, andnoNonNullAssertionset to generate warnings).
- Backend: Ensure all backend changes are covered by tests using
pytest. Run tests from thebackenddirectory. - Frontend: (Add details about frontend testing if applicable, e.g., Vitest, React Testing Library).
Thank you again for your contribution!