惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
L
LangChain Blog
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
P
Proofpoint News Feed
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
I
InfoQ
月光博客
月光博客
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
D
Docker
B
Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Built a Serverless Stranger-Matching Tool with Zero Dat...
Wen Durai · 2026-06-26 · via DEV Community

Wen Durai

The elevator pitch

You open fata.uk, write a few lines about what is on your mind, and AI finds a stranger whose emotional frequency matches yours. Then it gives you each other’s email and exits. No app. No signup. No database. No chat history.

The architecture (or: how to build a social product with no server)

The entire backend is a single Cloudflare Worker. State lives in GitHub Issues. Here is the flow:

Browser (signal heuristic, ms-level)
  → HMAC-signed POST → Cloudflare Worker
    → BGE-M3 embedding API (1024-dim)
    → AES-256-GCM encrypt → GitHub Issues (encrypted pool)
    → Multi-channel scoring → MMR diversity rerank
    → Match found? → Internal LLM resonance → Resend email

Layer 1: Browser-side signal density

Before any API call, the browser computes four heuristics on the user’s text: length, lexical diversity, sentence count, and concrete detail markers. Score < 0.3? Gentle nudge to write more. Score < 0.15 on the server side? Rejected. This filters out noise before it hits the pool.

Layer 2: Proof-of-Work gate

Every submission requires solving a SHA-256 PoW challenge (difficulty 16 — ~1-2s on mobile). The solution is verified server-side, and a short-lived submit token (30 min TTL) is issued. Combined with per-IP and per-email rate limits, this makes automated abuse economically unattractive.

Layer 3: Embedding with fallback chain

The Worker calls SiliconFlow’s BGE-M3 embedding API (1024-dim). If that fails, it falls back to the browser-provided TF-IDF embedding. If both fail, server-side TF-IDF is computed. The original text is discarded after embedding — the vector cannot be reversed back to words.

Layer 4: GitHub Issues as an encrypted matching pool

This is the part I find most fun. Sensitive data (email, embedding, text snippet) is AES-256-GCM encrypted and stored in Cloudflare KV. Only metadata (language, embedding type, key version) goes into the GitHub Issue body. The pool is public but every entry is ciphertext.

Layer 5: Multi-channel matching + MMR rerank

The matching engine scores candidates across four channels:

  • Semantic similarity (cosine similarity on embeddings, weight 0.30)
  • Intent compatibility (LLM-parsed emotional need, weight 0.40)
  • Style compatibility (responsive vs. expressive, weight 0.15)
  • Signal bounce (signal density product, weight 0.15)

Top candidates are reranked with MMR (Maximum Marginal Relevance) to ensure diversity in the matched pool.

Layer 6: AI writes the introduction, then disappears

When a match is found, an internal LLM call generates a short resonance paragraph and three icebreaker questions. Both users receive each other’s email via Resend. After that, fata is out of the picture — all further communication happens in the user’s own email client.

The security story

  • Key separation: HMAC_KEY (API signing, frontend-visible) ≠ ENCRYPTION_KEY (data at rest, Worker secret only)
  • Rate limiting: Two-layer (in-memory + KV), fail-closed. If KV is unreachable, requests are rejected — not passed through.
  • PoW + email cap: 3 submissions per email per day + 500 global daily cap
  • 2026-06-20 incident: A public /api/hmac-key endpoint was discovered and abused for LLM proxy spam (3.49 billion tokens in one day). Fixed within hours. All public LLM endpoints deleted. Postmortem in the repo.

Why email instead of in-app chat?

Every "anonymous chat" product eventually faces the same trust problem: users have to believe the platform when it says it does not read their messages. fata solves this by making it architecturally impossible to read messages — because the messages are not in fata. They are in your Gmail.

Stack

Static HTML page (single file)
  → Cloudflare Worker (fata.uk/api/*)
  → GitHub Issues (encrypted pool)
  → Cloudflare KV (sensitive data, 30-day TTL)
  → SiliconFlow BGE-M3 (embedding)
  → SiliconFlow DeepSeek V3 (resonance LLM)
  → Resend (email)

Try it

fata.uk — open in any browser.

Source: github.com/gsailing19/fata (MIT)


If you have built something with "impossible" architecture — zero servers, zero databases, or a constraint that shaped the product in unexpected ways — I would love to hear about it in the comments.