mirror of
https://github.com/Zetaphor/browser-recall.git
synced 2025-12-06 02:19:37 +00:00
4.3 KiB
4.3 KiB
Browser Recall
Browser Recall is a browser history and bookmark management system that captures, processes, and stores web page content in a searchable format. It consists of a browser extension and a FastAPI backend server that work together to provide the ability to search your the content of your browsing history and bookmarks.
Features
- 🔍 Full-text search across browsing history and bookmarks
- 📝 Automatic conversion of web pages to markdown format
- 🔄 Real-time page content capture via WebSocket
- ⚡ Optimized SQLite database with FTS5 search
- 🛡️ Configurable domain exclusions
- 📊 Efficient content processing and storage
System Architecture
Backend Components
- FastAPI Server: Main application server handling WebSocket connections and HTTP endpoints
- SQLite Database: Stores history and bookmarks with full-text search capabilities
- Page Reader: Converts HTML content to markdown format
- History Scheduler: Background task for updating browser history
- Configuration System: Manages domain exclusions and reader settings
Browser Extension
- Content Script: Captures page content and sends to backend
- Background Script: Manages WebSocket connection and message handling
- Manifest: Extension configuration and permissions
Setup
Prerequisites
- Python 3.8+
- Firefox Browser (for the extension)
- SQLite3
Installation
- Clone the repository:
git clone <repository-url>
cd browser-recall
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Install the browser extension:
- Open Firefox
- Navigate to
about:debugging - Click "This Firefox"
- Click "Load Temporary Add-on"
- Select the
manifest.jsonfile from theextensiondirectory
Configuration
- Configure domain exclusions in
app/config.yaml:
ignored_domains:
- "localhost"
- "127.0.0.1"
- "*.local"
# Add more patterns as needed
- Configure the server port in
main.py(default: 8523)
Usage
- Start the server:
python main.py
-
The extension will automatically:
- Capture page content as you browse
- Send content to the backend server
- Update history and bookmarks
-
Access the web interface:
- Home page:
http://localhost:8523/ - Search interface:
http://localhost:8523/search - Bookmarks page:
http://localhost:8523/bookmarks
- Home page:
-
Access the API endpoints:
- Search history:
GET /history/search - Search bookmarks:
GET /bookmarks/search - Advanced search:
GET /history/search/advanced - Manage ignored domains:
GET/POST/DELETE /config/ignored-domains
- Search history:
Web Interface
Browser Recall includes a basic web interface for viewing and searching your browsing history and bookmarks:
- Home Page: Displays recent browsing history
- Search Page: Provides a form interface for searching history with filters
- Bookmarks Page: Shows your browser bookmarks
The interface is built with:
- Tailwind CSS for styling
- Responsive design for mobile and desktop
- Dark mode for comfortable viewing
API Documentation
The API documentation is available through FastAPI's interactive interface at http://localhost:8523/docs. This provides a complete API reference with:
- Interactive endpoint testing
- Request/response examples
- Schema documentation
History Endpoints
-
GET /history/search- Query parameters:
domain: Filter by domainstart_date: Filter by start dateend_date: Filter by end datesearch_term: Full-text searchinclude_content: Include markdown content
- Query parameters:
-
GET /history/search/advanced- Advanced full-text search using SQLite FTS5 syntax
Bookmark Endpoints
GET /bookmarks/search- Query parameters:
domain: Filter by domainfolder: Filter by foldersearch_term: Search in titles
- Query parameters:
Configuration Endpoints
GET /config/ignored-domains: List ignored domainsPOST /config/ignored-domains: Add domain patternDELETE /config/ignored-domains/{pattern}: Remove domain pattern
Development
- Logs are stored in the
logsdirectory - Database file:
browser_history.db - WebSocket endpoint:
ws://localhost:8523/ws