This document contains critical information for GitHub Copilot and developers working on RadBooks.
The main branch is PROTECTED. New work must be committed to a branch. When substantial work is completed, the commits should be pushed
# Start new work
git checkout main
git pull origin main
git checkout -b feature/your-feature-name
# Make changes and commit
git add -A
git commit -m "feat: your change description"
# Push and create PR
git push origin feature/your-feature-name
# Then create PR via GitHub UIRun these checks to catch issues early:
# 1. Type check
npm run type-check
# 2. Lint
npm run lint
# 3. Build test (catches most deployment issues)
npm run buildIf any of these fail, fix the issues before committing.
- Components: PascalCase (
TransactionCard.tsx) - Utilities: kebab-case (
format-currency.ts) - API Routes: kebab-case (
verify-balances/route.ts) - Types: PascalCase (
TransactionType) - Constants: UPPER_CASE in file (
MAX_DATE)
Before implementing new features, check:
PROJECT_STRUCTURE.md- File organization
This project runs in a devcontainer with the following services always available:
- PostgreSQL is available at
localhost:5432. TheDATABASE_URLenvironment variable is pre-set (e.g.,postgresql://transparency:devpassword@localhost:5432/transparency_dev). Do not attempt to install or start PostgreSQL — it is already running. - Playwright Chromium must be installed before running E2E tests:
npx playwright install chromium
- Search the codebase for similar patterns
- Check existing API routes for consistency
- Verify imports match project conventions
- Test locally before pushing
- Ask for clarification on ambiguous requirements