Skip to content
Applet Development

Applet Development

An applet is a self-contained web application that the BigLedger shell loads at runtime and mounts inside its own page. Almost every screen a BigLedger user sees is an applet: Chart of Account, Sales Invoice, Cashbook, Point of Sale. They are built, versioned and released independently of the platform, and of each other.

This section documents how to build one.

What an applet actually is

Three things, and nothing else:

  1. A JavaScript bundle served from any HTTPS URL a browser can reach. It defines one custom element.
  2. A registration record held by BigLedger, which tells the shell the bundle’s URL, the element name to mount, and the route to mount it at.
  3. A contract about session state. The shell puts the tenant code, the signed-in user’s token and a per-launch instance number into browser storage before it loads your bundle. Your applet reads them from there.

Everything else — framework, state management, styling, build tooling — is your choice, with one practical constraint: the official client library is an Angular library, so applets that use it are Angular applications.

The runtime contract

These are the four points where your code and the platform have to agree exactly. Get any one of them wrong and the applet loads but never appears.

#ContractWhere it lives in your codeWhere it lives in the registration
1Bundle URLyour hostingES Module Url
2Custom element namecustomElements.define(...) in your root moduleCustom Element Tag
3Route prefixthe path of your top-level routeApplet Router
4Session keyssessionStorage / localStorage readsset by the shell, not configurable

Applet Structure documents each one in full.

What you need from BigLedger

Two steps in the path are not self-service. Plan for them before you start building.

Registration is a hand-off. The registration record lives in BigLedger’s platform registry and is created through an internal administration applet. You cannot create it yourself, and no public API issues one. When your bundle is built and hosted, send BigLedger the four contract values above plus an applet name, a two-character short code and the permission codes your applet needs. Ask at developers@bigledger.com.
The shared applet chrome is not published. BigLedger’s own applets import a shared internal Angular library for their page layout, sidebar, settings screens, permission screens and grid helpers. That library is not on npm and not publicly readable. An external applet builds its own equivalents, or does without them. Nothing in this section depends on it.

What is public

ThingWhereStatus
blg-akaun-ts-lib — the API client librarynpmPublic, MIT
blg-akaun-ng-lib — Angular UI components used by appletsnpmPublic, MIT
The API hosthttps://api.akaun.com/Public
The shellhttps://akaun.com/Public, sign-in required

Related documentation

Last updated on