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. BigLedger creates your applet’s registration record: the routes that write one into the platform registry answer only a BigLedger platform administrator or a holder of a platform applet permission. Getting Started, Step 7 lists the values to send, among them the bundle URL, the element tag and the route prefix above, a name, a short code and the permission codes your applet needs. Ask by opening an issue at BigLedger-Support/public.
The shared applet chrome is published, but only in an Angular 11 form. The page layout, sidebar, settings, permission and personalization screens BigLedger’s own applets wear ship inside blg-akaun-ng-lib on public npm, which an applet on Angular 12 or later cannot install cleanly (Applet Structure › Known limits says why). Plan to build your own unless you are on Angular 11. 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 and a copy of the shared applet chromenpmPublic, MIT — Angular 11 peers only
The API hosthttps://api.akaun.com/Public
The shellhttps://akaun.com/Public, sign-in required

Related documentation

Last updated on