Long-lived branches:
main— production. App Hosting and Firebase Hosting deploys fire from here.dev— integration. Pushes open (or refresh) an automated PR intomain.
Feature branches (anything other than main, dev, or dependabot/**) get an automated PR into dev. After main moves, sync-main-to-branches.yml merges main into feature/*, fix/*, rework/*, refactor/*, and hackaton/* when there is no conflict.
Name branches so labeler can tag the PR: feature/…, fix/…, docs/…, chore/….
Code owners: .github/CODEOWNERS assigns * to @aamoghS.
- Branch from
devunless you are fixing production. - Keep club and hackathon concerns separate. Do not add
hackathon_idto club tables. - Put shared rules in the package that every caller can import. Membership grant/link logic belongs in
@query/db/services/membership, not copied into auth, Stripe, and tRPC. - Role checks go through
isAdmin/isScanner/isProjectLeader/isSuperAdmin. Do not invent anadminProcedurethat is onlyprotectedProcedure. - Dangerous HTML in tRPC input is rejected, not stripped. See Security.
- Prices live in
packages/api/src/services/pricing.ts. Do not hard-code dollar amounts in UI or Stripe calls.
From the repo root:
pnpm lint
pnpm typecheck
pnpm test
pnpm buildLint is --max-warnings 0. Fix warnings rather than raising the cap.
Format:
pnpm formatSee Testing. At minimum, run pnpm test before opening a PR. API suites live next to routers and under packages/api/src/.internal-tests/.
Hacklytics end-to-end:
pnpm --filter hacklytics2027 e2eEnable the hooks once per clone:
git config core.hooksPath .githooks.githooks/pre-commit refuses staged credentials, .githooks/commit-msg
refuses generated attribution lines, and .gitignore keeps both out of
git add . in the first place. What they cover:
- Credentials —
.envand every variant,*.pem,*.key,*.p12, service-account JSON, ADC files, SSH keys. Secrets live in Secret Manager and are referenced fromapphosting.yamlby name. - Key material pasted into ordinary files — a private key block or a
sk_live_/whsec_value in a config or fixture leaks exactly as much as the key file would. The Firebase web API key inapphosting.yamlis public and is not this. .claude/and.agents/— local agent tooling, shared with nobody. This repo's history was rewritten once to remove.claude/.- Attribution lines in commit messages — no
Co-Authored-By: Claude, noClaude-Session:, noGenerated with [Claude Code]. They put a bot in this repo's GitHub contributor list.
--no-verify is there for a false positive, not for getting past a real one.
- Edit files in
packages/db/src/schemas/. pnpm --filter @query/db migrate:pushagainst a database you are allowed to change.pnpm --filter @query/db db:checkconfirms every declared column exists (this is the App Hosting build gate).- Prefer
migrate:generateif you want reviewable SQL inpackages/db/drizzle/.
Destructive changes abort on App Hosting because drizzle-kit push is fed /dev/null and cannot confirm. Plan those separately.
Unique indexes, cascade behavior, and “current hackathon” resolution have bitten this product before. Read the comments on the table you are touching.
Internal packages use workspace:*. restore-workspace.js rewrites accidental "*" versions back to workspace:* if a tool flattened them.
Use .github/ISSUE_TEMPLATE/bug_report.md for bugs.