Thank you for your interest in improving TrackLab. This document explains how to set up the project locally, what we expect from contributions, and how to open issues and pull requests.
- Node.js (LTS recommended)
- npm
- PostgreSQL database (local or hosted)
- A Google OAuth client (for sign-in) and other credentials as described in the README
- Fork the repository, then clone your fork (replace with your GitHub username and repo name if different):
git clone https://github.com/<your-username>/Track-Lab.git cd TrackLab
- Install dependencies:
npm install
- Environment: Copy or create a
.envfile using the variables listed in the README. Never commit secrets. - Database: Configure
DATABASE_URL, then apply Prisma migrations (if the repo includes them) and generate the client:Adjust commands if your workflow usesnpx prisma generate npx prisma migrate deploy
db pushfor local dev instead. - Run the app:
Open http://localhost:3000.
npm run dev
- Lint:
npm run lint - Build:
npm run build(catches many Next.js and type issues) - Small, focused changes: One logical change per PR is easier to review than a large mixed refactor unless discussed first.
- Match existing style: Follow patterns in nearby files (imports, naming, MUI usage, API route structure).
- API changes: If you add or change HTTP endpoints, update
api-doc.mdin the same PR. - Database changes: Include Prisma schema/migration updates when needed; describe breaking changes in the PR.
- Use a descriptive branch name, e.g.
fix/login-redirect,feat/admin-pagination,docs/api-users. - Write clear commit messages (imperative mood is fine: “Add load more to admin users”).
- Open a PR against the default branch (usually
main). - Fill in the pull request template (GitHub will show it automatically).
- Link related issues with
Fixes #123orRefs #123in the description when applicable. - Respond to review feedback; maintainers may merge, request changes, or close with an explanation.
- Use the bug report or feature request templates when possible.
- Include steps to reproduce for bugs, and expected vs actual behavior.
- Do not post passwords, API keys, or personal data in public issues.
All participants are expected to follow the Code of Conduct. By participating, you agree to uphold it.
If something in this guide is unclear or outdated, open an issue or start a discussion so we can improve it.