An AI-powered note-taking and study assistant. Create, organize, and enhance your notes with the help of multiple AI models — generate flashcards, practice problems, and quizzes, chat with your documents, and search your knowledge base semantically.
- Rich Text Editor — TipTap-based editor with markdown, math (KaTeX), code highlighting, tables, and media embedding
- AI Chat — Two modes: Agent (delegates to specialized sub-agents for notes, web, and code) and Ask (direct Q&A)
- Study Tools — Auto-generate flashcards, practice problems, and quizzes from your notes
- Source Attachments — Upload and view PDFs, images, DOCX, CSV/Excel, audio, and video with built-in viewers
- RAG & Vector Search — Semantic search over notes and sources using pgvector embeddings
- Multi-Model Support — Use models from OpenAI, Anthropic, Google, xAI, DeepSeek, Qwen, Llama, and more via OpenRouter
- Code Execution — Run code snippets in a sandboxed environment (Vercel Sandbox)
- Projects & Tags — Organize notes into projects for easy navigation
- Responsive UI — Mobile and desktop layouts with resizable panels
| Layer | Technologies |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS 4, Radix UI, TipTap |
| Backend | Next.js API Routes, tRPC 11 |
| Database | PostgreSQL (Supabase) with pgvector, Drizzle ORM |
| AI | Vercel AI SDK |
| Auth | Supabase Auth with Google OAuth |
| Storage | Vercel Blob |
| Analytics | PostHog |
- Node.js 18+
- A Supabase project with the
pgvectorextension enabled - API keys for the AI providers you want to use
git clone https://github.com/manavsiddharthgupta/0notes.git
cd 0notesnpm installCopy the example env file and fill in your own keys:
cp .env.example .env.localSee Environment Variables for details on each variable.
Make sure the pgvector extension is enabled in your Supabase project, then run migrations:
npx drizzle-kit generate
npx drizzle-kit migratenpm run devOpen http://localhost:3000 in your browser.
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string (Supabase) |
BLOB_READ_WRITE_TOKEN |
Vercel Blob storage token |
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anonymous/public key |
NEXT_PUBLIC_GOOGLE_CLIENT_ID |
Google OAuth client ID |
NEXT_PUBLIC_GOOGLE_CLIENT_SECRET |
Google OAuth client secret |
NEXT_PUBLIC_AUTH_APP_URL |
Your app's public URL (e.g. http://localhost:3000) |
OPENROUTER_API_KEY |
OpenRouter API key for multi-model access |
GOOGLE_GENERATIVE_AI_API_KEY |
Google Generative AI (Gemini) API key |
ANANNAS_API_KEY |
Anannas API key (OpenAI-compatible proxy) |
VERCEL_OIDC_TOKEN |
Vercel token for sandboxed code execution (optional) |
app/
(auth)/ # Auth routes (login, callback)
api/ # API endpoints (chat, upload, tRPC)
chat/ # Chat page
notes/ # Note editor/viewer
settings/ # User settings
components/ # React components
lib/
ai/
agents/ # AI agents (main, note, web, code, ask)
tools/ # Agent tools (note ops, source ops, web)
rag/ # Chunking, embedding, vector search
providers.ts # Model provider configs
db/ # Database config & schema
trpc/routers/ # tRPC API routers
auth/ # Auth helpers
hooks/ # Custom React hooks
utils/ # Types, constants, helpers
drizzle/ # Database migrations
extensions/ # TipTap editor extensions
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Production build |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run format |
Format code with Prettier |
The app is designed to deploy on Vercel. Connect your repo and set the environment variables in the Vercel dashboard.
For the database, create a Supabase project and enable the pgvector extension via the SQL editor:
CREATE EXTENSION IF NOT EXISTS vector;Contributions are welcome! Please open an issue or submit a pull request.