Replace public RAG chat with a private networking-recall system - #38
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- /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>
…caping or encoding' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thechat_embeddingstable (dropped by the new setup script). Kept & repurposedlib/ai/embeddings.ts, rate limiting, auth/middleware. TheknowledgeBaseCMS model is left intact (only its RAG indexing removed).Added:
contacts+contact_embeddingstables (scripts/setup-contacts-db.ts),lib/db/contacts.ts, contact Zod schemas.portfolioProjectContentful model + seed (lib/contentful/setup-portfolio.ts), fetch layer,/portfolio+/portfolio/[slug]; nav repointed;/projects→ 301.capture-form+/api/capture(Zod, rate-limit, honeypot) returning a pre-filledwa.melink.lib/workflows/enrich-contact.ts), wired fordev_fusion/linkedin-profile-scraper;withWorkflowinnext.config; hourly cron fallback./api/mcp/[transport]) exposingsearch_contactsviawithMcpAuth; Eve agent scaffold ineve/.New env (all optional in
env.ts)OWNER_WHATSAPP,APIFY_TOKEN,APIFY_ACTOR_ID,AI_GATEWAY_API_KEY,CRON_SECRET,MCP_BEARER_TOKEN.Verified
/portfoliolists all 7; detail pages render project + capture form;/projects→ 308tsc --noEmitclean, ESLint 0 errorsTOO_COMPLEX_QUERYin the list query (split light vs. full field sets)Still to do before go-live
APIFY_ACTOR_ID=dev_fusion/linkedin-profile-scraperandOWNER_WHATSAPP(Prod/Preview);APIFY_TOKEN+AI_GATEWAY_API_KEYalready seteve/README.md)🤖 Generated with Claude Code