Skip to content

Repository files navigation

Matching - AI-Powered Coffee Chat Matching App

A sophisticated matching application that uses AI/LLM technology to create meaningful connections based on photos and personality compatibility.

🎯 App Concept

The Magic of AI-Powered Matching

Our app goes beyond traditional swiping by using advanced AI to analyze user profiles and create meaningful matches based on deep compatibility analysis.

🚀 User Journey

1. Phone Authentication 📱

  • Users log in using their phone number
  • SMS verification via Twilio API
  • Secure, passwordless authentication

2. Profile Creation 🖼️

  • Upload headshot photo
  • Clean, intuitive photo upload interface
  • Image optimization and storage

3. Personality Questionnaire 💭

  • Curated questions for better matching
  • Personality insights and preferences
  • Values, interests, and lifestyle questions

4. AI Matching Engine 🤖

  • LLM analysis of user profiles
  • Compatibility scoring based on:
    • Photo analysis
    • Personality questionnaire responses
    • Behavioral patterns
  • Two outcomes:
    • Match Found: AI identifies compatible user
    • No Match Yet: User added to pool, notified when match appears

5. Match Discovery 💌

  • Both parties notified via SMS
  • Secure link to matched user's profile
  • View photos and questionnaire answers
  • Begin conversation

🎮 Game Mechanics & Matching Algorithm

Core Matching Logic

1. Profile Analysis Pipeline

New User Profile → AI Analysis → Compatibility Matrix → Match Search → Notification

2. AI Scoring System

  • Photo Analysis (30% weight)

    • Facial feature compatibility
    • Style and aesthetic preferences
    • Expression and personality indicators
    • Age estimation and preference matching
  • Questionnaire Analysis (60% weight)

    • Values alignment (relationship goals, lifestyle)
    • Personality compatibility (introvert/extrovert, humor style)
    • Interest overlap (hobbies, activities, preferences)
    • Deal-breaker detection (smoking, kids, religion)
  • Behavioral Patterns (10% weight)

    • Response timing and thoughtfulness
    • Profile completion thoroughness
    • Activity patterns

3. Compatibility Threshold

  • Minimum Match Score: 75/100
  • Exceptional Match: 90+ (priority notification)
  • Mutual Compatibility: Both users must score 75+ for each other

Matching Queue Mechanics

1. The Waiting Pool

  • New users enter "analysis phase" (24-48 hours)
  • AI processes profile against entire existing user base
  • Users with incomplete profiles get lower priority

2. Match Processing Schedule

  • Real-time: New user gets matched against existing pool
  • Daily Batch: Re-analyze existing users for new compatibility
  • Weekly Deep Scan: Enhanced AI analysis with updated algorithms

3. Notification Triggers

  • Instant Match: High compatibility score (90+) triggers immediate SMS
  • Standard Match: 75-89 score gets queued for next batch notification
  • No Match: User gets "we're looking" message, added to weekly scans

Questionnaire Design

Core Question Categories

  1. Relationship Intent (Deal-breaker level)

    • "Looking for: Casual coffee chats / Professional networking / Long-term mentorship"
    • "Want children: Yes / No / Maybe / Already have them"
  2. Lifestyle Compatibility (High weight)

    • "Social energy: Love parties / Small groups / Quiet nights"
    • "Adventure level: Spontaneous traveler / Planned explorer / Homebody"
  3. Values & Beliefs (High weight)

    • "Important to you: Family / Career / Personal growth / Fun"
    • "Political views: Very important to align / Somewhat / Not important"
  4. Personal Traits (Medium weight)

    • "Your humor: Witty/sarcastic / Goofy/playful / Dry/observational"
    • "Conflict style: Direct discussion / Need time to process / Avoid confrontation"
  5. Lifestyle Preferences (Medium weight)

    • "Ideal weekend: Outdoor activities / Cultural events / Home projects / Social gatherings"
    • "Exercise routine: Daily gym / Occasional hikes / Sports leagues / Not my thing"

Scoring Algorithm

interface CompatibilityScore {
  dealBreakers: number;      // 0 or 100 (binary)
  valuesAlignment: number;   // 0-100
  personalityFit: number;    // 0-100
  lifestyleMatch: number;    // 0-100
  interestOverlap: number;   // 0-100
  photoCompatibility: number; // 0-100
}

totalScore = (
  dealBreakers * 0.4 +           // If 0, total becomes 0
  valuesAlignment * 0.25 +
  personalityFit * 0.15 +
  lifestyleMatch * 0.10 +
  interestOverlap * 0.05 +
  photoCompatibility * 0.05
)

Notification Mechanics

