Next.js
chainship deploys statically exported Next.js. Perfect for dApp frontends; not for server-runtime apps.
Setup
Add static export to next.config:
// next.config.mjs
export default { output: "export" };
Then deploy as usual — chainship auto-detects Next and builds to out/:
npx chainship deploy # or drop the folder in the browser
If output: "export" is missing, chainship stops before building with a clear message.
✅ Supported
- All pages/routes, statically prerendered (use
generateStaticParamsfor dynamic routes) - React client components, client-side routing and state
- Wallet & smart-contract calls, and any external API called from the browser
- Static assets, CSS, fonts
❌ Not supported (and why)
A server at request time would reintroduce the central trust chainship removes — so there is no server runtime. These Next.js features therefore don't work:
- SSR / server-rendered Server Components
app/apiroute handlers · Server Actions- ISR /
revalidate· Middleware next/imageon-the-fly optimization (use static images or a build-time optimizer)
Migrating server logic
- Data: fetch client-side, or read it from contracts directly.
- Mutations / secrets: call your own backend (or a serverless function elsewhere) from the tamper-checked static frontend. chainship serves the frontend, and your backend stays yours.
- Auth: wallet signatures / your provider, client-side.
Every tool that checks frontends has this boundary: the frontend is permanent and each asset is tamper-checked (pointer verification on chain is still to come). Dynamic behavior runs in the client or against APIs it calls. See the trust model.