StartStack gives you the ability to put your site into "Coming Soon Mode" via the NEXT_PUBLIC_ENABLE_COMING_SOON
environment variable. This makes it easy to put your site into "Coming Soon Mode" in Production while building locally
or in Preview environments. Optionally, instead of using the environment var you could use a feature flag in vercel or
any other feature flag provider.
To enable Coming Soon Mode, set the NEXT_PUBLIC_ENABLE_COMING_SOON
environment variable to true
.
NEXT_PUBLIC_ENABLE_COMING_SOON="true"
When this is enabled, the (marketing)
route group layout will load the @comingSoon
slot instead of the default
children
slot. You can customize the coming soon page by modifying /app/(marketing)/@comingSoon/page.tsx
.
The logic to load the slot is in /app/(marketing)/layout.tsx
.
{enableComingSoon ? (comingSoon) : (<div className="flex min-h-dvh flex-col"><Header /><main className="flex-1">{children}</main><Footer /></div>)}
You can learn more about Parallel routes in the Next.js docs.