Skip to content

Repository files navigation

πŸ“„ AI Datasheet Analyzer

Turn any electronic component datasheet into a risk-first engineering summary β€” adaptive sections, bring-up watch-outs, and decision-ready pros / cons / red flags.


MIT License React + TypeScript Vite + Tailwind Static SPA

Author: Arshia Keshvari (@TeslaNeuro) Β Β·Β  License: MIT


🎯 What it does

Drop in a PDF datasheet. The app extracts text locally in your browser, then asks an LLM to produce a structured summary written like an experienced electronics engineer β€” focused on risk, bring-up, and design watch-outs.

Output adapts to the part: IC, sensor, power device, connector, module, equipment, and more. Irrelevant sections are omitted; component-specific extras can appear when they matter.


✨ Features

πŸ†“ Zero-setup default Runs on Puter.js β€” no API key, no server. First analysis signs into a free Puter account; users pay only for their own usage.
πŸ¦™ Local / private mode One-click Ollama preset. Models stay on your machine.
πŸ”‘ Bring your own key OpenAI, OpenRouter, or any OpenAI-compatible endpoint (Groq, Together, vLLM, LM Studio, …). Key stays in localStorage.
πŸ“• Local PDF parsing pdfjs-dist in the browser. The file never leaves your machine β€” only extracted text is sent to the model.
🧩 Adaptive sections Pinout, curves, etc. appear only when relevant; custom extra sections for sensors, SMPS, connectors, and more.
⚠️ Risk-first Risks & design watch-outs and Decision summary are always present, with explicit red flags.
πŸ“€ Exports Copy or download as Markdown or JSON.
πŸͺΆ No backend Pure static SPA β€” host anywhere.

🧱 Output structure

Nine adaptive sections (omit what doesn’t apply; add extras when useful):

# Section When
1 Component Identification Always
2 Absolute Maximum Ratings If applicable
3 Recommended Operating Conditions If applicable
4 Electrical / Performance Characteristics If applicable
5 Pinout / Interface / Connections If applicable
6 Recommended Circuits / Application Notes If applicable
7 Risks, Caveats & Design Watch-outs Always
8 Alternatives & Cross-References If known
9 Summary for Decision-Makers Always (pros Β· cons Β· red flags)

Examples of model-added extras: Calibration (sensor), Safety / Isolation (SMPS), Mating / IP rating (connector).


πŸš€ Quick start

npm install
npm run dev

Open http://localhost:5173 β†’ drop a PDF β†’ Analyse.

The first Puter call opens a sign-in popup; later runs are silent.


πŸ–ΌοΈ Workflow guide

Four steps from empty screen to a decision-ready summary:

1️⃣ Upload a datasheet

Drag a PDF into the dropzone (or click to browse). Nothing is uploaded to an app server β€” parsing stays in your browser.

Empty upload screen with PDF dropzone and How it works cards

2️⃣ Confirm & analyse

With a file selected, click Analyse Datasheet. Use Settings first if you want Ollama, OpenAI, OpenRouter, or a custom endpoint instead of Puter.

PDF selected and Analyse Datasheet ready to run

3️⃣ Watch extraction & analysis

The app extracts text page-by-page, then streams the model response. You can cancel anytime.

In-progress analysis with elapsed timer

4️⃣ Review results & export

Browse adaptive sections (identification, ratings, risks, decision summary, …). Copy or download as Markdown or JSON.

Structured results with identification, risks, and decision summary


πŸ” Providers

Open Settings to switch providers:

Provider Key? Suggested models Notes
Puter No claude-sonnet-4-5, gpt-5.4-nano, gpt-5.2-chat, gemini-2.5-flash Keyless; user-pays via Puter
Ollama No qwen3.6:27b, gemma4:12b, qwen3-coder:30b, llama3.3 100% local β€” see CORS below
OpenAI Yes gpt-5.6-luna, gpt-5.6-terra, gpt-5.4-nano Bring your own key
OpenRouter Yes anthropic/claude-sonnet-4.5, google/gemini-2.5-flash, openai/gpt-5.4-nano One key, many models
Custom Yes Any OpenAI-compatible model Groq, Together, vLLM, LM Studio, …

Prefer models that support JSON mode (response_format: json_object). Puter routes may not always honour it, so the prompt also demands a single JSON object and the parser recovers JSON from prose when needed.


πŸ¦™ Ollama (local, free, private)

1. Install & pull a model

ollama pull qwen3.6:27b

Models in the ~12B+ range (or strong MoE equivalents) work best for structured extraction. Smaller 3–8B models often skip required JSON fields.

Tier Models Rough fit
Recommended qwen3.6:27b, gemma4:12b Best balance for datasheet JSON
Coding / long context qwen3-coder:30b, gpt-oss:20b Strong instruction following on 16–24β€―GB cards
Larger rigs llama3.3:70b, gemma4:31b Higher quality when VRAM allows
Light / fallback qwen3:8b, phi4-mini Faster, but more incomplete JSON

2. Enable CORS so the browser can call Ollama (OLLAMA_ORIGINS before starting Ollama):

OS Setup
macOS launchctl setenv OLLAMA_ORIGINS "*" β†’ quit & reopen the Ollama menu-bar app
Linux sudo systemctl edit ollama.service β†’ add Environment="OLLAMA_ORIGINS=*" β†’ systemctl restart ollama
Windows System env var OLLAMA_ORIGINS=* β†’ restart Ollama

Tighter option: OLLAMA_ORIGINS=http://localhost:5173,http://localhost:4173.

3. In the app β†’ Settings β†’ Ollama (local) β†’ confirm base URL (http://localhost:11434/v1) β†’ pick model β†’ Save.


πŸ—οΈ Production build

npm run build
npm run preview

dist/ is a fully static SPA β€” host on GitHub Pages, Netlify, Cloudflare Pages, S3, or any static host.


πŸ” Privacy

  • PDFs are parsed in your browser.
  • There is no app backend. Extracted text goes straight from the browser to your chosen provider:
    • Puter β†’ Puter’s API β†’ underlying model vendor
    • BYOK / Ollama β†’ your configured endpoint; API keys live only in localStorage

⚠️ Limits

Topic Detail
Large PDFs ~180β€―000 characters max; UI flags truncation and the model notes assumptions
Scanned PDFs Image-only files yield no text β€” OCR first or use a text-based datasheet
Safety-critical use Always cross-check against the original datasheet

🧰 Tech stack

Vite Β· React Β· TypeScript Β· Tailwind CSS
pdfjs-dist Β· react-markdown Β· remark-gfm
Puter.js v2 Β· OpenAI-compatible chat completions

πŸ“ Project layout

docs/screenshots/           # Workflow guide images for this README
src/
β”œβ”€β”€ App.tsx                 # Upload β†’ extract β†’ analyse β†’ results
β”œβ”€β”€ components/             # Dropzone, Settings, Results, UI chrome
└── lib/
    β”œβ”€β”€ pdf.ts              # Local PDF text extraction + hashing
    β”œβ”€β”€ llm.ts              # Puter / OpenAI-compatible client
    β”œβ”€β”€ prompt.ts           # Risk-first system & user prompts
    β”œβ”€β”€ cache.ts            # IndexedDB extraction & analysis cache
    └── …                   # Types, storage, export, error logging

πŸ‘€ Author

Arshia Keshvari (@TeslaNeuro)

Created and maintained as an open-source tool for electronics engineers who want faster, safer datasheet triage.


πŸ“œ License

Released under the MIT License.

Copyright Β© 2026 Arshia Keshvari (@TeslaNeuro)

About

AI-powered datasheet summaries for hardware engineers with local PDF parsing in the browser.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages