LifeTrace Usage Guide
Quick Start
Starting Services
After installation, you can start LifeTrace services in multiple ways:
Start All Services (Recommended):
bash
python start_all_services.pyThis will start:
- Screenshot recorder service
- OCR processor service
- Web API service
- Vector database service
Start Individual Services:
bash
# Start recorder
python -m lifetrace_backend.recorder
# Start processor
python -m lifetrace_backend.processor
# Start OCR service
python -m lifetrace_backend.simple_ocr
# Start web server
python -m lifetrace_backend.server --port 8840The services will:
- Automatically take screenshots at configured intervals
- Perform OCR text recognition on screenshots
- Store data in the vector database
- Provide REST API for search and retrieval
Project Structure
Understanding the project structure helps with customization and development:
LifeTrace_app/
├── lifetrace_backend/ # Core backend modules
│ ├── __init__.py
│ ├── __main__.py
│ ├── server.py # Web API service
│ ├── models.py # Data models
│ ├── config.py # Configuration management
│ ├── storage.py # Storage management
│ ├── simple_ocr.py # OCR processing
│ ├── vector_service.py # Vector service
│ ├── multimodal_*.py # Multimodal services
│ ├── processor.py # File processing
│ ├── recorder.py # Screen recording
│ ├── heartbeat.py # Service heartbeat
│ ├── rag_service.py # RAG service
│ ├── retrieval_service.py # Retrieval service
│ ├── sync_service.py # Sync service
│ ├── utils.py # Utility functions
│ └── templates/ # HTML templates
├── config/ # Configuration files
│ ├── config.yaml
│ └── default_config.yaml
├── doc/ # Documentation
├── front/ # Frontend application
│ ├── components/ # React components
│ ├── services/ # API services
│ ├── public/ # Static assets
│ └── package.json # Frontend dependencies
├── debug/ # Debug and diagnostic tools
├── requirements/ # Dependency files
│ ├── requirements.txt
│ ├── requirements_windows.txt
│ ├── requirements_macos.txt
│ ├── requirements_multimodal.txt
│ ├── requirements_rapidocr.txt
│ └── requirements_vector.txt
├── assets/ # Static assets
├── start_all_services.py # Main service launcher
├── init_database.py # Database initialization
└── init_config.py # Configuration initializationFrontend Usage
Search Interface
LifeTrace provides a web frontend interface accessible via browser:
http://localhost:8840Main features:
🔍 Search Box
- Enter keywords or natural language queries
- Support advanced search syntax
- Real-time search suggestions
📅 Time Filter
- Select date range
- Quick selection (today, yesterday, this week, this month)
- Custom time period
🖼️ Result Display
- Thumbnail preview
- Text content highlighting
- Timestamp display
- Click to enlarge
📊 Statistics Dashboard
- Usage time statistics
- Activity type distribution
- Heatmap display
Configuration Options
Screenshot Settings
Edit config.yaml file:
yaml
screenshot:
# Screenshot interval (seconds)
interval: 60
# Image quality (1-100)
quality: 85
# Enable smart capture (detect screen changes)
smart_capture: true
# Storage path
save_path: ./screenshotsOCR Settings
yaml
ocr:
# OCR engine (rapidocr)
engine: rapidocr
# Language (ch, en, ch_en)
language: ch_en
# Enable text post-processing
post_process: trueSearch Settings
yaml
search:
# Default number of results
default_limit: 10
# Maximum number of results
max_limit: 100
# Similarity threshold (0-1)
similarity_threshold: 0.7Command Line Tool
LifeTrace provides the lifetrace-cli command line tool:
bash
# Search
lifetrace search "Python tutorial"
# View statistics
lifetrace stats
# Export data
lifetrace export --format json --output data.json
# Cleanup data
lifetrace cleanup --before 2025-09-01Best Practices
1. Performance Optimization
- Adjust screenshot interval based on needs
- Regularly cleanup old data
- Use SSD storage for better performance
2. Privacy Protection
- Set blacklist for sensitive apps to avoid capturing private content
- Regularly backup data
- Consider encrypted storage
3. Storage Management
- Regularly check storage space
- Set automatic cleanup policies
- Use data compression
Contributing to LifeTrace
We welcome contributions from the community! Here's how you can get involved:
How to Contribute
- 🍴 Fork the project - Create your own copy of the repository
- 🌿 Create a feature branch -
git checkout -b feature/amazing-feature - 💾 Commit your changes -
git commit -m 'Add some amazing feature' - 📤 Push to the branch -
git push origin feature/amazing-feature - 🔄 Create a Pull Request - Submit your changes for review
Areas to Contribute
- 🐛 Bug Reports - Help us identify and fix issues
- 💡 Feature Requests - Suggest new functionality
- 📝 Documentation - Improve guides and tutorials
- 🧪 Testing - Write tests and improve coverage
- 🎨 UI/UX - Enhance the user interface
- 🔧 Code - Implement new features and improvements
Development Guidelines
- Follow the existing code style
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Keep pull requests focused and small
Next Steps
- Check FAQ for more tips
- Visit GitHub Repository to participate in development
- Join community discussions and feedback
- Explore Use Cases for inspiration