Skip to content

j-ordanos/matchmaker

Repository files navigation

💞 The Date Crew — Matchmaker Console

Internal tooling for matchmakers to manage clients, view verified biodata, and assign AI‑ranked matches.

▶ Live demo  ·  sign in with priya / matchmaker123

Next.js 16 TypeScript Tailwind v4 shadcn/ui Gemini


Features

🔐 Auth Matchmaker login → guarded dashboard (httpOnly cookie session)
👥 Clients Card grid — name, age, city, marital status, journey-stage tag
📋 Biodata Full Indian-matrimonial profile, tabbed with matches & notes
🧮 Matching Gender-specific weighted scoring across the opposite-gender pool
AI Grounded match verdicts + personalized intro emails (Gemini)
✉️ Send match Dialog with an editable AI email + mock-send toast

Quick start

npm install
cp .env.example .env.local   # optional — add a free Gemini key for live AI
npm run dev                  # → http://localhost:3000

No key required. Without GEMINI_API_KEY the AI layer falls back to template text (labelled Template in the UI). Get a free key (no card) at aistudio.google.com/apikey. Regenerate the dummy dataset anytime: node scripts/generate-data.mjs.

Tech stack

Layer Choice
Framework Next.js 16 — App Router, React Server Components, Server Actions
Language TypeScript (strict) — union types keep biodata & tiers honest
UI Tailwind CSS v4 + shadcn/ui (Radix primitives, lucide icons)
AI Google Gemini 2.5 Flash — structured JSON output
Data Seeded static JSON (200 profiles + 6 clients) behind a repository module
Hosting Vercel (zero-config)

Pages render on the server by default — finished HTML, no client-side fetching for core views. All data flows through src/lib/data.ts, so swapping JSON for Postgres/Firebase is a one-file change.

How matching works

Deterministic weighted engine → src/lib/matching.ts. Each candidate gets a 0–100 score from ~13 subscores (age, income, height, kids, location, religion, diet, language, values, relocation, profession, education, lifestyle), each returning a fit in [0,1] × a weight.

  • Gender-specific via one weight table — no branching logic:
    • Male clients weight the brief's stated preferences — younger, earns ≤, shorter, kids-aligned.
    • Female clients weight holistic fit — profession, education, values, relocation, lifestyle.
  • Every subscore emits a plain-English reason ("Both want kids", "Same religion (Hindu)") used in the UI and as grounding for the AI.
  • Preferences are data, not hard-coded rules — change the table, change the philosophy.

How AI is used

A rerank-and-explain layer on top of the engine — the classic cheap filter → expensive rerank pattern. The algorithm scores all 100+ candidates instantly; Gemini runs only on the top few, on demand.

  • Match insights — a verdict constrained to the 4 tiers via a JSON responseSchema, plus a 1–2 sentence explanation that surfaces honest caveats.
  • Intro emails — short, warm, personalized, grounded strictly in the provided facts.
  • Grounded & resilient — prompts forbid invention; every call has a timeout + template fallback, so a missing key or flaky API never breaks the flow.

Assumptions & trade-offs

Area MVP choice Production
Auth Hardcoded user, httpOnly cookie Hashed passwords + signed session token
Data Seeded static JSON Postgres/Firebase (swap data.ts)
Notes Browser localStorage Persist to a database
Send match Modal + toast (mock) Real email provider
Caste / religion Soft compatibility signals

Project structure

src/
  app/
    login/                    login page + server actions
    dashboard/                auth-guarded layout
      page.tsx                client list
      customer/[id]/page.tsx  detailed matchmaking view (tabs)
    api/customer/[id]/        ai-insights + intro route handlers
  components/                 UI (Avatar, MatchPanel, SendMatchModal, …) + ui/ (shadcn)
  lib/
    matching.ts               gender-specific scoring engine
    ai.ts                     Gemini layer (+ template fallback)
    data.ts                   data access (repository pattern)
    types.ts · format.ts      domain types · pure helpers
scripts/
  generate-data.mjs           seeded dataset generator

About

AI-powered matchmaking console for matrimonial professionals to rank, review, and connect compatible profiles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors