CONTRIBUTING.md
Contributing To Relay
Thank you for helping improve Relay. Keep changes focused, preserve the distinction between shipped and planned features, and include validation appropriate to the affected area.
Requirements
- Node.js 22+
- pnpm 10.11.1
- A Convex account and development project
- A Clerk application
Setup
| 1 | git clone https://github.com/zaid-gd/Relay.git |
| 2 | cd Relay |
| 3 | pnpm install --frozen-lockfile |
| 4 | cp .env.example .env.local |
| 5 | pnpm dev |
Use your own development credentials in .env.local. Configure the Clerk issuer variable in the Convex development deployment as described in .env.example.
Branches
Use a short, descriptive branch name. Suggested prefixes include:
feature/for product workfix/for bug fixesdocs/for documentationtest/for test coverage
Examples: feature/portal-expiry, fix/file-version-order, or docs/setup-guide.
Development
Run the Next.js app and Convex development deployment together:
| 1 | pnpm dev |
Keep the change scoped, update tests and documentation when behavior changes, and avoid mixing unrelated formatting or refactors into the same pull request.
Checks Before A Pull Request
Run the standard project check for every change:
| 1 | pnpm check |
Run the full suite when changing Convex functions or schema, authentication, project files, team permissions, client portals, or application routes:
| 1 | pnpm check:full |
Describe the checks you ran in the pull request. Include clear reproduction and verification steps for user-facing fixes.
Code Style
- Follow the existing Next.js, React, TypeScript, Tailwind, owned Radix UI, and Convex patterns.
- Keep TypeScript strict and avoid
anywhere a precise type is available. - Read
convex/_generated/ai/guidelines.mdbefore changing Convex code. - Derive authorization from the authenticated Convex identity; do not trust client-provided user IDs.
- Keep public portal responses limited to explicit client-safe projections.
- Prefer small, focused changes and add comments only where the behavior is not self-explanatory.
Secrets And Sensitive Data
- Never commit
.env.local, API keys, tokens, credentials, production project IDs, client files, or personal data. - Keep
.env.examplelimited to empty or clearly fake placeholders. - Use development Clerk and Convex projects for local testing.
- Report suspected vulnerabilities privately according to SECURITY.md.
End-to-end tests
The Playwright suite uses Chromium and starts Next.js on http://localhost:3000,
or reuses an existing local server on that address.
Install the browser once:
| 1 | pnpm exec playwright install chromium |
Run the suite:
| 1 | pnpm test:e2e |
Open a headed browser:
| 1 | pnpm test:e2e:headed |
The app needs its normal public Clerk and Convex development variables to boot. The local-mode project test does not create an authenticated session. The authenticated project files, approvals, and client portal journey additionally requires the Clerk secret:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYNEXT_PUBLIC_CONVEX_URL
The setup reuses relay-e2e+clerk_test@example.com in the Clerk development
instance. Override it with E2E_CLERK_USER_EMAIL when needed. The cloud test
uses unique project names and removes its project afterward.
Playwright writes failure traces, screenshots, and videos to test-results/.
Open the HTML report with:
| 1 | pnpm exec playwright show-report |