Turn PDF highlights into study questions inside Notion β powered by local AI
LearnBetter is an open-source Windows desktop app that turns PDF highlights into study questions inside Notion.
- Features
- How It Works
- Download
- Requirements
- Quick Start
- Set Up Ollama
- Set Up Notion
- Using LearnBetter
- Offline And Retry Behavior
- Removing Captures
- Development From Source
- Project Structure
- Tech Stack
- Website
- CI/CD
- Privacy And Security
- Contributing
- Community
- Changelog
- Official Setup References
- License
Open a PDF, select important text, right-click, and LearnBetter creates a Notion toggle with:
- one grounded study question
- one AI-generated answer based only on the selected text
- the exact copied PDF text
- the book title and page number
Question generation runs locally with Ollama, so the app does not require an OpenAI API key or a hosted LLM subscription.
PDF reader, Notion study app, PDF highlights to Notion, local AI study questions, Ollama desktop app, local LLM, Notion toggle questions, AI flashcards, Electron PDF reader, PDF.js highlighter, Windows study app, open-source learning tool.
- Open PDFs in a minimalist Windows desktop reader.
- Select text normally with the left mouse button.
- Right-click selected text to capture it.
- Generate a study question and AI answer with a local model served by Ollama.
- Append each capture to one Notion page as a toggle block.
- Preserve the copied answer text exactly as selected from the PDF.
- Keep multi-line highlights together as one capture.
- Reload saved highlights when the same PDF is opened again.
- Match PDFs by fingerprint and content signature, not just filename.
- Restore highlights when a PDF is re-saved without meaningful text changes.
- Prevent duplicate captures while a sync is pending.
- Queue failed Notion sync and delete operations for retry.
- Support Notion internal integration tokens and Notion OAuth.
- Build a Windows installer with GitHub Actions.
PDF selection β right-click capture β Ollama question/answer β Notion toggle
Notion output:
> AI-generated study question
AI answer
Concise answer generated from the selected text.
Copied text
Exact highlighted PDF text.
Source: Book title, page number
The copied text is never paraphrased, summarized, corrected, or rewritten.
πΉ Demo video coming soon β contributions welcome!
The Windows installer is published through GitHub Releases.
- Open LearnBetter Releases.
- Download the latest Windows installer
.exe. - Run the installer.
- Start LearnBetter from the Start menu or desktop shortcut.
If you are testing a pre-release build, choose the latest release marked as a pre-release.
- Windows 10 or Windows 11
- A Notion account
- A Notion page where LearnBetter can append toggles
- Ollama installed and running locally
- One local model, such as
gemma4:e4b, pulled with Ollama
For development from source, you also need:
- Node.js 22 or later
- npm
- Git
- Install Ollama.
- Pull a local model with Ollama.
- Create a Notion page for your study questions.
- Share that page with your Notion integration.
- Open LearnBetter.
- Paste your Notion page link and Ollama settings.
- Open a PDF.
- Select text with the left mouse button.
- Right-click the selected text to capture it.
- Open Notion and check the new toggle.
LearnBetter uses Ollama to generate questions and AI answers locally on your computer.
- Download Ollama from the official Windows page: ollama.com/download/windows.
- Run the installer.
- After installation, Ollama should run in the background.
Open PowerShell and run:
ollama --versionYou can also check which models are installed:
ollama listIf Ollama is running, its local API is usually available at:
http://localhost:11434
LearnBetter defaults to gemma4:e4b.
Pull it with:
ollama pull gemma4:e4bThis download can take time because the model is large.
Run:
ollama run gemma4:e4bThen type:
Write one study question about operating systems.
To exit the chat, type:
/bye
In LearnBetter, use:
AI provider: Ollama local
Local model URL: http://localhost:11434
Local model: gemma4:e4b
Click Save Setup, then click Check.
If LearnBetter says local AI is not running:
- Start Ollama from the Start menu.
- Run
ollama --versionin PowerShell. - Keep the Ollama app running, then click
RetryorCheckin LearnBetter.
If LearnBetter says the model is missing:
ollama pull gemma4:e4bIf generation is slow:
- The first request after startup can be slower.
- Local generation speed depends on CPU, GPU, RAM, and model size.
- You can use a smaller Ollama model and update the local model name in LearnBetter.
LearnBetter needs permission to append blocks to one destination Notion page.
The easiest personal setup is a Notion internal integration token. OAuth is also supported for a more public-app style flow.
Use this option if you are setting up LearnBetter for yourself.
- Open the Notion integrations page: notion.so/my-integrations.
- Create a new internal integration.
- Give it a clear name, such as
LearnBetter. - Copy the internal integration token.
- In Notion, create a normal page where you want study questions to appear.
- Open that page.
- Click the
...menu in the top-right corner. - Choose
Add connections. - Search for your
LearnBetterintegration. - Add it to the page and confirm access.
- Copy the Notion page URL from your browser or Notion app.
- Open LearnBetter.
- Choose
Internal token. - Paste the Notion token.
- Paste the Notion page URL or page ID.
- Click
Save Setup. - Click
Check.
If the page is not shared with the integration, Notion will reject the request even if your token is correct.
Use this option if you want to test a public integration flow.
- Create or open a Notion public integration.
- Add this redirect URI:
http://127.0.0.1:45891/notion/callback
- Copy the OAuth client ID and client secret.
- In LearnBetter, choose
OAuth. - Paste the client ID and client secret.
- Paste the destination Notion page URL or page ID.
- Click
Connect Notion. - Approve the Notion connection in the browser.
- Return to LearnBetter and click
Check.
OAuth connects your workspace, but LearnBetter still needs the destination page URL or page ID so it knows where to append toggles.
You can paste the full Notion page URL into LearnBetter. The app will extract the page ID automatically.
A Notion page ID is a 32-character identifier at the end of a Notion page URL. LearnBetter accepts either:
https://www.notion.so/workspace/My-Study-Page-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
or:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
If LearnBetter says the page is inaccessible:
- Open the destination page in Notion.
- Click
.... - Click
Add connections. - Add your LearnBetter integration.
- Click
Checkagain in LearnBetter.
If LearnBetter says the page URL is invalid:
- Paste the full Notion page URL again.
- Or paste only the 32-character page ID.
- Make sure you are using a page, not a database view URL.
If OAuth is connected but the page is missing:
- Paste the destination page URL or page ID in LearnBetter.
- Save setup again.
- Start Ollama.
- Start LearnBetter.
- Confirm Notion and local AI both show as connected.
- Click
Open PDF. - Select text with the left mouse button.
- Right-click the selected text.
- Wait for the capture status to finish generating and syncing.
- Open your Notion page.
- Expand the new toggle to see the AI answer and exact copied text.
Keyboard shortcuts:
Esc: clear the current PDF text selection.Ctrl+Z: clear the current PDF text selection.Ctrl+F: search inside the PDF.Ctrl++: zoom in.Ctrl+-: zoom out.Ctrl+0: reset zoom.
LearnBetter separates local question generation from Notion sync.
- If Ollama is running but the internet is offline, LearnBetter can still generate the question and AI answer locally.
- If Notion sync fails, the capture stays in the retry queue.
- Click
Retryafter reconnecting. - Duplicate captures are blocked while the same highlight is already pending.
- Repeated failures are capped so the queue does not grow forever.
When you remove a capture, LearnBetter removes the local highlight and tries to delete the related Notion toggle.
If Notion delete fails:
- the local highlight is removed
- the Notion cleanup stays in the retry queue
- LearnBetter shows that Notion cleanup is pending
Click Retry after fixing the Notion connection.
Clone and run:
git clone https://github.com/tusharkrbarman/learnbetter.git
cd learnbetter
npm install
npm startUseful scripts:
npm run check
npm run icons
npm run dist:winScript details:
npm run check: validates required project files.npm run icons: regenerates app icon assets.npm run dist:win: builds a Windows NSIS installer indist/.
Syntax checks:
node --check src/main/main.js
node --check src/main/preload.js
node --check src/renderer/renderer.mjssrc/main/ Electron main process, Notion API, Ollama API, local store
src/renderer/ PDF reader UI, PDF.js viewer, highlight capture
assets/ App icons and visual assets
site/ Static download website
deploy/ Kubernetes and Argo CD examples
.github/ CI, installer build, release, Pages, Dependabot
- Electron
- PDF.js
- Notion API
- Ollama API
- electron-store
- electron-builder
- GitHub Actions
- GitHub Pages
- Kubernetes manifests
- Argo CD application manifest
- Dependabot
The site/ folder contains a minimalist static website for LearnBetter.
Preview locally:
cd site
python -m http.server 8080Then open:
http://localhost:8080
The simple production path deploys site/ to GitHub Pages through .github/workflows/pages.yml.
This repository includes:
CI: project checks, syntax checks, and high-severity npm audit.Build Windows Installer: Windows.exeinstaller build.Release Installer: uploads the installer to a GitHub Release when a version tag is pushed.Deploy Website: publishes the static website to GitHub Pages.Dependabot: checks npm dependencies and GitHub Actions updates.
Create a release build:
git tag v0.1.0
git push origin v0.1.0- LearnBetter does not need an OpenAI key.
- Highlight text is sent to your local Ollama server for question and answer generation.
- Notion receives the generated question, generated answer, exact copied text, and source metadata.
- Notion tokens and setup data are stored locally with Electron Store under the app name
learnbetter. - Do not commit Notion tokens, OAuth secrets,
.envfiles, certificates, or keys.
The repository ignores dependency folders, build outputs, local cache files, .env, .env.*, certificate files, and key files.
LearnBetter is open source under the MIT License.
Issues, feature requests, and pull requests are welcome! Good contribution areas include:
- Notion onboarding UX
- PDF highlighting edge cases
- Local model prompt quality
- Installer and release polish
- Accessibility
- Test coverage
- Documentation screenshots and demo videos
npm install
npm run check
node --check src/main/main.js
node --check src/main/preload.js
node --check src/renderer/renderer.mjsPlease read our Contributing Guidelines for more details on our code of conduct, pull request process, and development workflow.
- π¬ GitHub Discussions - Ask questions, share ideas
- π Issue Tracker - Report bugs, request features
- π§ Email - Direct contact
See Releases for version history and release notes.
Screenshots and demo videos coming soon. Contributions welcome!
LearnBetter is released under the MIT License.