Appearance
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.vueand noWorkOrderForm.vue. - The GraphQL service: a Node/Express app running Apollo Server. It is built from the shared modules (
baseGraphqland 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:
- GraphQL-Driven UI follows one field from a query to an editable input. Everything else builds on it.
- Inputs & Teaser Metadata covers how an entity appears in a listing and on its detail page.
- Pick a feature below that you need, such as Pipeline View Mode, and enable it.
- 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
| Page | What it covers |
|---|---|
| GraphQL-Driven UI | How a query describes a page; intialValues, columns, labels and writing back |
| Inputs & Teaser Metadata | Listing rows and cards, detail panels, and the input fields behind them |
| Formatters | Rendering a value as a pill, a link or a chip without changing the value |
| Translations | Where labels come from and how base and client translations merge |
Page elements
What a detail page can hold, and how each element is configured.
| Page | What it covers |
|---|---|
| Overview | Every element type, plus wysiwyg, comments, hierarchy, graph, Markdown and manifest elements |
| Window Element | Metadata panels, editing and saving |
| Entity Lists & BaseLibrary | Related-entity lists, library modes, view modes and overview pages |
| Media Elements | A mediafile's viewer and an entity's mediafiles |
| Maps | WKT, 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
| Page | What it covers |
|---|---|
| List Item Click Actions | Navigate, preview, open in a modal, or do nothing on click |
| Pipeline View Mode | A list laid out as a left-to-right flow along relations |
| Rounded Counts | Capped result counts, shown as 1,000+ with an exact count on demand |
| Bulk Edit | Change metadata and relations on many entities at once |
| Merge Entities | Turn two duplicate records into one |
Detail pages
| Page | What it covers |
|---|---|
| Relation Pills | A related entity as a pill, with the relation's own metadata inside it |
| Comments & Threads | Threaded discussions on an entity, with @ and # tagging |
| History Viewer | Two versions of an entity side by side, with every change marked |
Media
| Page | What it covers |
|---|---|
| Media Viewers | The IIIF, audio, video, PDF and text viewers, picked by mimetype |
| External URL Mediafiles | A mediafile that stands in for a link instead of a stored file |
| Embedded Viewer | A chrome-less IIIF viewer other sites can put in an <iframe> |
Data exchange
| Page | What it covers |
|---|---|
| Linked Open Data | Every entity URL returns RDF when it is asked for it |
Security
| Page | What it covers |
|---|---|
| Auth & Session | OIDC login, server-side tokens and refresh, route guards, whitelisting |
| UI Permissions | Hiding config a user may not use, and how that relates to the backend policies |
GraphQL service
| Page | What it covers |
|---|---|
| GraphQL Modules | How base-graphql and the shared modules combine into a client's service, and what each module adds |
| GraphQL Service API Reference | Every 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
| Page | What it covers |
|---|---|
| Build Pipeline | The three pipelines, Nexus releases, codegen, and what to rebuild after a change |
| Production Serving | One Express process serving both the PWA and the GraphQL API |
| Dynamic Tailwind Classes | Why runtime-built class names work locally and break once deployed |