DEV Community

Inmo Kang
Inmo Kang

Posted on

Scaling a 5-Locale Nuxt App to 295 Programmatic SEO Routes (Plus WebView & Proxy Traps)

Whenever I needed a quick JSON formatter, UTF-8 Base64 decoder, EXIF stripper, or net-to-gross reverse tax calculator, top search results were either covered in pop-up ads or uploading files to a backend server.

So I built AllUtility—a Dieter Rams-inspired, 100% browser-local suite of 30 web utilities across 5 locales (en, ko, es, zh, ja), including a Three.js 3D Studio Lighting Diagram Simulator I originally made for teaching photography.

Shipping the tools was the easy part. Getting a brand-new domain indexed—and debugging why mobile telemetry silently dropped—took a lot more digging. Here are 4 concrete lessons from scaling the Nuxt SSR architecture to 295 programmatic routes.


1. The Silent YAML Frontmatter Stripping Bug

I had written 150 localized Markdown guides (5 locales × 30 tools) with rich long-tail titles in YAML frontmatter. Yet Google Search Console showed our pages competing only on impossible head terms like "Compound Interest Calculator".

The culprit was a single regex in our server API route that stripped the frontmatter block before returning the Markdown body, leaving useSeoMeta falling back to short tool names:

// Before: Long-tail SEO metadata was silently discarded
const rawMarkdown = await fs.readFile(filePath, 'utf-8')
const bodyContent = rawMarkdown.replace(/^---\n[\s\S]*?\n---\n*/, '')

// After: Parse frontmatter directly into the SSR payload
function parseFrontmatter(raw: string) {
  const match = raw.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n*/)
  if (!match) return { meta: {}, body: raw }

  const meta: Record<string, string> = {}
  for (const line of match[1].split(/\r?\n/)) {
    const idx = line.indexOf(':')
    if (idx > 0) {
      const key = line.slice(0, idx).trim()
      const val = line.slice(idx + 1).trim().replace(/^['"]|['"]$/g, '')
      meta[key] = val
    }
  }
  return { meta, body: raw.slice(match[0].length) }
}
Enter fullscreen mode Exit fullscreen mode

Restoring those frontmatter fields immediately expanded targeting across 150 existing routes without writing a single line of new copy.


2. Localizing Search Intent Instead of Literal Translation

Users rarely search for "Unit Converter"—they search for specific scenarios (sq ft to m2, reverse VAT, 30-year mortgage schedule).

To capture this without generating thousands of spammy thin pages, we added 20 curated preset routes per locale (100 URLs) and 5 category hubs per locale (25 URLs). Two rules prevented thin-content flags:

  1. SSR Reference Tables & FAQs: Every /tools/[slug]/[preset] route renders a dedicated <h1>, pre-hydrated calculator state, an SSR HTML reference <table>, and FAQPage + BreadcrumbList JSON-LD with explicit root name and @id.
  2. Jurisdiction-Aware Presets: Literal translation creates dead URLs. For example, Korea's 3.3% freelance withholding tax doesn't exist elsewhere—so the same withholding-tax-reverse preset maps to localized Net-to-Gross (Gross-Up) withholding scenarios in English, Spanish (Retención), Japanese (10.21% 源泉徴収), and Chinese.

3. Shareable Query Strings vs. Canonical Bloat

Calculators grow organically when users paste pre-filled result links into chats or forums (?principal=50000&rate=4.5). However, letting search bots index parameterized URLs splits crawl budget.

We paired a reactive URL-state composable with a strict canonical guard in app.vue so every parameterized link still points back to its clean route:

const route = useRoute()
const siteUrl = '[https://allutility.net](https://allutility.net)'

const cleanCanonical = computed(() => {
  const cleanPath = route.path === '/' ? '' : route.path.replace(/\/+$/, '')
  return `${siteUrl}${cleanPath || '/'}`
})

useHead(() => ({
  link: [{ rel: 'canonical', href: cleanCanonical.value }]
}))
Enter fullscreen mode Exit fullscreen mode

4. The In-App WebView Clipboard Trap

After deploying GA4 interaction events (tool_execute, tool_copy, tool_download), tool_copy stayed suspiciously at zero on mobile—especially from messenger in-app browsers.

Testing under in-app WebView constraints revealed two issues:

  • Nested workspace padding pushed the primary tool input down past Y = 630px on 375×812 viewports. Compacting mobile chrome brought every editor up to Y = 338–477px (cleanly above the fold) while keeping CLS at 0.001.
  • Calling navigator.clipboard.writeText() alone threw NotAllowedError in restricted WebViews before the analytics callback fired. Wrapping clipboard writes with a synchronous hidden <textarea> fallback fixed both UX and telemetry.

Wrapping Up

We rounded out the pipeline by serving a structured /llms.txt manifest and triggering automatic IndexNow submissions (continue-on-error: true) at the end of our GitHub Actions Docker deploy.

If you spot any UX rough edges or have a utility you wish existed in a fast, ad-free local version, let me know in the comments!

Top comments (0)