next-zonesv0.1.0

next-zones

Zones for Next.js. Build each part of a product as its own Next app, a zone, with its own version. Serve them as one app: one origin, soft navigation between zones' App Router pages, one React. A new version of a zone can be loaded into the running server without a restart.

Status: pre-release. It targets Next.js 16.4.0 and 16.3.8 (and 16.3.6, 16.3.7), App Router and Pages Router, production server.

  • Available:
    • the zone declaration (zoneConfig);
    • the CLI: init, add, check, doctor, dev, build, start, serve, install, pack, pull, prune, watch;
    • Zones (createZones), which installs and swaps zones at run time;
    • one combined build of every zone (mode: "single", the composer);
    • <ZoneUpdates />;
    • metrics: Zones' own and any zone's, as Prometheus text (@runsnip/next-zones/metrics).

Why#

Next.js has Multi-Zones:

next-zones keeps the separation (each zone builds, versions and deploys on its own) without those costs:

Next Multi-Zones next-zones
Moving between zones hard navigation soft <Link> navigation between App Router pages; client state kept
Servers one per zone one for all zones
A module shared by zones loaded once per zone loaded once
Releasing a zone redeploy its server install it live, roll back in milliseconds

Pages#

  1. Concepts: zones, the shell, mounts, aliases, versions
  2. Getting started
  3. Configuration: zoneConfig
  4. CLI: every command
  5. Root URLs: aliases
  6. Routing rules: a zone's headers, redirects and rewrites
  7. Instrumentation
  8. Assets: fonts, images, public files
  9. Live updates and requirements
  10. Zones: live installs
  11. Metrics
  12. Zones on the Pages Router
  13. What is supported

For assistants#

The package ships llms.txt (the essentials) and llms-full.txt (every page above in one file), and a skill for coding assistants, skills/next-zones/SKILL.md: copy its folder into a project's skills folder (for Claude Code, .claude/skills/) so an assistant reads those files before it answers.

License#

Apache-2.0.

Edit this page on GitHub · Markdown