Skip to content

Elody Frontend ​

The Elody frontend is what a user sees and clicks: the listings, the detail pages, the forms, the media viewers. It is made of two parts that ship in one image:

  • The PWA: a Vue 3 single-page app. It holds no knowledge of any data model, so there is no CarDetail.vue and no WorkOrderForm.vue.
  • The GraphQL service: a Node/Express app running Apollo Server. It is built from the shared modules (baseGraphql and friends) plus the client's own queries, resolvers and translations. It tells the PWA what to render, holds the user's session, and talks to collection-api on the PWA's behalf.
browser ──▶ PWA ──/api/graphql──▶ GraphQL service ──▶ collection-api
              ▲                        │
              └── "render these fields,│
                   with these inputs"  ┘

The GraphQL service doesn't just return data. It also returns the shape of the UI. When a garage wants a fuel type on the car page, someone edits a query in its GraphQL service; nobody touches the PWA.

Where to start ​

New to the frontend? Read these in order:

  1. GraphQL-Driven UI follows one field from a query to an editable input. Everything else builds on it.
  2. Inputs & Teaser Metadata covers how an entity appears in a listing and on its detail page.
  3. Pick a feature below that you need, such as Pipeline View Mode, and enable it.
  4. Build Pipeline explains how your change gets from the repo to a running app, and why a green pipeline doesn't mean it's deployed yet.

The examples use the garage network: garages, their employees, customers, cars, parts and work orders.

Core concepts ​

PageWhat it covers
GraphQL-Driven UIHow a query describes a page; intialValues, columns, labels and writing back
Inputs & Teaser MetadataListing rows and cards, detail panels, and the input fields behind them
FormattersRendering a value as a pill, a link or a chip without changing the value
TranslationsWhere labels come from and how base and client translations merge

Page elements ​

What a detail page can hold, and how each element is configured.

PageWhat it covers
OverviewEvery element type, plus wysiwyg, comments, hierarchy, graph, Markdown and manifest elements
Window ElementMetadata panels, editing and saving
Entity Lists & BaseLibraryRelated-entity lists, library modes, view modes and overview pages
Media ElementsA mediafile's viewer and an entity's mediafiles
MapsWKT, heat and point maps, as an element and as a view mode

Features ​

Each feature page says what the feature does, and then how a client turns it on.

Lists & views

PageWhat it covers
List Item Click ActionsNavigate, preview, open in a modal, or do nothing on click
Pipeline View ModeA list laid out as a left-to-right flow along relations
Rounded CountsCapped result counts, shown as 1,000+ with an exact count on demand
Bulk EditChange metadata and relations on many entities at once
Merge EntitiesTurn two duplicate records into one

Detail pages

PageWhat it covers
Relation PillsA related entity as a pill, with the relation's own metadata inside it
Comments & ThreadsThreaded discussions on an entity, with @ and # tagging
History ViewerTwo versions of an entity side by side, with every change marked

Media

PageWhat it covers
Media ViewersThe IIIF, audio, video, PDF and text viewers, picked by mimetype
External URL MediafilesA mediafile that stands in for a link instead of a stored file
Embedded ViewerA chrome-less IIIF viewer other sites can put in an <iframe>

Data exchange

PageWhat it covers
Linked Open DataEvery entity URL returns RDF when it is asked for it

Security ​

PageWhat it covers
Auth & SessionOIDC login, server-side tokens and refresh, route guards, whitelisting
UI PermissionsHiding config a user may not use, and how that relates to the backend policies

GraphQL service ​

PageWhat it covers
GraphQL ModulesHow base-graphql and the shared modules combine into a client's service, and what each module adds
GraphQL Service API ReferenceEvery HTTP endpoint of the GraphQL service, with request and response examples
Proxy Endpoints/api/... endpoints for files, streams and exports that don't fit in GraphQL

Build & deploy ​

PageWhat it covers
Build PipelineThe three pipelines, Nexus releases, codegen, and what to rebuild after a change
Production ServingOne Express process serving both the PWA and the GraphQL API
Dynamic Tailwind ClassesWhy runtime-built class names work locally and break once deployed

Powered by Elody - Open Source Semantic Data Platform