Contributing¶
Thank you for your interest in contributing to Grade Tracker! This document outlines the process for reporting bugs, proposing features, and submitting code changes.
Code of Conduct¶
Be respectful and constructive. All contributors are expected to follow the Contributor Covenant.
Reporting Issues¶
- Search existing issues to avoid duplicates.
- Open a new issue with:
- A clear, descriptive title
- Steps to reproduce (for bugs)
- Expected vs. actual behaviour
- Environment details (OS, Node.js version, browser)
Development Setup¶
See Getting Started for the full installation guide. For contributing specifically:
# Fork the repository, then:
git clone https://github.com/<your-username>/grades-tracker.git
cd grades-tracker
pnpm install
cp .env.example .env.local # Fill in dev Appwrite credentials or leave empty
pnpm dev
Branch Strategy¶
| Branch | Purpose |
|---|---|
main |
Stable production branch |
feature/<name> |
New features |
fix/<name> |
Bug fixes |
docs/<name> |
Documentation-only changes |
chore/<name> |
Maintenance, dependency updates |
Always branch off main:
Commit Conventions¶
Follow Conventional Commits:
Types:
| Type | When to use |
|---|---|
feat |
A new feature |
fix |
A bug fix |
docs |
Documentation changes only |
style |
Formatting, missing semicolons, etc. |
refactor |
Code change that is neither a fix nor a feature |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Build process, dependency updates |
Examples:
feat(grades): add weighted average calculation
fix(auth): handle expired session gracefully
docs(readme): add documentation badge
chore(deps): upgrade next to 15.1.0
Pull Request Process¶
- Push your branch to your fork.
- Open a Pull Request against
main. - Fill in the PR template: describe what changed and why.
- Ensure
pnpm lintandpnpm buildpass with no errors. - Request a review from a maintainer.
- Address any review comments.
- Once approved, the maintainer will merge the PR.
Tip
Keep PRs focused. One feature or fix per PR makes reviews faster.
Code Style¶
- TypeScript: strict mode enabled; avoid
anywhere possible. - React: functional components and hooks only; no class components.
- Imports: absolute imports via
@/alias (configured intsconfig.json). - Formatting: the project uses ESLint (
next lint). Match the surrounding code style. - Naming:
- Components:
PascalCase - Hooks:
camelCaseprefixed withuse - Utilities:
camelCase - Types/Interfaces:
PascalCase - Files:
kebab-casefor pages,PascalCasefor component files
Adding New Dependencies¶
Before adding a dependency:
- Check if it is already provided by an existing package.
- Prefer well-maintained packages with TypeScript support.
- Use
pnpm add <package>(notnpm install).
Documentation¶
If your change affects user-facing behaviour, update the relevant page(s) in docs/. Documentation uses MkDocs Material and Markdown.