Skip to content

Replace public RAG chat with a private networking-recall system - #38

Merged
kayoslab merged 4 commits into
mainfrom
feat/networking-recall-system
Jul 9, 2026
Merged

Replace public RAG chat with a private networking-recall system#38
kayoslab merged 4 commits into
mainfrom
feat/networking-recall-system

Conversation

@kayoslab

@kayoslab kayoslab commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Rebuilds the site's AI feature as a personal contact-memory / networking-recall system (per the Ethically Ambiguous Networking guide), built entirely on Vercel/Next.js native primitives — no Make/n8n/Zapier. Removes the old public RAG chat in the same pass.

What it does

Tap NFC card → portfolio page → capture form → WhatsApp handoff → durable enrichment (Apify) → embed into a private vector store → query privately via a Vercel Eve agent.

Changes

Removed (public RAG chat): /chat, /api/chat, /api/ai/* reindex routes, RAG retrieval + blog/knowledge indexers, and the chat_embeddings table (dropped by the new setup script). Kept & repurposed lib/ai/embeddings.ts, rate limiting, auth/middleware. The knowledgeBase CMS model is left intact (only its RAG indexing removed).

Added:

  • Contacts store (Neon pgvector): contacts + contact_embeddings tables (scripts/setup-contacts-db.ts), lib/db/contacts.ts, contact Zod schemas.
  • Portfolio: new portfolioProject Contentful model + seed (lib/contentful/setup-portfolio.ts), fetch layer, /portfolio + /portfolio/[slug]; nav repointed; /projects → 301.
  • Public capture: capture-form + /api/capture (Zod, rate-limit, honeypot) returning a pre-filled wa.me link.
  • Durable enrichment (Vercel Workflow): Apify start/poll → embed → store (lib/workflows/enrich-contact.ts), wired for dev_fusion/linkedin-profile-scraper; withWorkflow in next.config; hourly cron fallback.
  • Owner-only MCP server (/api/mcp/[transport]) exposing search_contacts via withMcpAuth; Eve agent scaffold in eve/.

New env (all optional in env.ts)

OWNER_WHATSAPP, APIFY_TOKEN, APIFY_ACTOR_ID, AI_GATEWAY_API_KEY, CRON_SECRET, MCP_BEARER_TOKEN.

Verified

  • ✅ Neon schema migrated; Contentful model + 7 projects seeded
  • /portfolio lists all 7; detail pages render project + capture form; /projects → 308
  • ✅ Workflow compiler picks up the enrichment workflow on boot
  • tsc --noEmit clean, ESLint 0 errors
  • Caught & fixed a TOO_COMPLEX_QUERY in the list query (split light vs. full field sets)

Still to do before go-live

  • Set APIFY_ACTOR_ID=dev_fusion/linkedin-profile-scraper and OWNER_WHATSAPP (Prod/Preview); APIFY_TOKEN + AI_GATEWAY_API_KEY already set
  • Test one capture → enrich on this Preview deploy
  • Deploy the Eve agent (eve/README.md)

🤖 Generated with Claude Code

kayoslab and others added 2 commits July 9, 2026 09:49
Rebuilds the site's AI feature as a personal "contact memory" (per the
Ethically Ambiguous Networking guide), entirely on Vercel/Next.js native
primitives — no Make/n8n/Zapier.

Removed:
- Public /chat UI, /api/chat, /api/ai/* reindex routes, RAG retrieval and
  blog/knowledge indexers, and the chat_embeddings table (dropped by the new
  setup script). Kept and repurposed lib/ai/embeddings.ts, rate limiting, and
  the auth/middleware helpers. The knowledgeBase CMS model is left intact
  (only its RAG indexing is removed).

Added:
- Contacts store on Neon pgvector: contacts + contact_embeddings tables
  (scripts/setup-contacts-db.ts), lib/db/contacts.ts, contact Zod schemas.
- Portfolio: new portfolioProject Contentful model + seed
  (lib/contentful/setup-portfolio.ts), fetch layer, /portfolio and
  /portfolio/[slug] pages; nav repointed; /projects -> 301.
- Public capture flow: capture-form + /api/capture (Zod, rate limit, honeypot)
  returning a pre-filled wa.me link.
- Durable enrichment via Vercel Workflow (WDK): Apify start/poll -> embed ->
  store (lib/workflows/enrich-contact.ts); withWorkflow in next.config; hourly
  cron fallback.
- Owner-only MCP server (/api/mcp/[transport]) exposing search_contacts via
  withMcpAuth; Eve agent scaffold in eve/ (connection + prompt + setup docs).

New optional env: OWNER_WHATSAPP, APIFY_TOKEN, APIFY_ACTOR_ID, CRON_SECRET,
MCP_BEARER_TOKEN.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Normalize the actor id so both username/actorName and username~actorName forms
work, and document that the URL-only actor can't enrich the company anchor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cr0ss.org Ready Ready Preview, Comment Jul 9, 2026 9:00am

Request Review

- /portfolio: campaign-gated capture box first (only with ?campaign-id=),
  then a "Who am I?" intro (repurposed from the retired About page), then
  the projects list.
- Capture: thread campaign-id through the form → /api/capture → contacts
  (new campaign_id column, idempotent migration) and into the enrichment
  text blob / profile metAt, so recall knows where a contact was met.
- Project detail: optional hero image, full rich-text description, optional
  GitHub link (new githubUrl field, idempotently added to the Contentful
  model). Capture box removed from detail pages.
- Remove the About page everywhere: nav (desktop+mobile), footer (and fix
  stale /projects → /portfolio), blog byline, dashboard sidebar, and the
  footer test. The Contentful "about" entry is unpublished separately.

All 636 tests pass; tsc + eslint clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread lib/contentful/api/portfolio.ts Fixed
…caping or encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@kayoslab
kayoslab merged commit f4ea633 into main Jul 9, 2026
7 checks passed
@kayoslab
kayoslab deleted the feat/networking-recall-system branch July 9, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants