Back to docs

Documentation

ZShip Next.js template overview

What the React and Next.js App Router frontend includes and when to use it.

Article
Next

apps/web-nextjs is the React-first ZShip frontend template built on Next.js App Router. It uses React Server Components for public pages and Next route handlers for backend calls, then deploys as a Cloudflare Worker through OpenNext.

What ships today

  • React 19 UI with Next.js App Router file conventions
  • Server route handlers under src/app/api/**/route.ts
  • Cloudflare Worker deployment through @opennextjs/cloudflare
  • Service Binding first backend calls with HTTP fallback for local development
  • Manifest-driven app identity through zship.app.json
  • Auth, pricing, checkout, dashboard, blog, docs, changelog, and roadmap routes
  • Shared locale, theme, and analytics-consent providers
  • Public SEO surfaces: sitemap.xml, robots.txt, /llms.txt, and /llms-full.txt

When to choose this frontend

Choose the Next.js template when a project wants React as the primary UI stack on the most widely deployed React framework and still needs ZShip’s server-side tenant contract, authenticated SaaS flows, and Cloudflare-native deployment.

Main source areas

  • src/app/**: public pages, auth pages, dashboard pages, and route handlers
  • src/lib/server/**: cookie, response, Cloudflare env, proxy, sitemap, and llms utilities
  • src/lib/client/**: auth helpers, landing/legal copy, theme, and consent
  • src/lib/content/docs.ts: this built-in documentation catalog (en + zh-CN fields)
  • src/lib/seo.ts: shared title/description/canonical/OG helpers
  • zship.app.json: app identity, brand, SEO, analytics, and dashboard feature switches