Contribution Guide
Help us build the Haven Sanctuary. We welcome members of all levels to contribute to the codebase.
📝 Coding Standards
We follow strict Antigravity (2026) rules for all contributions:
-
Keep it Clean:
- Use clear, descriptive names (e.g.,
handleUpdateServerRolevsupdateRole). - Functions should never exceed 50 lines.
- Refactor single-responsibility components whenever possible.
- Use clear, descriptive names (e.g.,
-
TypeScript Only:
- No
any. - Always define interfaces for component props.
- Use
ZodorTS typesfor API responses.
- No
-
Security First:
- Never hardcode secrets.
- Use
Supabase PostGISorAuthbuilt-in methods. - Always check RLS policies when adding new tables.
🔄 Git Workflow
- Pull Latest Changes:
git pull origin main. - Commit Often: Use descriptive messages like
feat: add heartbeat to matchmaking. - Branching Strategy:
main: Production-ready code.feature/*: New components and logic.bugfix/*: Critical patches.
📦 Building Components
When building new UI pieces:
- Reuse UI Primitives: Use existing components from
components/ui/(Radix UI based). - Tailwind-Only: Avoid custom CSS files. Use utility classes.
- Vedic Aesthetic: Follow the Vedic Design System for colors and radii.
🚦 CI/CD & Testing
Before submitting a PR:
- [ ] Run
npm run lint. - [ ] Ensure the Matchmaking server starts and runs on
localhost:8080. - [ ] Verify you haven't broken the
middleware.tslogic with new routes.
[!IMPORTANT] Changelog: Always update the root
CHANGELOG.mdwith your latest changes before finalizing your work.
Created by the Haven Technical Council.