Thank you for your interest in contributing. This guide covers everything you need to get the project running locally, our branch and commit conventions, and the workflow for submitting changes.
Please also read our Code of Conduct before participating.
- Local Setup
- Branch Naming
- Commit Messages
- Git Workflow
- Submitting a Pull Request
- Reporting Bugs
- Suggesting Features
- Documentation
- Node.js v18+
- pnpm —
npm install -g pnpm - A Supabase project (for PostgreSQL database)
- A Cloudflare R2 bucket (for file storage)
- A Google Cloud project with OAuth 2.0 credentials
Environment variable credentials are managed internally by the TritonScript dev team. Reach out to a maintainer via email to get access to the required .env files for both frontend/ and backend/.
-
Clone the repository
git clone https://github.com/CSES-Open-Source/TritonScript.git cd TritonScript-legacy -
Set up the backend
cd backend pnpm install pnpm db:migrate # run Prisma migrations against your Supabase database pnpm run dev # starts on http://localhost:5005
-
Set up the frontend
cd frontend pnpm install pnpm run dev # starts on http://localhost:5173
We follow the Conventional Branch specification.
Format: <type>/<short-description> or <type>/issue-<number>-<short-description>
| Type | When to use |
|---|---|
feature/ |
New functionality |
bugfix/ |
Fix a bug on an existing feature |
hotfix/ |
Urgent fix for a production issue |
refactor/ |
Code improvements with no behavior change |
docs/ |
Documentation-only changes |
chore/ |
Build process, dependencies, or tooling |
Rules:
- Lowercase only — no uppercase letters
- Words separated by hyphens — no underscores or spaces
- Keep it concise and descriptive
- Include the issue number when one exists
Examples:
feature/note-search
bugfix/issue-42-upload-fails
docs/update-contributing-guide
refactor/auth-middleware
chore/upgrade-prisma
We follow the Conventional Commits specification.
Format:
<type>[optional scope]: <description>
[optional body]
[optional footer]
| Type | When to use |
|---|---|
feat |
Introduces a new feature |
fix |
Patches a bug |
docs |
Documentation changes only |
style |
Formatting, whitespace — no logic change |
refactor |
Code change that is neither a fix nor a feature |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Build process, dependency updates, tooling |
ci |
CI/CD configuration changes |
Rules:
- Use lowercase for the type
- Use imperative mood in the description — "add feature" not "added feature"
- Keep the subject line under 72 characters
- Do not end the subject line with a period
- Use the body to explain what and why, not how
- Reference issues in the footer:
Closes #42
Examples:
feat(notes): add search by course and instructor
fix: resolve file upload failure on large PDFs
docs: update environment variable table in CONTRIBUTING
refactor(auth): simplify JWT verification middleware
chore: upgrade Prisma to v6
-
Sync your local develop branch
git checkout develop git pull origin develop
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes and commit
git add <file1> <file2> git commit
-
Push your branch
git push origin feature/your-feature-name
-
Open a Pull Request to
develop(notmain) — see below. -
After your PR is merged, delete your branch
git branch -d feature/your-feature-name
- Open all PRs against the
developbranch - Fill out the PR description with a summary of your changes and the issue it addresses
- Link the related issue:
Closes #<issue-number> - Keep PRs focused — one feature or fix per PR
- Make sure the project builds before opening the PR
- A maintainer will review and merge your PR
Open an issue on GitHub Issues and include:
- A clear description of the bug
- Steps to reproduce it
- Expected vs. actual behavior
- Screenshots or logs if applicable
- Your environment (OS, Node.js version, browser)
Open an issue with the label enhancement and describe:
- The problem you are trying to solve
- Your proposed solution
- Any alternatives you have considered
- Keep
README.mdupdated as the project evolves - Comment non-obvious logic — explain why, not just what
- Keep comments up to date as code changes