MyCover AI
Getting Started

Quick Start

This guide is designed to help you easily integrate to our SDK as a distributor. By following this guide, you will set up the SDK for purchasing insurance.

Prerequisites

Setting up your project

  1. Clone the repository to bootstrap a fresh project:

To clone the repository to your personal computer, run the following command.

$ git clone <https://github.com/ibuildgenius/buy-insurance.git>
  1. Navigate into the project’s directory with the command:
$ cd buy-insurance
  1. Install the project’s dependencies using the commands:
npm install
  1. In the mycoverai.js file, replace the YOUR_API_KEY with the public API key from your distributor dashboard.
mycoverai.js
const config = {
  ...
  pk: 'YOUR_API_KEY', // ENTER YOUR PUBLIC API KEY
  ...
};

  1. Start the project locally in development mode.

Run the following command to start the project in the browser on http://localhost:5173/buy-insurance/

npm run dev
✨ Well done! A browser window should open for http://localhost:5173/buy-insurance/

Testing your project

With everything setup correctly, on launching your browser on localhost:5173, you should be greeted with a simple user interface. Click the "Buy Insurance" button to open up the MyCover.ai SDK widget.

Once you click the button, the SDK is initialised and displays a list of actions to take, including purchasing a product.

✨ During purchase, you can easily simulate a bank transfer payment using this link: https://demobank.paystackintegrations.com/