🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

Building a Single-File Offline Prompt Tool With Vanilla JS

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




Building a Single-File Offline Prompt Tool With Vanilla JS



There's a quiet joy in shipping a tool as one file. No npm install, no build step, no deploy pipeline, no backend to keep alive. You double-click an HTML file and it works — on any OS, offline, forever. Here's the architecture I used to ship a 3,000-entry prompt tool this way, and why vanilla JS is underrated for this class of product.






Why single-file at all



The constraints force good decisions. When everything — markup, styles, logic and data — lives in one file, you can't reach for a dependency casually. You end up with something small, fast, and portable enough to sell as a download that runs anywhere.



The tradeoff: no ecosystem. No React, no component library, no bundler niceties. For a focused tool, that's fine. You don't need a virtual DOM to render a filterable list.






Embedding the data



The data (thousands of prompt objects) ships inside the file as a JSON literal:




CODE
<script>
const DB = [{"v":1,"n":1,"c":"Sci-Fi","t":"Neon Rain City","p":"..."}, ...];
</script>






At ~1MB this is completely fine for a browser to parse on load. No fetch, no CDN, no CORS. The data is just there the moment the file opens. For a read-mostly dataset this is simpler and more robust than any API.






Rendering without a framework



The whole UI is document.createElement and a render function that runs on filter changes. Pagination keeps it fast — render 48 cards, "load more" for the rest — so even 3,000 entries never block the main thread. Filtering is a single .filter() over the in-memory array. No state library; the "state" is a handful of module-scoped variables.




CODE
function onFilter(){
filtered = DB.filter(r =>
(!activeVol || r.v === activeVol) &&
(!q || r.p.toLowerCase().includes(q))
);
shown = 0;
grid.innerHTML = "";
renderMore();
}






That's the entire search engine. For a local dataset, String.includes over an array outperforms anything you'd reach for, and it's zero setup.






The payoff



The result opens in any browser, needs no connection, and can be distributed as a plain download. No hosting bill, no maintenance, no framework churn to keep up with in two years.



If you want to see the finished thing, there's a free demo of the tool — a single offline HTML file you can crack open and read the source of. It's a decent reference for this pattern.



In the next post I'll cover the tricky part: persisting user data (favorites, history) in a file that has no backend.



Try the free demo →

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)