Next.js Discord

Discord Forum

Multi-Zone - render an app within an app

Unanswered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
Hi all — I’m using Next.js 15 with Turborepo. I’ve got a “super app” that handles layout, auth (NextAuth), etc., and I want to use multi-zones to render other apps inside it, like:
• /apps/super-app/*
• /apps/app-one/* → renders the app-one app
• /apps/app-two/* → renders the app-two app

Each sub-app is a full standalone Next.js app, the same layout, the same authentication (I have a package all my apps consume). Locally it works fine with rewrites(), but I’m hosting on AWS Amplify, so I’m aware I’ll likely need to reverse proxy via CloudFront in prod.

The only workaround I’ve thought of so far is using a NEXT_PUBLIC_IS_SUPER_APP env var in the sub-apps to conditionally skip layout/middleware/auth logic if they’re being rendered inside the super app.

Has anyone come across this? Or have any ideas on how to tackle this?
https://nextjs.org/docs/pages/guides/multi-zones

0 Replies