How humensmoc/localmark works
LocalMark is a local-first Chrome web clipper: users annotate selected text or DOM elements, and the extension saves page metadata and annotations for browsing in the side panel or dashboard. The background service coordinates requests, cached library state, and optional directory synchronization; Markdown generation is an opt-in output. The README also documents taxonomy, import/export, and video transcript annotations. Several UI and storage modules are indexed but unsampled, so edges for those capabilities rely on documented README flows rather than claims of inspected implementation.
Main entry points: protocol.ts Message protocol · background.ts Background service · content.tsx Page annotator · VideoTranscript.tsx Transcript interface
Components 24
Web capture
- Page annotator
src/content.tsx - Text anchors
src/anchors.ts - Element tools
src/ElementUI.tsx - Element anchors
src/element-anchors.ts
Extension service
- Message protocol
src/protocol.ts - Background service
src/background.ts - Library model
src/model.ts
Library interfaces
- Library settings
src/settings.tsx - Side panel
src/sidepanel.tsx - Dashboard
src/dashboard.tsx - Library views
src/LibraryViews.tsx - Tag browser
src/TagBrowser.tsx - Taxonomy
src/taxonomy.ts - Taxonomy manager
src/TaxonomyManager.tsx
Local data
- Cached library
src/db.ts - Directory sync
src/sync.ts - File access
src/files.ts - Metadata import/export
src/metadata-export.ts
Video annotations
- Transcript interface
src/VideoTranscript.tsx - Transcript retrieval
src/video-transcript.ts - GDC transcripts
src/gdc-transcript.ts - Video marks
src/video-marks.ts
Other components
- Chrome user
- Web page
Connections 28
- Chrome user → Web page: visits
- Web page → Page annotator: annotates
- Page annotator → Text anchors: locates text
src/content.tsx - Page annotator → Element tools: opens tools
src/content.tsx - Element tools → Element anchors: uses anchors
src/ElementUI.tsx - Page annotator → Message protocol: sends requests
src/content.tsx - Side panel → Message protocol: sends requests
src/sidepanel.tsx - Dashboard → Message protocol: sends requests
src/dashboard.tsx - Library settings → Message protocol: sends requests
src/settings.tsx - Message protocol → Library model: defines data
src/protocol.ts - Background service → Cached library: reads and writes
src/background.ts - Background service → Directory sync: synchronizes
src/background.ts - Directory sync → File access: uses file access
src/sync.ts - Background service → Metadata import/export: imports metadata
src/background.ts - Side panel → Tag browser: shows tag view
src/sidepanel.tsx - Dashboard → Library views: renders views
src/dashboard.tsx - Library views → Tag browser: uses tag browser
src/LibraryViews.tsx - Dashboard → Taxonomy manager: opens manager
src/dashboard.tsx - Taxonomy manager → Taxonomy: uses taxonomy
src/TaxonomyManager.tsx - Chrome user → Side panel: browses library
- Chrome user → Dashboard: manages library
- Chrome user → Library settings: connects folder
- Chrome user → Transcript interface: annotates video
- Transcript interface → Message protocol: loads saved marks
src/VideoTranscript.tsx - Transcript interface → Transcript retrieval: requests subtitles
src/VideoTranscript.tsx - Transcript retrieval → GDC transcripts: requests GDC data
src/video-transcript.ts - Transcript interface → Video marks: uses mark helpers
src/VideoTranscript.tsx - Background service → Transcript retrieval: resolves video target
src/background.ts