React + TypeScript application that visualizes GitHub contributors and their contributions.
When editing code, always verify you are working in the correct repository before making changes. Confirm the repo path if multiple repos are checked out.
When working with git, always create a feature branch before committing. Never push directly to main unless explicitly told to.
This machine uses fnm (not nvm or nix) for Node.js version management. Run eval "$(fnm env)" before any npm/node commands. Go projects may need GOEXPERIMENT flag for tests.
For first-time local development setup, run npm run setup. This handles prerequisites, environment files, Supabase, and migrations in one command. Use npm run setup:verify to check health and npm run setup:reset to start fresh.
When asked to "review a PR", read the PR description, comments, and diff first. Do not immediately try to build/test or check merge conflicts unless asked.
- Frontend: React + TypeScript + Vite
- Backend: Supabase (database, auth, RLS)
- Design: Figma for collaboration and component documentation
src/lib/supabase.ts— Supabase client configurationsrc/lib/progressive-capture/— Background data processing and notificationssupabase/migrations/— Database schema migrationsdocs/— Postmortems and reference docsmintlify-docs/— Public documentation site (Mintlify)scripts/— Documented, organized utility scripts
- Environment variables:
VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEY - RLS allows public read access — first search works without login
- MCP server configured in
.mcp.jsonfor direct database access - Use Supabase Dashboard SQL Editor when Docker isn't running
The application uses a manual, user-initiated repository tracking system:
- Users explicitly choose which repositories to track via "Track This Repository" button
- No automatic discovery or tracking happens without user action
- Untracked repositories show a tracking card instead of errors
This project follows an invisible, Netflix-like user experience:
- Database-first — query cached data before API calls
- Auto-detection — detect and fix data quality issues automatically
- Subtle notifications — inform users without interrupting workflow
- Progressive enhancement — core functionality works immediately, enhanced features load in background
- No manual intervention — users never need to click "Load Data"
src/lib/progressive-capture/smart-notifications.ts— auto-detection on page loadsrc/lib/progressive-capture/background-processor.ts— invisible background worksrc/lib/progressive-capture/ui-notifications.ts— user-friendly notifications/docs/user-experience/feature-template.md— UX pattern template/docs/user-experience/implementation-checklist.md— auto-detection integration guide
- TypeScript with proper interfaces/types — no
anyorunknownas lazy fixes - ES modules only — no
require()calls - Vitest for testing — never jest
- Bulletproof testing practices:
/docs/testing/BULLETPROOF_TESTING_GUIDELINES.md - Match the existing design language for all components
- Use
console.log('%s', owner)not template literals for logging (security)
- Never write env variables inline into scripts
- Use the Supabase MCP server for migrations
- RLS policies are critical — public read access, authenticated write
Published docs live at https://docs.contributor.info (Mintlify). Source files are in mintlify-docs/.
When linking to docs pages, use the slug from mintlify-docs/ — not the app route. For example:
- Docs:
https://docs.contributor.info/features/contributor-of-month(matchesmintlify-docs/features/contributor-of-month.mdx) - App:
https://contributor.info/continuedev/continue(matches route/:owner/:repo)
The app does not use a /repo/ prefix in its routes. Routes are /:owner/:repo, /:owner/:repo/health, etc.
- Run
npm run buildbefore submitting — checks types and builds production bundle - If you touch a file, improve it — don't just disable linters
- After visual changes, look for performance improvement opportunities
- No premature optimizations without testing
- E2e tests only when necessary
- Delete one-time-use scripts that are not referenced anywhere