This is the active Talk With Jamie application. I built it as a privacy-conscious retrieval and access-control experiment: public chat can use approved general information, while any deeper context stays server-side for the authenticated owner workspace. It is clearly labelled as AI and is not intended to impersonate the human Jamie.
This folder is a complete Netlify deployment. It adds private context retrieval while keeping raw personal exports and private source files out of the website and out of GitHub.
- Ranked context retrieval for every public chat and admin draft
- A built-in public-safe persona covering projects, interests, preferences, goals and style
- Persistent visitor facts that are fed back into later replies
- Multiple persistent chats per account, with create, switch and delete controls
- Direct OpenAI Responses API support with a configurable model
- A local context builder that joins both sides of social conversations while keeping raw exports local
- Cross-platform contact summaries for relevant owner-only retrieval
- Verified owner facts and recency-aware handling for changing views
- Redaction and exclusion rules for credentials, financial identifiers and high-risk content
- Deployment-only context maintenance; the live admin interface cannot replace or delete the pack
- Private context storage in Netlify Blobs
- Public/admin context separation
- Context-extraction and suspicious-output blocking
- Five-minute server-side context caching
- Legacy login, conversation and admin-thread migration
- Automated tests for context validation, ranking and privacy boundaries
Context helps it choose wording and relevant background; it must not claim to be the human Jamie, expose source material or make private information available through public chat.
The source exports are intentionally outside this folder and ignored by Git.
Place the extracted source text in ../.private-context-source/, then run:
npm ci
npm run context:buildThe builder expects:
JAMIE_DIGITAL_TWIN_MASTER_EVERYTHING_v3_PHONE_OPENABLE.txtassistant_conversation_export_v1.md- the supplied
WhatsApp Chat with ...txtfiles context-config.json- contact names, aliases, relationship descriptions, verified facts and retrieval keywords (copytools/context-config.example.jsonand fill it in)
Person-specific data lives only in that untracked config and in the generated pack, so real contact names never appear in this repository.
It writes:
../.private-context/talk-with-jamie-v2.context-pack.json
The generated pack is not committed. It is reviewed and uploaded through the private
maintenance workflow to the talk-with-jamie-context Blob store. Import and clear routes exist
for that workflow, but they reject requests unless ALLOW_CONTEXT_ADMIN_MUTATION=1; the live
admin interface does not expose them.
Required:
SESSION_SECRET- random value of at least 32 charactersADMIN_SETUP_TOKEN- one-time setup value of at least 20 characters
Configure one model provider:
- Recommended:
OPENAI_API_KEY, with optionalOPENAI_MODEL(defaults togpt-5.4-mini) - OpenAI-compatible:
AI_API_URL,AI_API_KEY,AI_MODEL - Cohere:
COHERE_API_KEY,COHERE_MODEL
Private maintenance scripts may also need:
TALK_BLOBS_SITE_IDTALK_BLOBS_TOKEN
No AI key, Netlify token or context data belongs in source code.
The production site is connected to the main branch of
JamieP-205/talk-with-jamie. Netlify uses v2 as the base directory, runs
npm run build, publishes the base directory, and deploys the functions in
v2/netlify/functions.
Normal changes follow this process:
- run
npm ciandnpm testinv2 - commit and push the change to GitHub
- use the Netlify deploy preview for pull requests or non-production branches
- merge or push to
mainonly after authentication, storage and API checks pass
Manual CLI production deploys are reserved for recovery or a controlled migration.
app.js- public chat, multi-chat controls, admin drafting and conversation managementnetlify/functions/_context.js- pack validation, audience filtering and rankingnetlify/functions/_lib.js- API route coordination, Blobs access and migrationnetlify/functions/_http.jsand_security.js- request validation, cookie parsing and password primitivesnetlify/functions/_memory.js,_provider.jsand_prompts.js- visitor memory, provider adapters and persona policytools/build-private-context.js- local private-pack buildertest/- authentication, context, privacy and deployment tests
Private source material is local-only and is never a deployable asset. The builder creates a compact redacted pack for controlled owner retrieval rather than publishing original archives. Review the generated pack before maintenance upload.