=== COUPLE COMPATIBILITY CHECKER - AI DOCUMENTATION === Version: 3.5.0 Last Updated: December 16, 2025 Author: Ian Musa Website: https://couple-compatibility-checker.vercel.app Repository: https://github.com/Musa-Ian/v0-couple-compatibility-checker === OVERVIEW === Couple Compatibility Checker is a sophisticated astrological compatibility analysis web application that combines six metaphysical systems: Chinese Astrology, Five Elements Theory, Life Path Numerology, Kua Number (Feng Shui), BaZi Four Pillars, and Western Astrology. The application provides holistic relationship insights by analyzing compatibility scores and the newly attached BaZi metadata across multiple frameworks. === PRIMARY FEATURES === 1. COUPLE COMPATIBILITY ANALYSIS - Input: Two people's names, birth dates, optional birth times, genders (male/female/other), and birth cities selected from the built-in database (provides latitude/longitude/timezone) - Output: Overall compatibility percentage (0-100%), relationship type, detailed breakdown - Systems Used: Chinese Zodiac (~35% weight), Five Elements (~25% weight), Life Path Numbers (~25% weight), Kua Number (15% weight), Western Astrology (±10 modifier), BaZi Four Pillars (parallel score + metadata) - Special Features: Swiss Ephemeris planetary placements, Moon confidence tiers, automatic Ascendant detection, Kua Number Feng Shui analysis, Venus synastry overlays, Jupiter synergy bonuses, BaZi day master insights with hour-pillar warnings when birth times are missing 2. GROUP COMPATIBILITY MATCHER - Input: 3-20 people with names and birth dates - Output: Compatible groups organized by tier (Strict ≥75%, Flexible ≥60%, Neutral ≥45%) - Algorithm: Score-based pairing with individual compatibility breakdown - Use Cases: Friend groups, team building, social matchmaking 3. WESTERN ASTROLOGY INTEGRATION - Planetary Positions: Sun, Moon, Mercury, Venus, Mars, Jupiter, Ascendant (MC tracked for houses) - Calculation Method: Swiss Ephemeris (`swisseph`) with the birth city's latitude/longitude and timezone (from `cities-lite.json`) - Special Detection: Moon confidence tiers, automatic Ascendant confidence, Venus synastry overlays - Scoring: Hybrid system combining element compatibility with aspect modifiers 4. VENUS SYNASTRY BONUS (v3.3.0) - Detects romantic attraction when one person's Venus aligns with another's Sun or Moon - Override Logic: Makes Venus compatible even when Venus-Venus incompatible if synastry overlay exists - Visual Indicator: Pink badge (💕) with matched planets display - Point Value: +27 points when overriding incompatibility 5. BAZI DAY MASTER ENGINE (v3.5.0) - Full translation of the legacy BaZi compatibility matcher into typed modules with Swiss Ephemeris timezone handling - Calculates Year, Month, Day, and Hour pillars plus day master strength and elemental balance for each person - Generates compatibility breakdowns (Kua harmony, day master dynamics, elemental support) alongside personalized recommendations - Surfaces each person’s elemental needs, preferred directions (via Kua trigram mapping), and badges when hour pillars rely on noon fallback === TECHNICAL SPECIFICATIONS === ARCHITECTURE: - Framework: Next.js 15 with App Router - Runtime: React 18 with TypeScript - Deployment: Vercel Edge Functions - API: Server-side calculations via Next.js API routes - Security: Enterprise-level (XOR encryption, XSS protection, prototype pollution prevention) SECURITY FEATURES (v3.3.0): - XOR Encryption: Session-based keys for localStorage/sessionStorage - XSS Prevention: Input sanitization removes