BuddyUp
Deterministic multi-objective team formation platform with quarantined AI explainability, pre-formed squad protection, and atomic PostgreSQL state machines.
Signature: Deterministic 5-pass heuristic · quarantined AI explainability · atomic PostgreSQL procedures
Key Verified Performance Metrics
01 System Context & Problem
Hackathons and academic cohorts suffer from chaotic team formation. Solo participants pitch themselves across unstructured Discord channels, squads end up with redundant skills (e.g. four frontend developers and zero backend support), and pre-formed friend groups fear being broken up by naive matching systems.
02 Architecture & Implementation
Next.js 15 App Router monolith with React 19 Server Components for data fetching, authenticated Server Actions for mutations, a pure in-memory mathematical optimizer, and managed Supabase PostgreSQL 15 enforcing tenant isolation via Row-Level Security.
Engineering Approach: Designed a constraint-satisfying optimization platform using a pure five-pass heuristic in TypeScript that balances multi-objective mathematical criteria, preserves locked friend groups, fills declared partial squad vacancies, and uses generative AI strictly downstream for read-only narrative explanation.
03 Technical Decisions & Trade-offs
Core Architectural Decision
Enforced strict zero-randomness determinism by breaking score ties using lexicographical participant ID comparison instead of Math.random(). Quarantined generative AI (Groq Qwen 27B) strictly to Layer 2 narrative synthesis with a zero-downtime deterministic fallback, ensuring the LLM never decides team membership.
Constraints & Incurred Trade-off
Using a heuristic five-pass optimizer rather than an exact integer linear programming (ILP) solver trades global mathematical optimality for sub-50ms execution and predictable memory footprint, making it suitable for live hackathon check-ins.
04 Scalability, Throughput & Security
Engine executes in memory with O(N * M) polynomial complexity, processing 500+ participants in under a second. Database mutations run via atomic PostgreSQL stored procedures (join_team_atomic, create_team_atomic) that eliminate race conditions under concurrent registration spikes.
Sub-50ms algorithmic formation execution; zero layout shift (CLS = 0) with Server Components; and sub-600ms Groq LLM narrative synthesis streaming via edge-optimized endpoints with an instant offline rule fallback.
05 Verified Outcomes
- Engineered a deterministic five-pass heuristic team formation engine executing in sub-50ms across four objective functions (skill diversity 35%, role satisfaction 30%, experience balance 20%, interest alignment 15%) with zero randomness and 100% auditability.
- Architected a quarantined two-layer explainability pipeline combining diagnostic mathematical scorecards with Groq LLM narrative synthesis, backed by atomic PostgreSQL stored procedures, strict Row-Level Security, and 179 passing Vitest tests.