Structure
Choose a layout from the implemented discovery and module contracts.
All structure types#
ZeruxConfig.type accepts fix, dynamic and function. The resolver defaults to fix. These are accepted structure labels, not browser rendering modes, static-export flags, automatic serverless deployment adapters or separate authorization policies.
| Type | Verified behavior | Start here |
|---|---|---|
fix | Default structure mode, explicit discovery directories and entry module | Fixed structure |
dynamic | Accepted/resolved mode; shares current directory discovery and request runtime | Dynamic structure |
function | Accepted/resolved mode; resolver selects production environment fallback when NODE_ENV is absent | Function structure |
The current runtime does not branch its route/module discovery on structure.mode. Do not promise automatic function-per-route packaging or request-time module rescanning from these names. dev/start lifecycle mode, hosting configuration and explicit registrations are separate choices.
Directory and registration styles#
- All directory roles: app, middleware, controllers, composables, plugins, public, environment and output.
- Project structure: root versus src layouts with explicit overrides.
- File conventions: literal, dynamic and catch-all routes; reserved filenames.
- Configuration: exact option types and environment order.
- Explicit modules: registered controllers/providers and plugin teardown.
- Multisite mapping: separate host/path routing; never tenant authorization.
Rendering and build modes are independent#
ZyroJS/React/Vue selection belongs to renderer registration. General static export is an explicit API, not type:'fix'. Node builds, the docs app's own exporter and standalone Zyro build templates are distinct owners. Private files never belong under a public asset root.