CodeVetter · Repo Unpack · Extension points
QwikDev/qwik
Extension mechanisms generally use explicit factories, branded functions, package exports, or declarative metadata. Runtime APIs and serializers connect to an optimizer-aware public boundary, while Router discovers middleware and data functions from route modules. Scaffolding discovers packaged integrations and composes them through a staged update interface. Tooling provides additional named registries for experiments, lint rules, and MCP tools.
- core/index.ts is the public export boundary for components, QRLs, hooks, state primitives, and control-flow helpers; new public APIs must fit this export surface.
- setPlatform and CorePlatform provide a named platform abstraction, while createQwikPlugin accepts an injected _optimizer before selecting built-in optimizer providers.
- ExperimentalFeatures is an explicit registry for compiler-replaced runtime flags, including control-flow primitives, validation, SPA behavior, Insights, and nonblocking loaders.
- routeLoaderQrl produces frozen server_loader functions carrying QRL, validators, ID, serialization strategy, cache-control, ETag, cache-key, search, and blockSSR metadata.
- routeActionQrl produces frozen server_action functions; resolveRequestHandlers discovers loaders/actions by examining branded exported functions in route modules.
- Route modules extend request execution through onRequest and method-specific onGet/onPost/onPut/onPatch/onDelete/onOptions/onHead handlers, each accepting a function or function array.
- qwikRouter builds a plugin array around router, server-function, and image plugins; ssgAdapter composes the shared viteAdapter with origin and SSG options.
- loadIntegrations discovers app, feature, and adapter directories and reads package __qwik__ metadata for display name, documentation, priority, and alwaysInRoot rules.
- makeTemplateManager separates standalone templates from base and treats library as a standalone bootstrap; updateApp returns staged updates plus a commit callback.
- Custom serialization APIs include useSerializer$ and createSerializer$; an inspected test supplies serialize/deserialize functions for a custom class.
- The ESLint plugin uses a rules table with recommended/strict severity maps, while createMcpServer defines tools through a named table of schemas and accepts an external call dispatcher.