TypeScript, React, Vite, Tailwind CSS. Hosted on GitHub Pages with base: '/WebFileTools/'.
npm run dev— local developmentnpm run build— production build +404.htmlcopy for SPA fallbacknpm run preview— preview the production build
Optional Google Analytics (build-time):
VITE_GA_MEASUREMENT_ID=G-XXXXXXXX- Open Settings → Secrets and variables → Actions
- New repository secret
- Name:
VITE_GA_MEASUREMENT_ID - Value: your Measurement ID from Google Analytics (
G-XXXXXXXX)
- Name:
- Push / re-run Deploy to GitHub Pages so
npm run buildpicks it up
Local .env is only for npm run dev / local builds. Pages deploy uses the Actions secret.
Without this variable, analytics stays disabled.
- Keep file processing client-side only.
- Add tools as independent modules under
src/tools/. - Register lazy pages in
src/tools/loadTool.tsand markreadyinregistry.ts. - Update README (en/ja), docs (en/ja), and UI strings together when features change.
Build runs scripts/postbuild-seo.mjs, which writes:
- Per-route HTML under
dist/for English (/,/tools/...) and Japanese (/ja,/ja/tools/...) with localized title, description, Open Graph text,og:locale,hreflang, canonical, JSON-LD, and a noscript crawler blurb (noog:image) dist/sitemap.xml(EN+JA URLs with xhtml hreflang),dist/robots.txtdist/llm.txt,dist/llm-full.txtdist/404.htmlSPA fallback
Language in the URL is the source of truth for UI and OGP (footer language switch navigates between /… and /ja/…). Client navigation updates the same meta via src/seo/SeoListener.tsx.
OpenAI token counts use js-tiktoken (cl100k_base). The tokenizer payload is large and loaded only when that tool is opened.