This is the repository for all ViSenze widgets aiming to accelerate development and deployment of ViSenze-powered Shopping Experiences.
Each widget can operate as a standalone component to be deployed in an e-commerce website and can be build and distributed independently from each other.
The widgets use React, HeroUI (formerly known as NextUI) and Tailwind CSS.
├─ common <- Folder for common code used across different widgets
├─ client <- Client connecting with ViSenze APIs
├─ components <- Common React components
├─ types <- TypeScript typing
├── official-widgets <- Widgets built and officially supported by ViSenze
├─ camera-search
├─ similar-search
├─ etc.Each widget is designed to be distributed as a separate bundle.
The exact steps for local development vary slightly between different widgets, but generally follow the same idea.
Using similar-search as example:
- To run the widget locally:
- Add your app key and placement ID to
dev-configs.tsin the relevant folder, which in this case issrc/official-widgets/similar-search. - Add the widget-specific parameters to
index.htmlin the same folder. For example, for thesimilar-searchwidget, add the product image URL in thedata-urlfield of the widget selector. - Run:
The dev server will be available at
npm run start:similar-search
http://localhost:8080and will automatically reload for changes made insrc/official-widgets/similar-searchfolder.
- Add your app key and placement ID to
- To bundle the widget:
The bundled file will be available in
npm run build:similar-search
dist/similar-searchdirectory.
The exact instructions for different widgets can be found in the sub-folder containing the widget.