Giter Site home page Giter Site logo

marketplace's Introduction

ℹ︎ About

The Fusebit Marketplace enables you to easily make all your Integrations available to users of your application through our beautiful React components that integrate directly with Fusebit.

The FusebitMarketplace component will create a tile for each Integration that you pass to it in an automatically generated gallery style page. Each Integration tile in this gallery will check directly with Fusebit to see if the tenant has already installed the Integration and reflect the state accordingly.

✨ Features

  • Standardized UI Components with built-in Fusebit Integration Logic
  • Handles Installation & OAuth Process from within the Marketplace
  • Displays Installation Status of each Integration per Tenant

📦 Install

npm i @fusebit/react-marketplace

🔨 Usage

import { Marketplace as FusebitMarketplace } from "@fusebit/react-marketplace";

return (
  <FusebitMarketplace
    onUninstallClick={props.onUninstall}
    getInstallUrl={props.getInstallUrl}
    getIntegrations={() => props.userData?.list || []}
  />
);

Integrate the Fusebit Marketplace component into an HTML file using javascript

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="">
        <script src="https://unpkg.com/[email protected]/umd/react.development.js"></script>
        <script src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script>
        <script src="https://unpkg.com/@fusebit/[email protected]/dist/cjs/index.js"></script>
    </head>
    <body>
        <div id="app"></div>
        <script>
            const getIntegrations = async () => {
                const url = "/api/test-tenant/integrations";
                const res = await fetch(url || "");
                const integrations = await res.json();
                return integrations;
            };

            const getInstallUrl = async (integration) => {
                const url = `/api/${integration}/test-tenant/installUrl`;
                const res = await fetch(url || "");
                const install = await res.json();
                return install.targetUrl;
            };

            const onUninstallClick = async (integration) => {
                const url = `/api/${integration}/test-tenant/install`;
                const res = await fetch(url || "", { method: "DELETE" });
            };

            const props = {
                onUninstallClick: onUninstallClick,
                getInstallUrl: getInstallUrl,
                getIntegrations: getIntegrations,
            }

            ReactDOM.render(
                React.createElement(Fusebit.Marketplace, props), document.getElementById("app")  
            );
        </script>
    </body>
</html>

👀 Example: Fusebit Sample App

See the Marketplace in action with the Fusebit Sample App. More Specifically, you can take a look at:

marketplace's People

Contributors

mikefuster avatar fpmanuel avatar msakbar avatar bennbollay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.