Scroll
Index / Work / 04 · AI Summarizer
2026 HNG Internship 14 · Stage 4a Solo · extension + proxy Chrome MV3Gemini 2.5NestJS proxy

A Chrome MV3 extension that extracts the main article off any webpage, sends it to a small NestJS proxy holding a Gemini key, and renders the summary in the popup while marking the key sentences inline on the page itself. Per-URL + per-brevity caching means a second click is free.

Client
HNG Internship 14 · Stage 4a
Role
Solo · extension + proxy
Duration
03 / 2026
Stack
Chrome MV3 · Service Worker · NestJS · Gemini 2.5 Flash
AI SUMMARIZER · 2026 · COVER PLATE
04 / 11
~30
lines · extractor heuristic
4–6
bullets · standard
2
cache tiers per URL
§ 02 · Chapter

Heuristic extraction over Mozilla Readability

The content script tries semantic selectors first — article, main, [role="main"], common content classes — and falls back to a stripped body with nav, header, footer, aside, scripts, and iframes removed. Readability would be more accurate on messier layouts; the heuristic is thirty lines and Gemini handles messy input well, so the cost/benefit did not justify the dependency.

§ 03 · Chapter

Hosted proxy over user-supplied keys

The Gemini API key lives on a small NestJS proxy, not in the extension. The user gets zero setup; I accept cold boots and bear the API bill. The proxy calls gemini-2.5-flash with a structured-output schema and returns parsed JSON the extension can render without re-validating.

§ 04 · Chapter

XSS-safe in-page annotation

Highlighting writes nothing to innerHTML. The content script walks the article DOM, locates each key sentence as a Range, and calls Range.surroundContents on a mark element. Pages on chrome://, chrome-extension:// and the Chrome Web Store cannot be scripted — the popup detects those and shows a friendly error instead of failing silently.

§99 · Continue

Have a brief?
Let's talk.

© 2026 · Moluno · Powered by sapa
v2.04.026 · 60Hz · 6.5244 N · 3.3792 E