How sahilbakoru/on-device-ai-doc-analyser works
Project type and purpose
• This is a single-page Chrome extension that performs offline analysis of CSV files. It reads uploaded CSVs, processes them through Chrome’s built-in Gemini Nano model and optional external Translate API, then renders summaries, insights, and graphs in a side panel.
File structure
• Top level:
• manifest.json → Chrome extension manifest
• background.js → background/service worker script
• rollup.config.mjs → build configuration (bundler)
• package.json / lock → dependencies and scripts
• images/ → UI assets
• Chrome_Extension_Project_Overview.md / README.md / License
• sidepanel/:
• index.html → UI container for report
• index.js → front-end logic (data ingest, rendering)
• index.css → styling
• pdf-sample.pdf → example asset
• Supporting files: Test_example.csv, privacy.txt
Readme insights
• Offline CSV analysis
• Uses Prompt API + Translate API + Gemini Nano built in
• Build with “npm run build” → dist folder loaded as unpacked extension
Detail
• Every architectural element (build, manifest, background, UI, model calls, external API)
• Intermediary message channels (chrome.runtime messaging)
• Asset folder only if it’s critical to resource loading