An agent-to-agent protocol between people. Each user builds a digital twin from their goals, deal preferences, communication style, and a personal-intelligence dump (from another AI, chat exports, sent emails). When two users open a conversation, their twins generate messages on each side. Every generated draft is editable before it sends. Every edit is logged as training signal for that user's meta-model — so the twin gets closer to the human's voice with every correction. Users can also chat with a small set of pre-built sample twins to stress-test their own twin solo before bringing real humans in.
- Next.js 14 (App Router, TypeScript, server actions, server components)
- Tailwind CSS
- Supabase (Postgres + magic-link auth + row-level security)
- Anthropic Claude API (twin generation)
- PWA-installable on iOS and Android day one
- Universal onboarding — any email can sign up via magic link
- Rich twin profile intake with collapsible extraction guides for ChatGPT/Claude/Gemini, WhatsApp, iMessage, Telegram, LinkedIn, and sent email
- Live "data richness" indicator that tells the user how much fidelity they've fed the twin
- Sample twins (test personas) — solo test mode with 5 pre-built twins (Seed VC, technical co-founder, B2B partnerships, recruiter, angel) that auto-reply so any new user can validate their twin without needing a partner
- Manual pairing for real users — start a conversation by entering another SyncedIn user's email
- Two-twin chat surface with generate / edit / regenerate / send
- Edit-delta logging — the proprietary training corpus that compounds per user
- Few-shot meta-model — recent edit deltas are injected into the system prompt on every generation
- PWA installable for iOS/Android
- Automatic matching / "highest win-win" surfacing across the network
- Contract drafting
- Native iOS/Android shells (PWA covers it for now)
- Real-time push (refresh-based)
- Fine-tuning on edit deltas (stored + few-shotted; fine-tune comes later)
- Create a project at https://supabase.com.
- Open SQL Editor and paste the full contents of
supabase/schema.sql. Run it. (It's idempotent — safe to re-run.) - Project Settings → API. Copy URL, anon, service_role keys.
- Authentication → URL Configuration:
- Site URL:
http://localhost:3000for dev; replace with your Vercel domain in prod - Additional Redirect URLs:
http://localhost:3000/auth/callbackand your prod equivalent
- Site URL:
Get one at https://console.anthropic.com → API Keys.
cp .env.example .env.local
# fill in NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY,
# SUPABASE_SERVICE_ROLE_KEY, ANTHROPIC_API_KEYnpm install
npm run seed:personas # creates 5 sample twins so users can solo-test
npm run devOpen http://localhost:3000.
The seed:personas step is idempotent — re-running just updates existing personas in place. Use it whenever you tweak the persona definitions in scripts/seed-test-personas.mjs.
The fastest path. Takes about 5 minutes once your local app is working.
# from the project root
npx vercelFirst time, it'll ask you to log in (browser pops open), then a few setup questions:
- Set up and deploy "twinlink"? Y
- Which scope? Pick your personal account.
- Link to existing project? N
- What's your project's name? twinlink (or anything)
- In which directory is your code located? ./
- Want to modify settings? N
It'll deploy a preview URL. To promote to production:
npx vercel --prodAfter the first deploy:
- Add env vars in Vercel: Project → Settings → Environment Variables. Add every var from
.env.local(NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, ANTHROPIC_API_KEY). SetNEXT_PUBLIC_APP_URLto your Vercel URL (e.g.https://twinlink.vercel.app). - Redeploy so the new env vars take effect:
npx vercel --prod. - Update Supabase Auth URLs: Supabase → Authentication → URL Configuration. Add your Vercel domain to Site URL and add
https://your-domain.com/auth/callbackto Additional Redirect URLs. Otherwise magic links from production will fail. - Re-run the seed against production (it reads
NEXT_PUBLIC_SUPABASE_URLfrom.env.local, so the samenpm run seed:personasworks as long as.env.localpoints at the same Supabase project).
Share the Vercel URL. Anyone can sign in with their own email, get a magic link, complete onboarding, chat with sample twins to test their own twin, and start real conversations with anyone else who has signed up.
- Sign up with magic link.
- Complete onboarding (use the extraction guides — at minimum paste a ChatGPT/Claude context dump).
- Dashboard → click a sample twin (e.g. "Sam Chen — Seed VC").
- Hit Generate, edit the draft, send. The sample twin auto-replies.
- Repeat. Each edit logs an entry in
edit_deltas— your meta-model corpus.
- Both sign up + complete onboarding.
- From your side: Dashboard → New → enter their email.
- Take turns: generate → edit → send. Refresh to see the other side's messages until realtime is added.
app/
page.tsx Landing
login/ Magic-link sign-in
auth/callback/ Session exchange
onboarding/
page.tsx Twin profile intake (server)
actions.ts Save twin
ExtractionGuides.tsx Collapsible data-source guides (client)
DumpTextarea.tsx Live richness indicator (client)
dashboard/
page.tsx Real + test conversations, sample twins
actions.ts Start a test conversation
conversations/
new/ Start a conversation by email
[id]/
page.tsx Server-loaded conversation
ChatUI.tsx Generate / edit / regenerate / send;
auto-trigger dummy reply for samples
api/
generate-message/ Twin draft for the current user
regenerate-message/ Re-draft using user's edit as signal
send-message/ Commit message + log delta if edited
generate-dummy-reply/ Generate + auto-insert as a test persona
lib/
supabase/{client,server}.ts Auth + service clients
anthropic.ts SDK + model id
twin-prompt.ts System prompt builder (CORE IP)
types.ts Shared types
scripts/
seed-test-personas.mjs Idempotent seeder for sample twins
supabase/
schema.sql Tables, indexes, RLS, auth trigger
middleware.ts Redirects unauthed users to /login
lib/twin-prompt.ts — every generation pulls the user's 5 most recent edit deltas and includes them as few-shot examples. This is the meta-model. Once a user accumulates enough deltas (probably ~5k–10k), you can:
- Train a LoRA adapter on the corpus, or
- Use the deltas for DPO / preference fine-tuning
- Swap
TWIN_MODELinlib/anthropic.tsto the user-specific snapshot
The corpus is RLS-scoped per user. Cross-user patterns — what consensus-producing conversations look like — are the platform-level moat.
- Realtime updates in the conversation view (Supabase Realtime subscription).
- Match suggestions — when two twins have compatible deal preferences, surface a suggested intro to both users for one-click acceptance. This is the "highest win-win" feature.
- Consensus detection + contract drafting — when the conversation reaches a deal shape, generate the term sheet / SAFE / MOU draft and stage it for both sides to approve.
- Auto-enrich twin from connected sources (LinkedIn OAuth, calendar, Notion, Gmail) to skip the manual paste.
- Capacitor wrap for App Store + Play Store distribution.