LifeTrace Usage Guide
Quick Start
Starting Services
Start Backend Service
First Time Setup: On first run, if
config.yamldoes not exist, the system will automatically copy it fromdefault_config.yaml. You can customize settings by editinglifetrace/config/config.yaml.
Start the server:
python -m lifetrace.serverCustomize Prompts: To modify AI prompts for different features, edit the YAML files in the
lifetrace/config/prompts/directory.
Start Frontend Service
The frontend is required to use LifeTrace. Start the frontend development server:
cd frontend
pnpm install
pnpm devThe frontend development server will start at http://localhost:3000, and API requests will be automatically proxied to the backend at port 8000.
Start Using
Once both services are running, visit http://localhost:3000 in your browser to start using LifeTrace! 🎉
Project Structure
Understanding the project structure helps with customization and development:
LIfeTrace/
├── 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:3000Main features:
🔍 Search Box
- Enter keywords or natural language queries
- Advanced search syntax support
- 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 the config.yaml file:
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
ocr:
# OCR engine (rapidocr)
engine: rapidocr
# Language (ch, en, ch_en)
language: ch_en
# Enable text post-processing
post_process: trueSearch Settings
search:
# Default number of results
default_limit: 10
# Maximum number of results
max_limit: 100
# Similarity threshold (0-1)
similarity_threshold: 0.7Best 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
- Important: Refer to the guidelines files in the
.github/directory for coding standards and submission processes. - 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