The open-source NotebookLM alternative
Upload sources, chat with your documents, generate insights. Local document storage; cloud AI through Anthropic. Provider usage limits and charges apply.
| NoteGenius | NotebookLM | |
|---|---|---|
| Self-hostable | ✅ | ❌ |
| Open source | ✅ | ❌ |
| Source limits | ✅ Unlimited | ❌ 50 |
| Citation popovers | ✅ Shows exact passage on click | |
| Notes panel | ✅ Markdown, pinnable, auto-save | |
| Generation types | ✅ 7 types | |
| Data ownership | ✅ Local SQLite, your machine | ❌ Google cloud |
| Dark mode | ✅ Built-in | ❌ |
| Cost | ✅ Pay-per-token (Claude API) | ❌ Google account |
Upload PDFs, paste plain text, add web article URLs, or drop in a YouTube link — transcripts are fetched automatically. All content is chunked and indexed in SQLite FTS5 for fast retrieval.
Ask anything about your documents. Every answer cites its sources with [1] markers. Click any citation to see the exact passage from the original document in a popover — not just the source name.
| Type | Description |
|---|---|
| Summary | Executive summary across all sources |
| FAQ | 8–12 likely reader questions with answers |
| Study Guide | Key concepts, definitions & practice questions |
| Timeline | Chronological event extraction |
| Key Topics | Top themes with supporting evidence |
| Concept Map | Hierarchical idea relationships |
| Podcast Script | Two-host dialogue (Host A / Host B) |
All generations stream in real-time and are saved to your notebook.
Write Markdown notes alongside your research. Auto-saves as you type, supports pinning, and keeps everything per-notebook.
flowchart TD
subgraph Sources["📂 Source Ingestion"]
PDF["PDF\n(pdf-parse)"]
URL["Web URL\n(cheerio + axios)"]
YT["YouTube\n(transcript API)"]
TXT["Plain Text"]
end
subgraph Processing["⚙️ Processing Pipeline"]
Chunker["Sliding-window\nChunker\n1200 chars / 200 overlap"]
SQLite[("SQLite\n+ FTS5 Index")]
end
subgraph Retrieval["🔍 Retrieval"]
FTS["BM25 Full-text\nSearch (FTS5)"]
TopK["Top-K Chunks\n(default: 8)"]
end
subgraph AI["🤖 Claude AI"]
Chat["Streaming Chat\nclaude-sonnet-4-6"]
Generate["Generation\n7 types"]
Citations["Citation\nExtraction"]
end
subgraph UI["🖥️ Next.js Frontend"]
Sources2["Sources\nPanel"]
ChatUI["Chat\nPanel"]
GenerateUI["Generate\nPanel"]
Notes["Notes\nPanel"]
end
PDF & URL & YT & TXT --> Chunker
Chunker --> SQLite
SQLite --> FTS
FTS --> TopK
TopK --> Chat
TopK --> Generate
Chat --> Citations
Citations --> ChatUI
Generate --> GenerateUI
Sources2 --> SQLite
Notes --> SQLite
sequenceDiagram
actor User
participant UI as Browser
participant API as Next.js API
participant DB as SQLite
participant Claude as Claude API
User->>UI: Upload PDF / paste URL
UI->>API: POST /api/sources (SSE)
API->>DB: Create source row
API-->>UI: SSE: status=processing
API->>DB: Insert chunks + FTS index
API-->>UI: SSE: status=ready
UI->>UI: Show ✅ in Sources panel
User->>UI: Ask a question
UI->>API: POST /api/chat (SSE)
API->>DB: FTS5 BM25 search → top-K chunks
API->>Claude: Stream with source context
Claude-->>API: Stream tokens + [1][2] citations
API-->>UI: SSE: text chunks
UI->>UI: Render message + citation popovers
Frontend Backend AI Data
───────── ──────── ── ────
Next.js 16 Next.js API Claude SQLite
TypeScript Routes Sonnet 4.6 better-sqlite3
Tailwind v4 SSE streaming @anthropic-ai FTS5 BM25
Radix UI better-sqlite3 /sdk Sliding-window
Sonner toasts pdf-parse chunking
next-themes cheerio
youtube-transcript
- Node.js 18+
- A Claude API key → console.anthropic.com
git clone https://github.com/ArttuAn/notegenius
cd notegenius
npm installcp .env.example .env.localEdit .env.local:
CLAUDE_API_KEY=sk-ant-your-key-herenpm run devOpen http://localhost:3000. The SQLite database is created automatically at ./data/notegenius.db on first run.
notegenius/
├── app/
│ ├── api/
│ │ ├── chat/ # Streaming Q&A + session management
│ │ ├── generate/ # 7-type AI generation (SSE)
│ │ ├── notebooks/ # CRUD for notebooks
│ │ ├── notes/ # CRUD for notes
│ │ ├── settings/ # App settings
│ │ └── sources/ # Source ingestion (SSE)
│ ├── notebook/[id]/ # Workspace page
│ └── notebooks/ # Dashboard page
│
├── lib/
│ ├── ai/
│ │ ├── chat.ts # FTS5 retrieval → Claude streaming + citation parsing
│ │ ├── generate.ts # 7 generation types → Claude streaming
│ │ └── prompts.ts # All system prompts
│ ├── db/
│ │ ├── schema.ts # SQLite schema + TypeScript types
│ │ ├── migrate.ts # Idempotent migrations
│ │ └── queries/ # Typed query helpers per entity
│ └── ingestion/
│ ├── chunker.ts # Sliding-window text chunker
│ ├── pdf.ts # pdf-parse v2 extraction
│ ├── url.ts # cheerio web scraper
│ └── youtube.ts # Transcript fetcher
│
└── components/
├── notebook/
│ ├── ChatPanel.tsx # Streaming chat + citation chips
│ ├── SourcesPanel.tsx # Source list + upload dialog
│ ├── GeneratePanel.tsx # Generation type selector + results
│ └── NotesPanel.tsx # Auto-saving markdown notes
└── ui/ # Radix UI primitives
| Variable | Required | Default | Description |
|---|---|---|---|
CLAUDE_API_KEY |
✅ | — | Anthropic API key |
DATABASE_URL |
❌ | ./data/notegenius.db |
SQLite file path |
MIT — use it, fork it, ship it.
Built with Claude Code · Powered by Anthropic Claude
Set NOTEGENIUS_PASSWORD to a unique random value of at least 32 characters
before starting. The browser prompts for username admin (override with
NOTEGENIUS_USERNAME) and that password. All pages and API handlers require
the same owner credentials. This is a single-owner app: everyone given those
credentials has access to the same notebooks. It does not support separate
user accounts or tenant isolation. Missing credentials fail closed.
Loopback origins are allowed by default. For a deliberate remote deployment,
set NOTEGENIUS_ORIGIN to the exact public origin, without a trailing slash,
and use HTTPS. Other hosts and browser origins are rejected. URL imports allow
only public HTTP(S) targets on standard ports, validate every redirect, pin the
verified DNS result to the connection, and cap response size and duration.
Documents are stored in local SQLite. Chat and generation send selected source excerpts, prompts, and conversation context to Anthropic. URL/YouTube import also contacts external source providers. Do not use confidential data unless you are comfortable with those transfers and the provider's data policy. Provider spending caps are a separate deployment control. Development and tests now require Node 22.12 or newer.
0 comments
log in to comment.