SMS Notification Flow

  1. Match Found: Both users get simultaneous SMS

  2. Message Content:

    🎉 You have a match! Someone special is waiting.
    View their profile: [secure-link]
    
    - 48-hour expiry on link
    - Anonymous until both view profiles
    
  3. Follow-up Strategy:

    • 6 hours: Gentle reminder if not viewed
    • 24 hours: Final reminder
    • 48 hours: Match expires, back to pool

Privacy & Reveal Mechanics

  • Stage 1: See photo + basic info after clicking SMS link
  • Stage 2: Full questionnaire answers revealed after both users view
  • Stage 3: Contact information revealed after mutual interest indicated

Edge Cases & Rules

Rejection Handling

  • If User A matches User B, but User B doesn't respond in 48h → User A goes back to matching pool
  • No "rejection" feedback to protect feelings
  • Re-matching possible after 30 days

Mutual Matching

  • If both users match each other simultaneously → Both get "Exceptional Match" notification
  • Higher priority, longer expiry (72 hours)

Quality Control

  • Users who don't complete profiles within 7 days → Moved to low-priority pool
  • Users who consistently don't respond to matches → Reduced matching frequency
  • Photo verification through AI to prevent fake profiles

🏗️ Technical Architecture

Frontend Stack

  • React 18 with TypeScript
  • Styled Components for modern UI
  • React Router for navigation
  • Responsive Design (mobile-first)

Backend & Services

  • Supabase - Database, Auth, Storage
  • Twilio - SMS authentication & notifications
  • LLM API - AI matching engine
  • Vercel - Deployment & hosting

Database Schema

-- Users table
users (
  id: uuid primary key,
  phone_number: text unique,
  created_at: timestamp,
  profile_completed: boolean
)

-- Profiles table
profiles (
  id: uuid primary key,
  user_id: uuid references users(id),
  photo_url: text,
  questionnaire_data: jsonb,
  ai_analysis: jsonb,
  created_at: timestamp
)

-- Matches table
matches (
  id: uuid primary key,
  user_1_id: uuid references users(id),
  user_2_id: uuid references users(id),
  compatibility_score: float,
  created_at: timestamp,
  status: text -- 'pending', 'active', 'archived'
)

-- Notifications table
notifications (
  id: uuid primary key,
  user_id: uuid references users(id),
  type: text, -- 'match_found', 'profile_viewed'
  sent_at: timestamp,
  status: text -- 'sent', 'delivered', 'failed'
)

🎨 UI/UX Design Philosophy

  • Clean & Minimal - Focus on content, not clutter
  • Mobile-First - Optimized for phone usage
  • Intuitive Flow - Seamless user experience
  • Modern Aesthetics - Contemporary design language

🔐 Security & Privacy

  • Phone-based Authentication - No passwords to compromise
  • Encrypted Data Storage - All personal data encrypted
  • Privacy Controls - Users control their visibility
  • Secure Image Storage - Photos stored securely in Supabase

📋 Development Phases

Phase 1: Foundation (Week 1-2)

  • Project setup and configuration
  • Supabase integration
  • Phone authentication with Twilio
  • Basic routing structure

Phase 2: Profile System (Week 2-3)

  • Photo upload functionality
  • Questionnaire design and implementation
  • Profile completion flow
  • Data validation and storage

Phase 3: AI Matching Engine (Week 3-4)

  • LLM integration for profile analysis
  • Compatibility scoring algorithm
  • Match generation system
  • Notification system

Phase 4: Match Discovery (Week 4-5)

  • Match viewing interface
  • SMS notification system
  • Profile sharing functionality
  • User interaction tracking

Phase 5: Polish & Deploy (Week 5-6)

  • UI/UX refinements
  • Performance optimization
  • Security audit
  • Production deployment on Vercel

🛠️ Development Setup

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local
# Add your Supabase and Twilio credentials

# Start development server
npm start

# Build for production
npm run build

📱 Deployment Strategy

Recommended: Vercel

  • Zero-config React deployment
  • Automatic HTTPS and CDN
  • Environment variable management
  • Perfect Supabase integration
  • Custom domain support

🔑 Environment Variables Needed

REACT_APP_SUPABASE_URL=your_supabase_url
REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_key
REACT_APP_TWILIO_ACCOUNT_SID=your_twilio_sid
REACT_APP_TWILIO_AUTH_TOKEN=your_twilio_token
REACT_APP_LLM_API_KEY=your_llm_api_key

🎯 Success Metrics

  • User Acquisition: Phone verification completion rate
  • Profile Completion: Photo + questionnaire completion rate
  • Match Quality: User satisfaction with AI matches
  • Engagement: Profile views after match notifications
  • Retention: Return user rate after first match

Built with ❤️ using React, TypeScript, Supabase, and AI

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages