Operations

Deployment

Shipping to Vercel, security headers, offline support, analytics and the production checklist.

Splitmize is a static-first Next.js app. Every page in every locale is generated at build time; the only code that runs per request is the locale proxy.

Vercel

The project deploys to Vercel with zero configuration: framework detection handles the build, and pushes to main go to production.

  • No vercel.json is needed. (Version 1 had one with a legacy builds key, which disables project settings — it was removed.)
  • Node.js 20.9+ is required by Next.js 16; the engines field in package.json says so.
  • The canonical site URL comes from NEXT_PUBLIC_SITE_URL or, if unset, from VERCEL_PROJECT_PRODUCTION_URL, which Vercel provides at build time.

Self-hosting

npm run build && npm start works anywhere Node runs. The proxy needs a Node or edge runtime, so a pure static export (output: 'export') is not supported — locale rewrites would have nowhere to run.

Security headers

Set in next.config.ts for every route:

HeaderValue
X-Content-Type-Optionsnosniff
Referrer-Policystrict-origin-when-cross-origin
X-Frame-OptionsDENY
Permissions-Policycamera, microphone, geolocation disabled

poweredByHeader is off. Version 1 shipped /api/contact, an unauthenticated endpoint that relayed arbitrary HTML to an inbox through Gmail SMTP; it was removed along with nodemailer.

Offline support

public/sw.js is a hand-written service worker, registered by components/ServiceWorker.tsx in production only (in development it unregisters any worker it finds).

RequestStrategy
/_next/static/*Cache-first — file names are content-hashed, so entries never go stale.
Page navigationsNetwork-first, falling back to the cached page, then to the cached /split.
/assets/*, manifestStale-while-revalidate.
RSC requests, /_vercel/*, cross-originNot intercepted.

/ and /split are pre-cached on install. The worker file itself is served with Cache-Control: no-cache so updates are picked up on the next visit.

The web app manifest (src/app/manifest.ts) starts installed apps directly at /split.

Analytics

@vercel/analytics records page views without cookies or personal data. It never sees bill contents: bills are in localStorage and in URL fragments, neither of which is part of what analytics collects. To disable it, remove <Analytics /> from src/app/[locale]/layout.tsx.

SEO and social

  • generateMetadata in each route sets titles, descriptions and hreflang alternates.
  • src/app/sitemap.ts lists every landing, app and docs URL in all locales; src/app/robots.ts excludes /s (shared bills are private by nature).
  • src/app/[locale]/opengraph-image.tsx generates the social card at build time, with Bricolage Grotesque and Chivo Mono fetched from Google Fonts (falls back to the default font if the build is offline).

Production checklist

  • npm run check passes.
  • npm run build succeeds without warnings you didn't expect.
  • Bumped VERSION in public/sw.js if caching changed.
  • Walked through the manual checks in testing.
  • Added an entry to the changelog.
Edit this page on GitHub