LectureSnap is a production-ready Chrome extension scaffold for YouTube lecture annotation, screenshot capture, OCR, and notebook export.
- Chrome Extension Manifest V3
- Content script injection on YouTube lecture pages
- Background service worker for storage, OCR, and command orchestration
- Side panel React app for notebook review
- React + TypeScript
- TailwindCSS + Framer Motion
- IndexedDB via
idb - Tesseract.js for OCR
- Vite for build tooling
/extensionproject
/public
manifest.json
/icons
icon-16.svg
icon-48.svg
icon-128.svg
/src
/background
serviceWorker.ts
/content
index.ts
keyboard.ts
screenshot.ts
timeline.ts
ui.ts
/sidepanel
index.html
main.tsx
App.tsx
/components
(optional future shared components)
/hooks
useNotebookData.ts
useDebouncedValue.ts
/storage
db.ts
repository.ts
/export
exporters.ts
/styles
tailwind.css
/utils
constants.ts
format.ts
id.ts
types.ts
index.html
package.json
tsconfig.json
vite.config.ts
tailwind.config.js
VideoRecordid,url,title,duration,createdAt,lastUpdatedAt
HighlightRecordid,videoId,videoUrl,videoTitle,timestamp,note,createdAt,updatedAt
ScreenshotRecordid,videoId,videoUrl,videoTitle,timestamp,imageData,note?,ocrText,source,createdAt
SettingRecordid,value
videosstore- keyPath:
id - index:
url
- keyPath:
notesstore- keyPath:
id - indexes:
videoId,createdAt
- keyPath:
screenshotsstore- keyPath:
id - indexes:
videoId,createdAt,ocrText
- keyPath:
settingsstore- keyPath:
id
- keyPath:
- Search across notes, timestamps, and OCR text
- Filters for Notes, Screenshots, Auto Captures
- Sorting by Newest, Oldest, Timeline Order
- Export actions for PDF, HTML, Markdown, JSON
- Injects timeline markers above YouTube seek bar
- Adds an auto-capture toggle button into YouTube controls
- Supports keyboard-first workflow:
H: quick highlightHold H: highlight with noteP: quick screenshotHold P: screenshot with noteCtrl+Shift+S: open notebook side panelCtrl+Shift+A: toggle auto capture
- Every screenshot is sent to background service worker
- Tesseract.js extracts visible text
- OCR text is stored with screenshot data
- Search includes OCR content
cd /Users/iamsparsh00321/Desktop/extensionproject
npm install
npm run build- Open
chrome://extensions - Enable Developer mode
- Click Load unpacked
- Choose the
distfolder
npm run dev— start Vite dev servernpm run build— build extension outputnpm run typecheck— run TypeScript checks
- Add rich note editor and markdown support
- Build OCR text selector/highlight preview
- Enable cloud sync and authentication
- Add flashcard generation and AI summarization
- Add Notion/Obsidian export connectors
- Add full chapter detection and lecture outline extraction
- Storage is intentionally IndexedDB-based for performance and scale
- The architecture is modular for future extension of AI features, sync, plugin export, and mobile companion experiences
- The current build target is optimized for polished UI and maintainability