AdvisorOS is an AI-powered client management platform built for financial advisors. Instead of a traditional CRM, it treats every client as a repository — giving advisors a GitHub-style interface to manage client files, documents, and AI-generated memory, with a RAG-powered chat assistant to surface insights from years of client history.
Built for ImagineHack 2026.
Every client is a repository. Their history, documents, and AI-generated memory live here — organised, searchable, and always up to date.
- Client folders live in a Supabase Storage bucket (
Advisor_OS) as virtual path prefixes - Each folder can contain any file type: PDFs, Word docs, spreadsheets, Markdown notes
- Special files (
MEMORY.md,CLAUDE.md) serve as AI context that persists across sessions - A RAG pipeline (Gemini embeddings + cosine similarity vector search) lets advisors ask natural-language questions about any client — even when the exact words don't appear in the notes
| Route | Description |
|---|---|
/ |
Home — team/project repository browser |
/dashboard |
AdvisorOS Dashboard — client repos, activity feed, today's schedule |
/advisor-os |
VS Code-style file manager backed by Supabase Storage |
/chatbot |
AI chat assistant (RAG + Gemini 2.0 Flash) |
/client/[id] |
Individual client profile with info, partners, and document tabs |
GitHub-style 3-panel layout:
- Left — Searchable client repo list; switches to file tree when a repo is open
- Center — Copilot-style input, activity feed showing recent client updates; switches to tabbed file workspace when in a repo
- Right — Today's schedule with meeting type badges (Zoom / In-person / Teams); switches to activity log when in a repo
VS Code-inspired file browser:
- Browse all client folders and root vault files from Supabase Storage
- Create / rename / delete folders and files at every level including bucket root
- Upload PDFs, Word docs, Excel, Markdown, images, and audio
- Drag-and-drop upload anywhere in the workspace
- Tabbed file viewer (Markdown rendered, plain text / binary preview)
- Inline editor with Ctrl+S save
- Activity log seeded from file timestamps
- RAG pipeline: embeds the advisor's question → semantic search against client memories → grounds the Gemini reply in retrieved chunks
- Per-client mode (scope to one client) or cross-client mode (finds relevant clients automatically)
- Accepts uploaded proposals/documents as additional context
- Quick-action prompts: risk profile analysis, retirement timeline review, tax strategy, policy verification
- Session-based conversation history
- Client info, risk profile, goals, and behaviour tags
- Partner ecosystem tab (tax consultants, mortgage specialists, etc.)
- Document / photo management tabs
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (Pages Router) |
| UI | React 19, Tailwind CSS v4, styled-jsx, lucide-react |
| Storage | Supabase Storage (bucket: Advisor_OS) |
| AI — Chat | Google Gemini 2.0 Flash (gemini-2.0-flash) |
| AI — Embeddings | Google Gemini Embedding 001 (gemini-embedding-001, 768-dim) |
| Vector Store | File-backed JSON (data/vectors.json), swappable to Supabase pgvector |
| Document Parsing | Custom docParser.js (PDF, Word, plain text) |
| Method | Route | Purpose |
|---|---|---|
POST |
/api/chat/message |
RAG-powered chat — embed question → retrieve memories → generate reply |
GET/POST |
/api/chat/session |
Create or fetch a conversation session |
GET/POST |
/api/clients |
List or create client records |
GET/PUT/DELETE |
/api/clients/[id] |
Single client CRUD |
POST |
/api/memory/ingest |
Parse a document and write embeddings to the vector store |
POST |
/api/memory/search |
Semantic search across stored memories |
POST |
/api/upload/document |
Upload a document and trigger ingestion |
GET |
/api/seed |
Seed the vector store with synthetic client memories |
npm installCopy the example file and fill in your credentials:
cp .env.local.example .env.local# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
# Google Gemini
GEMINI_API_KEY=your-gemini-api-keycurl -X GET http://localhost:3000/api/seedThis writes embeddings for 6 synthetic Malaysian financial advisory clients into data/vectors.json.
npm run devOpen http://localhost:3000 to see the app.
src/
├── pages/
│ ├── index.js # Home — team repo browser
│ ├── dashboard.js # AdvisorOS Dashboard (main entry point)
│ ├── advisor-os.jsx # VS Code-style file manager
│ ├── chatbot.js # RAG chat assistant
│ ├── client/[id].js # Individual client profile
│ └── api/
│ ├── chat/
│ │ ├── message.js # RAG chat endpoint
│ │ └── session.js # Session management
│ ├── clients/
│ │ ├── index.js # List / create clients
│ │ └── [id].js # Single client CRUD
│ ├── memory/
│ │ ├── ingest.js # Ingest document into vector store
│ │ └── search.js # Semantic memory search
│ ├── upload/
│ │ └── document.js # Upload + parse document
│ └── seed/index.js # Seed synthetic data
├── components/
│ ├── TopNav.js # Top navigation bar
│ ├── Layout.js # Page layout wrapper
│ ├── ActivityPanel.js # Activity log sidebar
│ ├── RepositoryTree.js # VS Code-style file tree
│ ├── FileViewer.jsx # File preview (Markdown + plain text)
│ ├── FileEditor.jsx # Inline text editor
│ └── ui/
│ ├── ClientCard.js # Client card component
│ └── glowing-ai-chat-assistant.jsx
├── lib/
│ ├── gemini.js # Gemini API wrapper (embeddings + chat)
│ ├── ragPipeline.js # Full RAG flow
│ ├── vectorStore.js # File-backed cosine similarity vector store
│ ├── docParser.js # PDF / Word / text document parser
│ ├── chunker.js # Text chunking for ingestion
│ ├── sessionStore.js # In-memory conversation session store
│ └── mockData.js # Synthetic client data (6 Malaysian clients)
└── styles/
└── globals.css # Global styles + AdvisorOS component styles
data/
└── vectors.json # Persisted vector embeddings (auto-created)
Advisor question
│
▼
Gemini Embedding ← text-embedding-001, 768-dim
│
▼
Cosine Similarity Search ← against data/vectors.json
│ (or Supabase pgvector if VECTOR_STORE_MODE=supabase)
▼
Top-K Memory Chunks ← per-client or cross-client
│
▼
Context-Rich Prompt ← memories + conversation history
│
▼
Gemini 2.0 Flash ← grounded reply + source citations
The vector store is intentionally swappable. Set VECTOR_STORE_MODE=supabase in .env.local and supply SUPABASE_SERVICE_ROLE_KEY to route all vector operations to a Supabase pgvector table.
- Create a bucket named
Advisor_OSin your Supabase project - Create client folders by uploading a
.gitkeepfile atClientName/.gitkeep, or use the in-app "New Folder" button - Set bucket policies to allow authenticated reads, or make it public for development
The file manager supports full CRUD at every level:
- Create / delete folders at bucket root or nested inside client folders
- Create / edit / delete files with the inline editor or by uploading
- All operations use the Supabase Storage JS client (
@supabase/supabase-js)