When writing code, you often need to build some complex feature or functionality. Sometimes you discover that someone else already wrote and implemented the functionality that you need. Instead of reinventing the wheel and writing the same code over again, you can find a pre-built package or app written by others and incorporate it into your own code. Using pre-built packages is a great way to minimize your development time and the amount of code you need to write.
There are 4 types of pre-built packages and solutions available to add to a Wix site:
The Wix JavaScript SDK provides a comprehensive set of modules that give you access to Wix's services and resources. These modules are specifically designed for Wix websites and work seamlessly with Wix elements and business solutions.
SDK modules are npm packages with the @wix/ namespace. For example:
Each SDK module contains detailed documentation explaining the module's functionality and implementation steps. To learn more, see the SDK documentation.
Built using the Velo APIs, Velo packages are created specifically for Wix websites and work seamlessly with Wix elements and apps. Unlike non-Wix packages, Velo package use cases are very specific to your Wix site. You can use Velo packages alongside the SDK in your development.
A Velo package can include backend code files, public code files, and npm packages. A Velo package's functionality is available for use through its exported functions. An editable config.json file may also be included for defining specific settings for a package. You can import the functions and use them in site code just like you import and use exported functions that you write in .js and .web.js files.
Note: If a Velo package includes an npm package, you won't see the package installed on your site.
Each Velo package contains a detailed README file explaining the package's functionality and the steps required for implementation. Some package functions are internal and can't be used directly in your site. See the package's README for the list of exposed functions available for use.
To learn more, see Working with Velo packages.
The npm registry is the most popular registry of pre-built JavaScript packages. You can install public npm packages in a site directly from the npm registry. It's your responsibility to follow the npm package's developer guidelines to understand the package's functionality, in what situations it can be used, and in what situations it shouldn't be used. Once installed, you can import the package and use it in your code.
To learn more, see Working with npm packages.
You can build custom apps using Wix Blocks to share custom functionality across your sites.
Once a custom app is installed on your site, the site can import custom app code, use the custom app's widgets, and the custom app's dashboard extensions and collections are automatically added to the site.
Learn more about custom apps and how to install custom apps on a site.