The intend of this micro-frontend is to easily fit this cart into a magento web-application. It's token-verification is specifically tailored to Magento, otherwise it would fit into any web-based shop.
This demo version only works as a dev-build, or until our backend starts using a verification token to identify the user. What follows is an easy set of instructions on how to implement this plugin into a valid webshop.
To start you must prepare a container in your web-application for rendering the cart. It can be any html-element you choose so long as it's empty and has an id. For example:
<div id="cartmanBasket"></div>
The next step is to include cartman-frontend.umd.min.js into your application. Subsequently run a script to initialize the cart. For example:
<script src="[fill in domain here]/cartman-frontend.umd.min.js"></script> <script> window.addEventListener('DOMContentLoaded', () => { cartman.init('#cartmanBasket'); }) </script>
Future requirements will require you to add user-specific information to the initialization of the app. Visit this page again for updated information.