HavenDOCS
Back to Home

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:

  1. Keep it Clean:

    • Use clear, descriptive names (e.g., handleUpdateServerRole vs updateRole).
    • Functions should never exceed 50 lines.
    • Refactor single-responsibility components whenever possible.
  2. TypeScript Only:

    • No any.
    • Always define interfaces for component props.
    • Use Zod or TS types for API responses.
  3. Security First:

    • Never hardcode secrets.
    • Use Supabase PostGIS or Auth built-in methods.
    • Always check RLS policies when adding new tables.

🔄 Git Workflow

  1. Pull Latest Changes: git pull origin main.
  2. Commit Often: Use descriptive messages like feat: add heartbeat to matchmaking.
  3. 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.ts logic with new routes.

[!IMPORTANT] Changelog: Always update the root CHANGELOG.md with your latest changes before finalizing your work.


Created by the Haven Technical Council.