FlowMind
A visual builder for AI chat assistants - design a flow, ground it in your docs, test it, and publish it
Overview
FlowMind turns building a chat assistant into something you can see and debug instead of a wall of prompt files. You sign in, then either describe an assistant in plain English (Story Builder) or drag nodes onto a React Flow canvas - message, input, choice, condition, RAG query, LLM response - wire them together, and run the whole thing in a Test simulator with a live execution trace. Upload your own .txt/.md/.csv/.html knowledge and it is stored in private Supabase Storage, parsed and chunked on the server, embedded with Gemini (768-dim) into pgvector, and retrieved per-user by cosine search with a BM25-lite fallback. LLM answers follow a strict precedence: your own Gemini key (BYOK, encrypted in an HttpOnly cookie) → a small shared Groq demo allowance → a clearly-labeled deterministic simulation. Every assistant is private to your account via Postgres Row-Level Security. It is an honest early prototype - accounts, the builder, RAG, hosted chat and a /widget.js embed all work today; organizations, PDF/DOCX ingestion, and a versioned publish schema are still on the roadmap. Preview at https://flowmind-nine-tau.vercel.app/
The Problem
Building a useful chat assistant still means stitching together prompt files, a vector store, retrieval glue, and a model API, then losing all visibility into why the assistant said what it said. Non-technical people can't safely shape behavior, and "test it" usually means poking a black box in production.
I wanted a single visual environment where you can design an assistant as a flow, ground it in your own documents, run it in a simulator with a full execution trace, and publish it as a hosted chat page or embeddable widget - all behind a real login, with your data isolated to your account.
The Approach
FlowMind is a full-stack Next.js 15 (App Router, RSC) and React 19 app backed entirely by Supabase. You sign up with an email/password account; protected routes and session auth run through @supabase/ssr, and every assistant, document chunk, and file is isolated per user by Postgres Row-Level Security. There is no separate API service - the backend is Next.js API routes on the Node runtime, same-origin and RLS-guarded.
The builder has three surfaces: a Story Builder that turns a plain-English description into a working flow, a React Flow v12 Canvas of executable nodes (message, input, choice, condition, RAG query, LLM response) that auto-saves, and a Test simulator that runs the whole flow with a live execution trace and variable capture. Shared TypeScript types, node constants, and Zod validators live in a pnpm + Turbo workspace package.
Knowledge grounding is server-side and per-user: upload .txt/.md/.csv/.html, and the file lands in private Supabase Storage, gets parsed and chunked on the server, and is embedded with Gemini gemini-embedding-001 (768-dim) into pgvector. At query time, retrieval runs a cosine match over an HNSW index with a BM25-lite lexical fallback when no key is present, and the retrieval tester shows which path actually ran.
The LLM Response node follows a strict, transparent precedence: a user's own Gemini key (BYOK - validated server-side, encrypted in an auto-expiring HttpOnly cookie, never stored in the browser or database), then a small shared Groq demo allowance (openai/gpt-oss-20b, capped atomically per-user and globally in Postgres), then an opt-in platform Gemini key, and finally a clearly-labeled deterministic simulation. The trace always shows which provider and model answered.
Key Decisions
Real auth and Row-Level Security from the start, not an afterthought. Because every table is RLS-isolated per user, the same queries that power the dashboard are safe multi-user by construction - each account only ever sees its own assistants, chunks, and files.
Bring-your-own-key first, with graceful degradation. FlowMind stays fully usable with zero configuration: without any key it falls back to a deterministic simulation, so the builder and RAG pipeline are demoable offline, and connecting a Gemini key unlocks real generation without changing anything else.
An offline evaluation harness (RAG + workflow metrics) wired into CI, so retrieval and flow-execution changes are measured rather than eyeballed - unusual for an early prototype, and the thing that keeps the honest status honest.
Status
FlowMind is an honest early-stage prototype, not production-ready. Working today: accounts and login, per-user assistant history, the Story → Canvas → Test builder, knowledge upload with pgvector retrieval, real LLM answers via Gemini BYOK or the Groq demo, and a legacy publish path with hosted chat (/chat/[id]) plus a /widget.js embed script.
Still on the roadmap: organizations (multi-member, invites, roles - today each user gets one personal workspace), PDF/DOCX ingestion (.txt/.md/.csv/.html only for now), and a versioned publish schema with a rate-limited public chat endpoint. Live preview: https://flowmind-nine-tau.vercel.app/ · Code: https://github.com/VarshiniAkula/FlowMind