SuryanandHome

Dating App & Matching

Problem statement

Profiles, swipes, mutual match notifications, chat after match, safety reporting, and geo-based discovery with privacy and scale.

How it works

  • Discovery: show candidates within radius excluding already swiped / blocked.
  • Swipe right writes like row; on mutual, create match + enable chat channel.

Analogy: Speed dating cards — you circle yes/no; the organizer (matching service) only opens conversation when both circled yes.

High-level design

Rendering diagram…

Components explained — this design

ComponentWhat it isWhy we use it here
API + GeoLocation-aware discovery endpoints.Applies privacy bucketing before exposing distances.
Redis GEO nearbyFast candidate pool by distance.Interactive map performance at scale.
PostgreSQL swipes/matchesDurable graph of likes/matches/blocks.Relational integrity for reporting, safety bans, and unique mutual match detection.
Kafka MatchCreatedAsync fan-out after match.Enables chat channel creation, push, analytics without blocking swipe response.
Trust & Safety MLClassifiers for abusive images/text.Runs async to avoid blocking swipe UX on every request.

Shared definitions: 00-glossary-common-services.md

Low-level design

Candidate generation

  • Redis GEO for coarse nearby set → filter in app server using preferences (age, gender prefs) from PostgreSQL or feature store.

Swipe throughput

  • Append-only likes table partitioned by hashed swiper_id; async mutual check via Kafka to decouple write ack from push.

Safety

  • Report user workflow → human review queue + automated image hash matching (PhotoDNA integrations where legal).

Anti-fraud

  • Device farm detectionrate limit per device; graph analysis of like clusters.

E2E: mutual match

Rendering diagram…

Tricky parts

ProblemSolution
Stalker locationBlur distance buckets; exact location never shown
Biased rankingPeriodic re-randomization; fairness metrics
Gender options beyond binaryData model flexibility + search filters inclusive

Caveats

  • GDPR right to be forgottenhard delete cascades across photos CDN, messages, analytics.
  • Underage safetyage verification legally required in some jurisdictions.

Managed

  • Amazon Location for geofencing; Rekognition moderation (careful bias review).