Next.js Multi-Zone Proxy

Shell Application for managing multiple Next.js zones under a single domain

Zone Configuration Status
Current status of configured zones and their environment variables
/dev-tool

Environment Variable: NEXT_PUBLIC_DEVTOOL_DOMAIN

Target: dev-tool-d8y4.vercel.app/tools

Visit
/eight-constitution

Environment Variable: NEXT_PUBLIC_EIGHT_CONSTITUTION_DOMAIN

Target: eight-constitution-test.vercel.app

Visit
Setup Instructions
How to configure and add new zones to this proxy

1. Configure Environment Variables

Add the following variables to your .env.local file or Vercel project settings:

NEXT_PUBLIC_DEVTOOL_DOMAIN=https://dev-tool-d8y4.vercel.app/tools
NEXT_PUBLIC_EIGHT_CONSTITUTION_DOMAIN=https://eight-constitution-test.vercel.app/

2. Configure Sub-Projects

Each sub-project must set its basePath in next.config.js:

// In dev-tool-app/next.config.js
module.exports = {
  basePath: '/dev-tool',
  // ... other config
}

3. Add New Zones

To add a new zone, edit config/multi-zones.json:

[
  {
    "path": "new-app",
    "envKey": "NEXT_PUBLIC_NEW_APP_DOMAIN"
  }
]
Architecture Overview

This Shell Application uses Next.js rewrites to proxy requests to independent Next.js applications (zones).

  • Each zone is deployed independently on Vercel
  • Zones are accessed via path-based routing (e.g., /dev-tool)
  • Configuration is managed via JSON and environment variables
  • Zero-downtime deployments for each zone
  • SEO-friendly with proper path-based routing