DEV Community

Cover image for How I Built ToolHub: A 138-Tool Static PWA That Stays Sub-Second
ɐ ℒℯℯ
ɐ ℒℯℯ

Posted on Originally published at toolhub.axtrivc.com

How I Built ToolHub: A 138-Tool Static PWA That Stays Sub-Second

Hi everyone! 👋 I recently published a full architecture retrospective on building ToolHub — a clean, privacy-first, zero-bloat suite of 138+ in-browser web utilities.

Here is a summary of the key engineering tradeoffs and technical decisions that allowed us to keep the site sub-second fast and fully offline-capable.

🚀 Key Architectural Highlights

⚡ 1. Next.js Static Export (output: 'export')
Instead of running a node server for SSR/ISR, we opted for a 100% static export model hosted on edge CDN.
👉 Why: Zero server maintenance, ultra-low TTFB, infinite scaling.
👉 Tradeoff: Everything dynamic executes strictly on the client side in browser memory.

📲 2. Custom Service Worker Caching Strategy
We built a custom SW strategy specifically for PWA caching:

stale-while-revalidate for static assets (_next/static/*).

network-first for HTML document navigations (ensures users always see the latest release when online).

Complete offline capability across all 138 tools once cached.

🔍 3. pSEO Engine (Programmatic SEO)
Generating 138+ static tool pages with full JSON-LD structured data and automated internal linking meshes, all baked into static HTML at build time without runtime database lookups.

📐 4. Zero-CLS Ad Strategy
Preventing layout shifts (CLS) by reserving explicit fixed-height layout slots for ad units before they load.

🛠️ Try ToolHub Live:
👉 https://toolhub.axtrivc.com/

📖 Read the full engineering deep-dive on my blog:
👉 https://toolhub.axtrivc.com/blog/how-i-built-toolhub/

I'd love to hear your thoughts, feedback on the architecture, or suggestions for new tools! 💬

Top comments (1)

Collapse
 
amitfeldman profile image
Amit Feldman

Cool project — 138 tools client-side with no signup is a great privacy story. From a scan of toolhub.axtrivc.com: you've already set X-Content-Type-Options and Referrer-Policy, but HSTS and Content-Security-Policy are both missing. Since you're behind Cloudflare, no redeploy needed:

  1. HSTS: SSL/TLS → Edge Certificates → "Enable HSTS" (max-age 12 months, includeSubDomains on).
  2. CSP + the rest: Rules → Transform Rules → Modify Response Header, add static Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'.

With 138 tools rendering user input client-side, CSP is the cheapest XSS backstop you can buy. Happy to run a full free scan if you want the whole picture.