A Chrome Extension (Manifest V3) built with React + TypeScript that tracks browsing time and captures user highlights using the Chrome Extensions API.
A productivity tool for personal knowledge management and memory capture.
This project demonstrates:
- Manifest V3 architecture and best practices
- Background service workers for efficient resource usage
- Content scripts for user interaction capture
- chrome.storage.local for persistent local storage
- React-based popup UI with TypeScript
- Type-safe state management
- Track Time Spent - Monitor browsing time per page
- Capture Highlights - Save selected text via context menu
- Local Storage - Persistent storage, no backend required
- Search Functionality - Quickly find saved entries
- Toggle Tracking - Enable/disable tracking on demand
- Clear Memory - Manage stored data easily
| Technology | Version | Purpose |
|---|---|---|
| React | ^19.2.0 | UI Framework |
| TypeScript | ^5.9.3 | Type Safety |
| Vite | 7.2.5 | Build Tool |
| Chrome API | Manifest V3 | Extension API |
| ESLint | ^9.39.1 | Code Quality |
src/
βββ background.ts β Handles tab events + time tracking
βββ content.ts β Captures selected text
βββ popup/ β React-based UI components
βββ storage.ts β Storage abstraction layer
βββ types/ β TypeScript type definitions
- Node.js 20+
- Chrome/Chromium browser
- npm or yarn
-
Clone the repository
git clone https://github.com/eswar06/chrome-memory-tracker.git cd chrome-memory-tracker -
Install dependencies
npm install
-
Build the extension
npm run build
-
Load in Chrome
- Open Chrome and navigate to
chrome://extensions - Enable "Developer Mode" (toggle in top right)
- Click "Load unpacked"
- Select the
dist/folder from this project
- Open Chrome and navigate to
-
Start development (optional)
npm run dev
- The extension automatically tracks time on each tab
- Click the extension icon to see time spent per page
- Use the toggle to pause/resume tracking
- Select any text on a webpage
- Right-click and choose "Save to Memory"
- View saved highlights in the extension popup
- Search through saved entries
- Delete individual entries
- Clear all data with one click
npm run dev # Start Vite dev server
npm run build # Build for production
npm run lint # Run ESLint
npm run preview # Preview production buildThis project uses ESLint to maintain code quality. Run linting before committing:
npm run lint- Managing state between popup, background, and content scripts
- Handling Chrome lifecycle events (tab creation, updates, closure)
- Preventing popup resize collapse issues
- Structuring scalable extension architecture
- Efficient data persistence with chrome.storage.local
- β All data is stored locally on your machine
- β No data is sent to external servers
- β No telemetry or analytics
- β No ads or tracking
- See SECURITY.md for more details
This extension requests:
- tabs - To track active tab and browsing time
- scripting - To inject content scripts for text capture
- storage - To persist user data locally
No sensitive permissions beyond what's necessary for core functionality.
- IndexedDB support for larger datasets
- Smarter highlight anchoring and context
- Unit and integration tests
- Export functionality (JSON/CSV)
- Dark mode support
- Keyboard shortcuts
- Cloud sync option (optional)
- Data visualization and statistics
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
- Setting up development environment
- Making changes
- Submitting pull requests
- Reporting bugs and requesting features
- Ensure you loaded it from the
dist/folder, notsrc/ - Try refreshing the extension on
chrome://extensions
- Run
npm run buildto rebuild - Refresh the extension
- Check that you have enough disk space
- Ensure the extension is not using incognito mode
- Restart Chrome
- Reload the extension from
chrome://extensions
- Chrome Extension Documentation
- Manifest V3 Migration Guide
- React Documentation
- TypeScript Documentation
This project is licensed under the MIT License - see LICENSE for details.
eswar06
- GitHub: @eswar06
Built with:
- Vite - Lightning fast build tool
- React - UI library
- TypeScript - Type safety
- Chrome Extensions API - Extension platform
If you find this project useful, consider giving it a β