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.jsonis needed. (Version 1 had one with a legacybuildskey, which disables project settings — it was removed.) - Node.js 20.9+ is required by Next.js 16; the
enginesfield inpackage.jsonsays so. - The canonical site URL comes from
NEXT_PUBLIC_SITE_URLor, if unset, fromVERCEL_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:
| Header | Value |
|---|---|
X-Content-Type-Options | nosniff |
Referrer-Policy | strict-origin-when-cross-origin |
X-Frame-Options | DENY |
Permissions-Policy | camera, 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).
| Request | Strategy |
|---|---|
/_next/static/* | Cache-first — file names are content-hashed, so entries never go stale. |
| Page navigations | Network-first, falling back to the cached page, then to the cached /split. |
/assets/*, manifest | Stale-while-revalidate. |
RSC requests, /_vercel/*, cross-origin | Not 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
generateMetadatain each route sets titles, descriptions andhreflangalternates.src/app/sitemap.tslists every landing, app and docs URL in all locales;src/app/robots.tsexcludes/s(shared bills are private by nature).src/app/[locale]/opengraph-image.tsxgenerates 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).