# Naki · נקי

An air-purifier import business run by an agent. A Hebrew storefront with AI-made product pages and a room-size picker, one WhatsApp inbox for my own WhatsApp and the business number, and an agent that classifies every chat, drafts the reply, makes the product pages and reports to the Fedora laptop. Nothing is sent until I press Send.

**Status:** Live · Agents · 2026

- **Local checkout:** `/Users/simon/Developer/naki` (branch `main`, last commit 9afbaaa, 2026-10-31 — System map (Archify) in docs/)
- **Repository:** https://github.com/ShimonNavon/naki
- **On another machine:** `git clone https://github.com/ShimonNavon/naki` — the paths below are Simon's Mac
- **Live:** https://naki.navonsimon.com/
- **Ops (tailnet):** http://ubuntu03:30109/ops
- **Where it runs:** namespace naki · NodePort 30109

## Stack

Node 24 (node:sqlite, ws), Baileys (WhatsApp linked device) + Twilio WhatsApp API, Claude Sonnet 5.5 + Gemini image model via OpenRouter, Hebrew RTL storefront, Hallmark Hedgerow theme, Kubernetes

## Start here

- `catalogue/products.json, catalogue/business.json` — the five purifiers (specs, prices, look for the photos) and business facts to confirm
- `src/agent.mjs` — the agent: classify chats, reply drafts, product pages one per tick, daily digest, Simon's actions
- `src/whatsapp.mjs` — personal WhatsApp (Baileys, business chats only) and the Twilio business number (polled) into one inbox
- `src/generate.mjs, src/llm.mjs` — product copy and photos; every paid call behind a ledger and a monthly cap
- `src/server.mjs, src/pages.mjs, src/mcp.mjs` — storefront, shops-form WebSocket, tailnet-only /ops and /mcp
- `deploy/` — k8s manifest, deploy.sh, edge nginx conf, Cloudflare route script

## Commands

- **Test:** `npm test`
- **Run locally:** `set -a; . ./.env; set +a; DATA_DIR=./data PORT=8790 WHATSAPP_PERSONAL=0 AGENT_LINK_OFF=1 AGENT_TICKS=0 node src/server.mjs`
- **Deploy:** `./deploy/deploy.sh`
- **Deploy + edge conf:** `./deploy/deploy.sh edge`

## Deploy and where it runs

- Namespace naki, NodePort 30109: one pod node:24.22.2-slim, code from ConfigMaps, deps from an initContainer, PVC data (SQLite, photos, WhatsApp session).
- Public https://naki.navonsimon.com/ via ubuntu01 edge nginx (conf.d/naki.conf, storefront only) + Cloudflare tunnel ubuntu01. /ops and /mcp only on the tailnet.

## Current state

Live 2026-10-31. Five product pages made by the agent. Twilio business number polled; Simon still has to scan the QR on /ops to link his own WhatsApp. Prices, delivery, warranty and pre-order text in catalogue/business.json are proposals to confirm. Reports to fedora-simon as naki-agent.

## Watch out

- Never auto-send: messages leave only when Simon presses Send on /ops; the MCP has no send tool.
- Personal WhatsApp keeps text only for business chats (keyword hit or marked); don't widen it.
- The business number is a US Twilio WhatsApp sender (+1 555 325 4381, ONLINE, limit 250 new customers per 24 h). Israeli customers may prefer a local number: after linking, /ops can point the site button to Simon's own WhatsApp.
- Hebrew JSON from the model: use gershayim; copy needs ~5000 max tokens or it is cut off.
- Cloudflare blocks POST on navonsimon.com: the shops form uses the /api/ws WebSocket.

## Secrets — locations only, never print values

- OPENROUTER_API_KEY, TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN in .env (gitignored), applied as Secret naki-env. OpenRouter key shared with imports-crm.

## Tags

Agent, WhatsApp, Claude Sonnet 5.5, Hebrew RTL, Kubernetes

---

Brief generated 2026-11-08 from `~/Developer/my-projects/context/`. Canonical URL: https://projects.navonsimon.com/context/naki.md
