↓ Skip to main content
Four isometric platforms rising in a staircase, joined by three ramps, carrying crates, two machines, a stepped tower and one open box

The Graphite MAF Architecture Overview

People meet Maximo Mobile through one file and assume the rest is more of the same. Then a build fails, and the message names a package they have never heard of. The framework has four layers, each owning a different kind of problem. Knowing which layer you are standing in is most of the work of fixing anything.

MAS 9.2 series framework 3.2.x fifteen packages

Everything on this page comes from a 9.2-series install on our test system: the package manifests in the Application Configuration container, as oc shows them to an administrator, and the apps IBM ships with it. IBM releases about once a month, so the versions move and the shape is the durable part.

The four layers
#

d2 diagram d2 diagram

The four layers, bottom to top. A problem belongs to exactly one of them, and the layer decides which tool can see it.

Read that stack as four questions. What is installed, what turns your source into an application, what that application is made of at runtime, and where your own code may live. The rest of this page takes them one at a time.

Layer one: the packages, and which way they point
#

The container carries fifteen folders under @maximo, and our companion post Overview of the @maximo Packages names each one and says when you meet it. This section answers a different question, which is how they hold each other up.

Sort them by version number and three families fall out.

FamilyVersion linePackages
The framework3.2.xmaximo-js-api, react-components, app-processor, maximo-library, map-component, commonlib, graphite-common-solution-components
The tools4.xgraphite-cli, maxdev-cli, eslint-plugin-graphite
The MAS platform9.2.xconfig-server, graphite-common, mas-common, mas-common-ui

The version line tells you who ships a package and on what schedule, so a 3.2.x package moves with the framework while a 9.2.x package moves with Maximo Application Suite itself. The tools sit on their own line because they are versioned as products. The CLI is in its 4.x line while the framework it builds is in the 3.2.x line. One package, treegrid, carries a 0.0.x version and belongs to none of the three families.

Six packages depend on nothing else in the family, and only one of them carries weight. Run the loop below in the container, and commonlib, eslint-plugin-graphite, graphite-cli, mas-common-ui, maximo-js-api and maximo-library come back with no @maximo dependency. Five of them sit at the edge: a command line tool, a lint plugin, a shared runtime and two libraries, and at most one other package builds on each. The sixth is maximo-js-api, and five packages sit directly on top of it. That makes it the root of the framework, and it is why a stack trace from a failing datasource so often ends there.

The folder itself, as an administrator sees it with oc on our test system. The pod name carries a suffix that differs on every install:

oc -n mas-<instance>-core exec <instance>-graphite-configuration-<suffix> -- ls /graphite/node_modules/@maximo
app-processor
commonlib
config-server
eslint-plugin-graphite
graphite-cli
graphite-common
graphite-common-solution-components
map-component
mas-common
mas-common-ui
maxdev-cli
maximo-js-api
maximo-library
react-components
treegrid
# the dependency direction, run inside the same pod (oc exec … -- sh)
cd /graphite/node_modules/@maximo
for d in */; do
  node -e "const j=require('./$d/package.json');
    const m=Object.keys({...j.dependencies,...j.peerDependencies})
      .filter(k=>k.startsWith('@maximo/'));
    console.log('$d', m.length ? m.join(' ') : '(no @maximo deps)')"
done

Two results from that run are worth keeping.

The shipped apps agree almost perfectly on what they need. Nearly all of them declare the same five packages, which are maximo-js-api, react-components, app-processor, graphite-cli and maxdev-cli. Beyond those five the agreement stops: maximo-library appears in many manifests and map-component in only a few.

One app declares nothing. LOGIN has no dependencies block and no lockfile, and it still ships an app.xml, a controller, and the same two build commands as every other app. It resolves its packages from the environment it is built in, because the container already holds them. The lesson generalises: a manifest describes what an app asks for, and the container decides what it gets.

One name crosses the families. react-components, a 3.2.x package, declares @maximo/mas-common-ui from the 9.2.x line, so the element library rests on a piece of the MAS platform. The container carries it, and it has no @maximo dependency of its own.

Layer two: the build, and why it runs twice
#

Your source is XML and JavaScript, a browser loads neither, and two separate programs stand between them in a fixed order.

First, maxdev-cli compiles the markup. It reads src/app.xml, checks every element against the registry, and writes React source into build/app/src/. That output is one component per page, one per dialog, plus the application bootstrap. Your controllers are copied across untouched, and every shipped app calls this step by the same command.

Second, graphite-cli bundles that generated React. It runs Vite, which uses esbuild for the fast conversion and Rollup for the production bundle. The output lands in build/app/build/ with content-hashed filenames, and that directory is what gets zipped and uploaded.

The confusing part is what the second command is called: in almost every shipped app the production script says react-scripts build, and react-scripts is not installed anywhere. IBM registered graphite-cli under that second name, so the old Create React App command now runs Vite. A few apps skip the alias, TIMESHEET and MAFOFFLINECACHE among them. They call graphite-cli build directly and behave identically.

The two build steps, in their fixed order The two build steps, in their fixed order
The two build steps, in their fixed order

This matters the moment a build breaks. An error about an unknown element or a bad attribute comes from the first step, and the fix is in your app.xml. An error about modules, chunks or memory comes from the second, and the fix is in the tooling or the environment.

Layer three: the runtime objects
#

What the browser finally loads is an object graph, it is smaller than it looks, and three classes carry almost everything.

Application is the root, and there is exactly one. It holds the services, the global state and the page list. Page is a screen, and it owns navigation, its dialogs and its child pages. View sits under both, and it contributes state, URL parameters and labels. The chain runs in that order, so an Application is a Page, and a Page is a View. Every method you have seen on an app exists because of where it sits in that chain.

Beside them sits the data half. A Datasource holds items, selection, sorting and the unsaved-change flag, and it delegates every read and write to a DataAdapter. Three adapters ship:

  • One talks to Maximo over REST.
  • One serves static JSON.
  • One reads the local database on a device and queues changes for sync.

Swapping the adapter is how the same application code runs online in a browser tab and offline on a phone.

State is observable through MobX, so when a datasource loads rows, the components reading those rows re-render on their own and nothing in your code asks them to.

Layer four: the seat left empty for you
#

The fourth layer is one file, AppCustomizations.js, and the framework registers it by name alone, so there is no tag to write and no import to add.

Two properties make it the safe place for your code. It is checked last when the framework resolves a method, so it sees what the app did before it. It also decorates, which means that if you define a method an IBM controller already defines, both of them run, with IBM’s first.

The observation that makes the point: none of the shipped apps contains an AppCustomizations.js, and the seat is empty in every one of them because the seat is yours. That is also the reason an upgrade leaves your work in place, since your code never sat in a file IBM overwrites.

Which layer is your problem in
#

The symptomThe layerWhere to look
A package name in a stack trace you do not recogniseonethe manifests and the dependency direction
An unknown element or a rejected attributetwo, first stepyour app.xml
Chunks, modules, memory, a bundle that will not finishtwo, second stepthe tooling and the build environment
A datasource holds the wrong rows, or a screen fails to refreshthreethe datasource and its adapter
Your own method runs twice, or never runs at allfourthe resolution order in AppCustomizations.js

What to read next#