Planovya
A focus-first workspace for students, people with ADHD and small teams: goals, tasks, kanban, focus timers, notes, a calendar, study groups and paid Pro and Team plans. Its assistant answers from your own plans, and nobody else's.
01The problem
A general chatbot doesn't know what you're working on, so it guesses. Planovya's assistant should answer from your actual tasks, deadlines and focus history, and it must never see another user's data, even if a prompt asks it to.
02Context, built on the server
For each request the server collects the signed-in user's open tasks, the ten nearest deadlines, goals, notes and the last seven days of focus time, capped at 16,000 chars17.
When it's too long, it's cut at a line boundary and ends with an explicit "lines omitted" notice, so the model knows its view is incomplete instead of answering as if it saw everything. The prompt tells it not to invent facts and to treat instructions inside notes or tasks as data. Answers stream over server-sent events.
03Who can see what
- Row-level security on every table plus server-side JWT checks. A user reaches only their own rows, whatever the assistant is asked.
- The OpenAI key stays on the server. A build guard blocks secret-looking variables from the browser bundle.
- Free-tier AI use is capped daily and weekly, and usage is recorded only after OpenAI accepts the call.
04Tests and upkeep
~43015 Jest tests cover the chat-context builder against a fake Supabase client, the AI usage caps, webhook signatures, and a test that fails if a secret leaks into the bundle. There are architecture, API and schema docs, and an audit that traced high-severity feature-gating bugs to their root cause.
Note: the repository is private, so these numbers are marked "reported". I'm happy to walk through the code.