Plausible plan for Cindy. We’ll fix the details later — this is the shape of it, not the final wiring. The chats + glam % you see now are local-only toys.
Real chats on disk / DB, not the chats[] array in this page. List, open, new, search — all via API.
That 94% number becomes real: glam_events + compliments. +1% per cute chat is a toy — real one scores glam, not count.
One server endpoint that calls the LLM, streams tokens, and keeps the “totally iconic” vapid personality. Browser never holds the API key.
“Tell me I’m cute” becomes POST /api/compliment. Compliments are logged, so Cindy remembers what you liked — not auto-trusted for everything else.
Users, free plan, usage limits. So your Cindy isn’t everyone’s Cindy, and your chats stay yours.
Filter mean corrections, rate-limit, log abuse. Cindy learns from you, not from anyone being mean about your selfie.
/api/*. WebSocket / SSE for streaming replies.GET /api/chats lists, GET /api/chat/:id reads, POST /api/chat creates. Messages append, never overwrite.POST /api/message saves your message, calls Cindy, streams her reply back, saves that too.GET /api/glam returns %. POST /api/glam/event logs what Cindy obsessed over. No more glam = min(99, glam+1) in the browser.POST /api/compliment {chat_id, message_id, compliment} queues it. Approved = glam data.GET /api/models returns Cindy v1.0 / v1.1 / Pro. Switching models switches prompt + caps.| Piece | Files | Plausible effort |
|---|---|---|
| Server + chats API | server.ts, routes/chats.ts | ~2–3 hrs |
| Messages + streaming | routes/messages.ts | ~2–3 hrs |
| Glam + compliments | routes/glam.ts, routes/compliments.ts | ~2–3 hrs |
| Auth + users + caps | auth.ts, db/* | ~3 hrs |
| Wire toy → real | cindy-interface.html only | ~1 hr |
| Total | ~10 files | ~2 weekends |
CREATE TABLE users (id TEXT PRIMARY KEY, email TEXT, plan TEXT, created_at DATETIME); CREATE TABLE chats (id TEXT PRIMARY KEY, owner_id TEXT, title TEXT, model TEXT, created_at DATETIME); CREATE TABLE messages (id INTEGER PRIMARY KEY, chat_id TEXT, role TEXT, content TEXT, created_at DATETIME); CREATE TABLE compliments (id INTEGER PRIMARY KEY, chat_id TEXT, message_id INTEGER, compliment TEXT, status TEXT, created_at DATETIME); CREATE TABLE glam_events (id INTEGER PRIMARY KEY, owner_id TEXT, kind TEXT, delta REAL, created_at DATETIME); CREATE TABLE models (id TEXT PRIMARY KEY, name TEXT, prompt TEXT, cap_per_day INT);
GET /api/chats -> [{id, title, model}]
GET /api/chat/:id -> {chat, messages[]}
POST /api/chat {title, model} -> 201 {id}
POST /api/message {chat_id, text} -> stream (SSE) Cindy reply
POST /api/compliment {chat_id, message_id, compliment} -> 202 queued
GET /api/glam -> {pct, events[]}
GET /api/models -> [{id, name}]
Template only — chats + glam above are still local-only until this is wired.