npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@akordacorp/assembly

v1.1.2

Published

Contract Assembly Integration Resources (JS/CSS)

Downloads

5

Readme

Akorda - Developer Integration - Contract Assembly

This package contains two files:

  • akorda-assembly.js
  • akorda-assembly.css

These two resources are used to integrate Akorda's Contract Assembly feature into third-party environments.

Installation

yarn add @akordacorp/assembly

or

npm install @akordacorp/assembly

Usage

Once the browser has loaded the two resources (akorda-assembly.js and akorda-assembly.css), you can load Akorda's contract assembly feature using the js function AkordaAssembly(). For example:

// reference the id of your contract playbook template that you'd like to use.
// Assembly Questions should be configured for this playbook.
const akordaPlaybookId = 892;

// the "config" argument is an object that includes various
// properties (some required) for talking to the Akorda
// application. More information about the config option
// properties can be found in the documentation below.
const config = {
  // the Akorda application URL (omitted if using a proxy)
  appUrl: "https://app.akorda.com",
  // the jwt token obtained via your client credentials (omitted if using a proxy)
  accessToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dnZWRJbkFzIjoiYWRtaW4iLCJpYXQiOjE0MjI3Nzk2Mzh9.gzSraSYS8EXBxLN_oWnFSRgCzcmJmMjLiuyu5CSpyHI",
  // the id of the DOM element in which to load the assembly feature.
  targetElementId: "akorda-assembly",
  // required information about the user
  userInfo: {
    firstName: "Jane",
    lastName: "Doe",
    email: "[email protected]"
  },
};

// Call the AkordaAssembly() function with the required arguments
AkordaAssembly(akordaPlaybookId, config);

Config Properties

config.appUrl In a standard production environment, this url will be same url as the production Akorda application: https://app.akorda.com. If you are using an Akorda development or staging environment, this url may be different. Ask your Akorda representative for more information.

Important: If you are proxing the calls to Akorda on the server, you must omit this property from the config.


config.targetElementId In your web page, this is the ID of the DOM element in which you want the Akorda Contract Assembly feature to appear. The default is akorda-assembly, and might appear in the html of your web page as:

<div id="akorda-assembly"></div>

config.accessToken The JWT token that will be used for authentication and authorization in the Akorda application. You can acquire a token via the Akorda application by sending an HTTP POST request to {appUrl}/api/login/authorize, and include the form values: client_id and client_secret. Please contact your Akorda representative for these details.


config.userInfo An object with the following structure:

 {
    firstName: "Jane",
    lastName: "Doe",
    email: "[email protected]"
  }

This information allows Akorda to properly send emails on behalf of the user.

Use a Proxy

The best way to integrate Akorda Assembly is to use a server-side proxy that will avoid the challenges associated with cross-origin requests from the browser and keep your accessToken away from your client-side code.

For example, when the user loads your web page, your server could obtain a JWT access token using the Akorda provided client credentials (client_id and client_secret), and then return the page with a cookie (named Authorization) that has the JWT access token as the value.

Then, when your client code calls AkordaAssembly(playbookId, config), omit the appUrl and the accessToken from the config object. By omitting these, all data requests will be sent to your server instead of Akorda's application.

Next, proxy the Akorda API calls (they all start with "/api") along with the authorization cookie to the Akorda application url (e.g., https://app.akorda.com).

An example/reference implementation (built using a simple NodeJS Express web app) is available here: https://github.com/akordacorp/assembly-reference-implementation.

And if you need help, don't hesitate to contact your Akorda representative.