MNEMO is an AI-powered second brain that lets you save anything you've read or learned, automatically connects ideas across everything you've saved, visualizes your knowledge as an interactive graph, and quizzes you using spaced repetition so you never forget.
- Framework: Next.js 14 with App Router
- Styling: Tailwind CSS + shadcn/ui
- Database + Auth: Supabase (Postgres + Auth + pgvector extension)
- AI: Anthropic API (Claude Sonnet 4.6)
- Embeddings: Voyage AI (
voyage-3model) - Knowledge Graph:
react-force-graph-2d - Spaced Repetition: SM-2 algorithm
npm installCopy .env.example to .env.local and fill in your credentials:
cp .env.example .env.localRequired variables:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
ANTHROPIC_API_KEY=your_anthropic_api_key
Note: If you are using a separate Voyage AI API key, set
VOYAGE_API_KEY. Otherwise, the app will fall back toANTHROPIC_API_KEY.
- Create a new Supabase project.
- Enable the
vectorextension in the database (SQL Editor → New query →create extension if not exists vector;). - Run the full schema from
schema.sqlin the Supabase SQL Editor. - Copy your project URL and anon key into
.env.local. - Copy the service role key into
.env.local(used for admin tasks only).
npm run devOpen http://localhost:3000 in your browser.
- Capture: Paste any content and MNEMO extracts 5-8 core ideas, generates quiz questions, and saves an embedding for semantic search.
- Connections: Automatically finds related memories using pgvector and explains the connection with Claude.
- Knowledge Graph: Interactive 2D force-directed graph of all your memories and connections.
- Quiz Mode: Daily spaced-repetition review using the SM-2 algorithm.
- Ask Your Brain: RAG chat that answers questions only from your saved knowledge.
/app
/auth # Login + signup pages
/dashboard # Main dashboard with stats and recent memories
/capture # Add new memory
/graph # Knowledge graph visualization
/quiz # Daily quiz
/chat # RAG chat
/api # API routes (capture, quiz, chat)
/components
/ui # shadcn/ui components
Navbar.tsx
MemoryCard.tsx
ConnectionCard.tsx
KnowledgeGraph.tsx
QuizCard.tsx
ChatInterface.tsx
/lib
supabase.ts # Browser Supabase client
supabase-server.ts # Server Supabase client
anthropic.ts # Anthropic client
prompts.ts # AI prompts
embeddings.ts # Embedding generation + similarity search
sm2.ts # Spaced repetition algorithm
connections.ts # Connection finding logic
schema.sql # Supabase database schema
- Push your code to a GitHub repository.
- Import the project in Vercel.
- Add the environment variables from
.env.localin the Vercel dashboard (Project Settings → Environment Variables). - Deploy.
Vercel will automatically build and deploy the Next.js app.
- The embedding vector dimension is 1024 (
voyage-3). Make sure thememories.embeddingcolumn and thematch_memoriesfunction use the same dimension. - All database queries use Row Level Security (RLS) and are scoped to the authenticated user.
- The app uses the
@supabase/ssrpackage for secure server-side and client-side auth.