Documentation Index
Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Extension authoring
An extension should address one capability boundary. Keep the factory small, declare requirements explicitly, and expose contracts throughprovides or setup().
Prerequisites
- A Veryfront project that imports
veryfront/extensions. - A concrete capability gap to fill: write the extension that fills exactly that gap rather than a general-purpose toolkit.
Scaffold an extension
Write a factory
Provide a contract
Useprovides when the implementation does not need async initialization:
setup(ctx) when the implementation needs async initialization or dynamic contract registration.
Declare capabilities
Capabilities document what the extension needs:Verify it worked
- Run
veryfront extension validate extensions/my-cache. A passing extension prints no errors. - Add the factory to
veryfront.config.tsand restartveryfront dev. The dev log should list the extension under its declared name. - Use the contract from another part of the app and confirm the
extension’s
providesvalue is what gets resolved.
Next
- Extension lifecycle: understand discovery and loading
- Extension testing: test factories and contracts
Related
- Extensions: extension overview
veryfront/extensions: extension API reference