Current Phase: Phase 2 - Local LLama Integration Last Updated: 2024-02-11
src/
├── background/
│ ├── llama-service.ts # Local Llama integration and model management ✅
│ ├── content-analyzer.ts # Content analysis and rating logic ✅
│ └── history-manager.ts # Browser history management
├── content/
│ ├── content-script.ts # Main content script for DOM manipulation ✅
│ ├── post-decorator.ts # Post decoration and UI enhancement ✅
│ └── style-injector.ts # Dynamic styles for UI elements ✅
├── llama-wasm/ # WASM integration for Llama
│ ├── llama.wasm # Compiled WASM binary ✅
│ ├── llama.js # Emscripten generated JS ✅
│ ├── wrapper.js # Custom WASM wrapper ✅
│ ├── llama-wasm.ts # TypeScript implementation ✅
│ └── llama-interface.ts # TypeScript interfaces ✅
├── ui/
│ ├── components/ # Reusable UI components
│ │ ├── PostOverlay.tsx # Post rating and action overlay ✅
│ │ ├── ModelSelector.tsx # Llama model configuration
│ │ └── FilterSettings.tsx # Content filter settings ✅
│ ├── popup/ # Extension popup ✅
│ └── options/ # Advanced settings page ✅
└── utils/
├── model-utils.ts # Llama model utilities ✅
├── storage.ts # Chrome storage management ✅
└── types.ts # TypeScript type definitions ✅
- Repository setup
- Basic extension structure
- TypeScript configuration
- Webpack/build system setup
- Basic Chrome extension manifest
- Llama.cpp WebAssembly integration
- Model loading and management system
- Model configuration UI
- Basic content analysis pipeline
- Performance optimization for local inference
- Post detection for major social platforms
- Content extraction system
- Post decoration framework
- Rating calculation system
- Action button implementation (block/hide)
- Modern, responsive popup design
- Advanced settings page
- Post overlay component
- Custom styling system
- Dark/light theme support
- Platform-specific filters
- Custom keywords and rules
- Model selection interface
- Performance settings
- Filter strength controls
- Performance testing
- Cross-platform compatibility
- Memory usage optimization
- User experience testing
- Security audit
- Optimizing WASM performance
- Implementing model caching
- Fine-tuning content analysis
- Using React with TypeScript for UI components ✅
- Tailwind CSS for styling ✅
- Material-UI for core components ✅
- Local Llama.cpp via WebAssembly ✅
- Support for multiple model sizes ✅
- Configurable inference settings ✅
- Memory-efficient processing (In Progress)
- Chrome Storage Sync for settings ✅
- IndexedDB for model cache (Planned)
- Local Storage for temporary data ✅
- Lazy loading for UI components ✅
- Worker threads for AI processing ✅
- Efficient DOM manipulation ✅
- Caching for processed content (In Progress)
- Implement model caching system
- Optimize WASM performance
- Add progress indicators for model loading
- Implement memory management controls
- WebAssembly performance optimization
- Memory management for local models
- Real-time content processing
- Cross-platform compatibility
- Focus on privacy-first approach ✅
- Ensure smooth user experience
- Maintain flexible architecture for future updates
- Privacy-First Content Filtering: All content analysis happens locally on your device using your chosen Llama model
- Customizable Social Media Experience: Full control over what content you want to see or hide
- Smart Content Rating: Each social media post gets automatically analyzed and rated
- Visual Feedback: Posts get decorated with:
- Content rating indicator
- Quick action buttons (hide/block/allow)
- Hover overlay with detailed information
- Customizable visual markers (highlighting/dimming)
- Simple Installation: Standard Chrome extension installation
- Quick Start:
- Choose your preferred Llama model
- Select basic filtering preferences
- Start browsing with immediate effect
- Advanced Settings: Available but optional for power users
- Automatic Protection: Once set up, works automatically on supported platforms
- Interactive Controls:
- Hover over posts to see ratings and actions
- Quick buttons to adjust filtering on the fly
- Easy temporary bypassing of filters when needed
- Performance:
- Minimal impact on browsing speed
- Background processing won't freeze your browser
- Efficient caching to avoid re-processing
Initial release will support:
- Twitter/X
- Reddit (More platforms planned for future updates)
- No data leaves your device
- No external API calls
- Complete control over AI model selection
- All settings stored locally
- Visual Preferences:
- Dark/light theme
- Custom highlighting colors
- Adjustable overlay opacity
- Filtering Rules:
- Platform-specific settings
- Custom keywords and phrases
- Adjustable sensitivity levels
- AI Model Settings:
- Model selection
- Processing speed vs accuracy balance
- Memory usage controls
- Storage:
- ~2-4GB for AI model (user-selected)
- Minimal for extension data
- Memory:
- ~500MB-1GB during active use
- Configurable based on device capabilities
- Processing:
- Efficient background processing
- Adjustable based on device performance
This extension aims to provide a powerful yet user-friendly way to take control of your social media experience while maintaining complete privacy through local processing.
The rating system provides a 0-100 score for each post, where:
- 0-20: Highly problematic content
- 21-40: Potentially problematic content
- 41-60: Neutral content
- 61-80: Good quality content
- 81-100: High quality content
Each post's final score (0-100) is calculated from these components:
- Writing Quality (0-10)
- Grammar and spelling
- Sentence structure
- Readability
- Information Density (0-10)
- Substance vs. fluff
- Meaningful content
- Source Credibility (0-10)
- Author reputation
- Platform verification
- Originality (0-10)
- Unique perspectives
- Creative expression
- Toxicity Level (0-10)
- Hostility detection
- Aggressive language
- Emotional Manipulation (0-10)
- Clickbait detection
- Sensationalism
- Social Harmony (0-10)
- Divisive content
- Community impact
- Topic Alignment (0-10)
- User interests
- Blocked topics
- Source Preference (0-10)
- Preferred authors
- Trusted sources
- Historical Interaction (0-10)
- Similar content ratings
- Past engagement
- Color Coding:
- 81-100: 🟢 Green
- 61-80: 🟡 Light Green
- 41-60: 🟡 Yellow
- 21-40: 🟠 Orange
- 0-20: 🔴 Red
The rating popup will show:
- Overall score (large number 0-100)
- Color-coded indicator
- One-line summary of rating
- Individual scores for each component
- Key factors affecting the rating
- Suggestions for improvement
- Override rating
- Adjust weight of components
- Report incorrect rating
- Block similar content
- Ratings are cached locally
- User feedback improves future ratings
- Regular model updates based on feedback
- Export/import rating preferences
- Automatic actions based on thresholds:
- < 20: Auto-hide
- 20-40: Dim content
- 40-60: Show normally
-
60: Highlight content
- Custom threshold settings
- Platform-specific adjustments
- Category-based filtering rules