Haven

A college-exclusive dating platform relying on closed-network mechanics and real-time interaction.

Consumer Social · 2024 · Full-Stack Engineer
02

The Problem

Open dating platforms suffer from low trust and poor relevance because the user pool is unbounded and unverified.

Building a hyper-local, high-trust environment required restricting access explicitly to verified university domains and building a matching engine optimized for a constrained, dense network of users.

03

How It Works

Rendering architecture...
04

System Architecture

Rendering architecture...
05

Engineering Problems

University-Only Access Control

Problem

The entire product premise relies on exclusivity. Allowing non-students to register breaks the fundamental trust mechanism of the platform.

Solution

Implemented strict domain whitelisting during authentication. The registration flow intercepts the OAuth payload, verifies the domain suffix against the approved university database, and rejects unauthorized access before a user record is even created.

Real-Time Interaction Synchronization

Problem

When users match, expecting them to refresh the page to see new messages leads to terrible engagement and a broken chat experience.

Solution

Deployed a WebSocket layer for live bidirectional communication. When a message is sent, it optimisticly updates the UI, persists to the database via API, and broadcasts the event to the recipient's socket connection instantly.

08

Results

  • Strict domain boundaries created a verified, high-trust environment.
  • Real-time websocket chat eliminated latency in user conversations.
  • Optimized database queries handle complex mutual-like logic efficiently at scale.
09

Tech Stack

Next.jsPostgreSQLPrismaWebSocketsCloudinary
10

Learnings

Constraint is a feature.

Artificially limiting the userbase to verified domains vastly simplified content moderation and improved matching relevance.

Optimistic UI is mandatory for social.

Users expect chat to be instant. Waiting for database confirmation before rendering a sent message makes the app feel unacceptably sluggish.

Explore the source code.