mdl-identifi-js
v1.0.0
Published
JavaScript client SDK for the headless micro CRM, Minddale.
Downloads
12
Maintainers
Readme

Minddale
Minddale is a headless micro CRM provided by Firecodex to help you build your brands digitally immortal!
Library
This mdl-identifi-js (v1) is a JavaScript client library for Minddale, i.e. an npm library to get your JavaScript client connected to the platform and get the services done.
Setup
This library is a very simple module added to your JavaScript project to use the service.
Install
Run cd your-app & npm i mdl-identifi-js --save
Use
Once registered with Minddale, get your API Key generated for a particular service to connect with the platform.
Note: Make sure you keep the API Key securely in environment file or any other secure methods.
In case you are not making the request from your registered domain (website), make sure you are setting the registered client domain as well in the request header x-mdl-domain.
In order to manage local storage or validate JWT tokens, use the service methods as follows.
// Setup Dependency & API Key
const identifi = require('mdl-identifi-js');
require('dotenv').config();
const API_KEY = process.env.MDL_API_KEY;
// Save JSON to Local Storage
let jsonObject = {"userId": "12345", "role": "admin"};
identifi.saveItemToLocalStorage('userData', jsonObject);
// Get JSON from Local Storage
const storedData = identifi.getItemFromLocalStorage('userData');
console.log(storedData);
// Save Value to Local Storage
identifi.saveValueToLocalStorage('theme', 'dark');
// Validate JWT Token
let token = "your-jwt-token-here";
const response = identifi.validateJwtToken(token, API_KEY);
response.then(resp => console.log(resp));
Support
We, at Firecodex, would like to support anybody with queries or suggestions. Please feel free to reach out to us:
Happy Coding!
