RootFact is a client-side AI Progressive Web App (PWA) that performs real-time vegetable recognition via camera streaming and generates instant contextual health fun facts using local in-browser LLMs—completely private and offline-ready.
- 📷 Real-Time Computer Vision: Uses custom TensorFlow.js models running on WebGPU/WebGL to identify vegetables with real-time FPS counter and confidence scores.
- 💡 On-Device Generative AI: Uses Transformers.js (
Xenova/LaMini-Flan-T5-77Mquantized ONNX) to produce personalized health fun facts with customizable personas (Funny, History, Science) without hitting external paid APIs. - ⚡ Offline-First PWA: Integrated with Workbox Service Worker for precaching app shells and caching AI models locally for instant offline usage.
- 🏛️ Clean MVP Architecture: Built with clear separation of concerns (Models, Views, Presenters) for maintainability and scalability.
- Frontend Core: HTML5, Modern CSS (Glassmorphism Dark Theme), Vanilla JavaScript (ES2022)
- AI & Machine Learning: TensorFlow.js, Hugging Face Transformers.js (ONNX Runtime Web)
- Offline & Bundling: Webpack 5, Workbox (
workbox-webpack-plugin), Service Workers - Deployment: Netlify
- Node.js (v18 or higher)
- npm or yarn
- Clone repository:
git clone https://github.com/suryapamungkas/root-fact-app.git cd root-fact-app - Install dependencies:
npm install
- Run development server:
npm run start-dev
- Build for production:
npm run build
👤 Author Nur Hidayat Surya Pamungkas GitHub: @suryapamungkas