Deployment
It is a Next application and it exports to static files. That means almost anywhere, and it means one decision.
What you have
A standard Next application. npm run build produces the build, and because this edition is output: "export" that build is a folder of static files rather than a server. npm start serves that folder. Nothing in the theme constrains your hosting.
The one decision: static or server
| Static export | Node server | |
|---|---|---|
| Set | output: "export" | the default |
| Produces | a folder of HTML and assets | a server you run |
| Host on | any static host or CDN | anywhere Node runs |
| Server components | prerendered at build | rendered per request |
| Route handlers | not available | available |
| next start | does not work | how you run it |
⚠️ next start cannot serve a static export
If
output: "export" is set there is no server to start, and Next refuses rather than serving anything. Put the exported folder behind a static host, or remove the setting.Behind a path
Hosting at example.com/admin/ rather than a domain root needs basePath, and it needs it at build time only: setting it unconditionally also moves your dev server, so every local URL changes for no reason.
next.config.js
...(process.env.NODE_ENV === "production" ? { basePath: "/admin" } : {}),Before you ship
npx tsc --noEmitis clean. The download ships acheck-typesscript for it.- The dashboard renders with styling in the built output, not just in dev. An unstyled build means Tailwind is not scanning the components, and it fails with a green build and no error.
- Dark mode survives a reload without a flash of the wrong theme.
- Your API base URL is set for production. The demo screens do not call one; your screens will.