Four layers: iOS client, services, AI matchmaker, and delivery
Loveline is for people looking for a serious relationship. On top of the usual swipe and chat, it adds verified professional identity, a Family Circle where relatives can endorse a profile, and an AI matchmaker. One codebase serves the iPhone app and the web.
A dating app for people who want something serious
Mainstream swipe apps are optimized for volume. Loveline is built for users who care about who someone is, what they do, and whether their families would get along. That shaped every part of the product.

AI Matchmaker

Verified, active profiles

Family verification
Who it's for
College-educated, working in tech, finance, medicine, or law. Wants a serious partner and doesn't trust unverified profiles.
Wants to help their child find a trustworthy match, and feels left out of modern dating apps.
Bilingual or multicultural, open to cross-cultural relationships, but values shared family norms.
Swipe discovery like Hinge, plus ID, degree, and license verification and family endorsement, which no single competitor combines.
I built it alone, so the architecture had to be simple enough for one person to run, while keeping boundaries clean enough that any one piece (chat, matching, payments) could be scaled or replaced on its own.
One match request, two designs
A user types (illustrative):
“帮我找洛杉矶附近、1.8米以上、阳光、喜欢运动的男生,30岁左右。”
- 01User opens a filter screen with sliders and checkboxes
- 02Has to map “30岁左右” and “1.8米” to exact numbers
- 03No place for “阳光” or “喜欢运动” beyond a tag list
- 04Results come back unranked, sorted by distance
- 01GPT-4o → { location: Los Angeles, max_distance_km: 80, height_min_cm: 180, interests: [sports], personality: [sunny] }
- 02SQL applies hard filters: not yourself, height ≥ 180, location matches
- 03Each candidate scored: interests 40, height 20, location 20, age 20
- 04Top results returned with their score and the parsed criteria
The model never decides who you see. It only turns words into structured criteria; filtering and ranking are plain, testable code.
One React codebase, a native iPhone app
Instead of writing the UI twice, the app is a React single-page app wrapped in a native iOS shell with Capacitor. Native features (Google Sign-In, Apple in-app purchase) come through Capacitor plugins.
vite build → cap sync → XcodeThe same build runs in a browser for development and inside a native iOS container for the App Store, with no separate Swift UI.
Framer Motion drag + springCards follow the finger, tilt, and snap away with physics, which is what makes a swipe app feel native.
1h access token · 90-day refreshEvery API call goes through one fetch wrapper. On 401/403 it refreshes the token once (deduplicated) and retries, so users stay signed in for months.
RevenueCat Capacitor SDKApple subscriptions are bought natively; the backend verifies the entitlement and writes is_premium so every service can trust it.

Sign in

Discovery

Likes

Matches & referrals

Chat

Premium

Profile
Six services, one database, Redis where speed matters
Five NestJS services (auth, user, swipe, match, payment) and one Python AI service sit behind an Nginx gateway. Supabase Postgres is the single source of truth; Redis is only used where it clearly helps, and every Redis path has a Postgres fallback.
async recordLike(me: string, target: string): Promise<{ matched: boolean }> {
await this.db.insert("swipe_events", { user_id: me, target_id: target, action: "like" })
let mutual: boolean
try {
await this.redis.sadd(`user:${target}:liked_by`, me)
await this.redis.expire(`user:${target}:liked_by`, NINETY_DAYS)
mutual = (await this.redis.sismember(`user:${me}:liked_by`, target)) === 1
} catch {
mutual = await this.db.exists("swipe_events", { user_id: target, target_id: me, action: "like" })
}
if (mutual) await this.db.insert("matches", { user_a_id: me, user_b_id: target, is_mutual: true })
return { matched: mutual }
}Let the model read, let code decide
The AI service has one narrow job for the model: read a messy, bilingual request and return structured criteria. Everything after that is deterministic, so a match score can always be explained and tested.
response_format: json_object · temperature 0GPT-4o returns a fixed schema (height, age, location, distance, interests, personality), validated with Pydantic before use.
1.8米 → 180 · 洛杉矶附近 → LA, 80 kmUnits, city names, and interests are converted to English keywords, so Chinese and English requests hit the same data.
height ≥ min · location ILIKENon-negotiable criteria are applied in the database query, so a candidate who doesn't qualify is never ranked.
interests 40 · height 20 · location 20 · age 20Each factor gives full, partial, or no credit (for example, a few centimeters short still earns some points). No preference stated means full marks.
WEIGHT_HEIGHT, WEIGHT_INTERESTS, WEIGHT_LOCATION, WEIGHT_AGE = 20, 40, 20, 20
async def recommend(query: str, user_id: str, limit: int = 5) -> RecommendResponse:
criteria = await parse_preferences(query) # GPT-4o -> ParsedCriteria (Pydantic)
rows = profiles_query(criteria, exclude=user_id) # hard filters in SQL
scored = sorted(
((score_height(r, criteria) + score_interests(r, criteria)
+ score_location(r, criteria) + score_age(r, criteria), r) for r in rows),
key=lambda pair: pair[0], reverse=True,
)
return RecommendResponse(
parsed_criteria=criteria, # shown back to the user
candidates=[to_candidate(r, s) for s, r in scored[:limit]],
total_found=len(rows),
)Send every profile to the LLM and ask it who is the best match.
The model only parses the request. Ranking is code: cheap, fast, and the same input always gives the same result.
“阳光、喜欢运动” matches nothing because profiles are tagged in English.
The parser maps Chinese terms to a shared English vocabulary before any lookup.
A user asks why someone was recommended, and there's no answer.
Every score is a sum of four named parts, and the parsed criteria are returned with the results.
From commit to a running backend and an iPhone build
One production bug worth noting: services crashed at startup on Render because the Supabase realtime client needed a WebSocket implementation that Node 20 didn't provide. Moving the images to Node 22 fixed it without adding a polyfill.
Decisions I made, and what they cost
Rejected: a separate Swift app. Best native feel, but two UIs to build and maintain alone.
Chosen: one React codebase in a native shell. Some animation tuning needed, but web and iOS ship together.
Rejected: a single backend that does everything. Simple at first, but chat, payments, and AI scale differently.
Chosen: small services sharing one Postgres. More deployment config, clear boundaries.
Rejected: keep likes only in Redis. Fast, but a flush would lose matches.
Chosen: Postgres stores every swipe; Redis only speeds up the check, with a fallback.
Rejected (for now): let GPT-4o rank candidates. Richer, but slow, costly, and hard to explain.
Chosen: GPT-4o for parsing, rules for ranking. The next step adds semantic matching on top, not instead.
What's built, and what's next
- 01A complete iOS dating app built by one person: swipe discovery, real-time chat, verification, Family Circle, and premium subscriptions.
- 02Six backend services on one Postgres database, with Redis used only where it adds speed and always backed by a fallback. Match detection completes in under 150 ms end to end.
- 03An AI matchmaker that understands requests in English and Chinese and returns ranked, explainable matches.
- 04Next: two-way intent matching. Each user writes what they're looking for; GPT-4o turns it into an intent profile stored as an embedding in pgvector, and a pair is scored in both directions (does B fit A, and does A fit B), so one-sided matches rank lower.
- 05Then: a short, cached explanation for each match (“you both value family involvement and outdoor weekends”), shown on the profile.
Building an AI product from zero to App Store?
I can take it end to end: product, UI, backend, AI, and the release pipeline, or join your team for the hardest part.
Talk through your product