Modules (NXM)
Customer area
The firm's clients sign in on its web address and see their own records. How a package declares the area, what clients may read and do, how its pages are written, and how staff invite people.
The clients of an insurance broker want to see their contracts and their open tasks, report a claim and send a document. The owners of a holiday home want to see their bookings. A package gives them a customer area: they sign in on the firm’s own web address, under /konto, and see exactly the records the package shares with them.
These people are members, not users of nexxus. They never see the app, never appear among the tenant’s people, and reach only what the package declares for them. Each member belongs to one record of the package, their scope record (their firm, their property), and reads only records that lead to it.
Staff invite
On the scope record's page, tab Client area, or through the AI Assistant.
Link by e-mail
Valid 7 days, once. No password; later sign-ins get a new link.
The area
The portal's header with tabs, below it the views of the package.
Checked on the server
Every call: the member's role, their scope record, the fields they may see.
Veyra, a package for commercial insurance brokers, is the example on this page: its clients are firms, and each firm’s management, administration and facilities staff get their own view of the firm’s contracts, obligations and claims.
Before you start
Section titled “Before you start”The customer area is part of the package’s customer portal, so four things must be in place before anyone can sign in:
- The package has a portal.
portalwithpublicandpages, even if the public website is small.membersgoes into the same section. - The tenant has a portal domain. Only a superadmin adds one, under SettingsCompanyTenants. Sign-in links point to it. A development tenant has one from the start.
- The package is the tenant’s portal. A tenant has one portal; with two packages that bring one, the one installed first is the site.
- The administrator agreed to
portal:memberswhen installing. The install dialog says in one sentence who signs in, which data they see and what they may do. An update that changes it asks again.
The invitation and sign-in links go out by e-mail, so the tenant needs a working mail server too.
Declare an audience
Section titled “Declare an audience”An audience is one kind of member, such as the clients of a broker. Most packages have one. It lives under portal.members:
"members": { "kunde": { "label": { "de": "Kundenbereich", "en": "Client area" }, "scope": "firma", "start": "konto.start", "records": { "firma": { "fields": ["name", "ampel", "pflichten_offen", "naechste_frist"] }, "vertrag": { "via": "firma", "filter": { "status": ["aktiv", "gekuendigt"] }, "fields": ["titel", "sparte", "versicherer", "ablauf", "praemie", "dokument"] }, "klausel": { "via": "vertrag.firma", "fields": ["titel", "art", "fundstelle", "seite", "zitat"] }, "webanfrage": { "via": "firma", "fields": ["titel", "nachricht", "status", "eingang_am"], "create": { "fields": ["titel", "nachricht"], "required": ["nachricht"], "set": { "status": "neu", "eingang_am": "$now", "name": "{{member.name}}" } } } }, "views": ["konto.start", "konto.vertraege", "konto.anfragen"], "actions": ["nachweis-einreichen"], "uploads": { "folder": ["Kundenbereich", "{{scope.title}}"], "maxMb": 20 }, "roles": { "leitung": { "label": { "de": "Geschäftsführung", "en": "Management" }, "admin": true, "secondFactor": true }, "technik": { "label": { "de": "Technik", "en": "Facilities" }, "records": ["firma", "vertrag", "klausel"], "views": ["konto.start", "konto.vertraege"], "actions": ["nachweis-einreichen"] } } }}| Key | Meaning |
|---|---|
label | The name of the area, in the install dialog and the staff tab |
scope | The entity a member belongs to. Every member is invited to one record of it |
start | The view a member sees after signing in. It is one of views |
records | The only entities and fields members read, see below |
views | The pages of the area: custom views with "slot": "member" |
actions | Actions members may run, see below |
uploads | Optional: members may upload files. folder is where they land in Files, maxMb 1 to 50 (default 20) |
roles | At least one. label, optional admin, secondFactor, and subsets of the audience’s records, views and actions |
What a member reads
Section titled “What a member reads”records lists, per entity, the fields a member may see. Nothing else of the package reaches them.
- The scope entity has no
via: a member reads exactly their own scope record. - Every other entity names
via, a path of one to three references from the entity to the scope entity."via": "firma"means “the contract’s firm”;"via": "vertrag.firma"means “the clause’s contract, and its firm”. A member reads a record when that path ends at their scope record. filter(optional) narrows it further, on indexed fields, as in the public part of the portal: only active and cancelled contracts, for example. Along a longer path the filters of every entity on the way apply too, so the clauses of a draft contract stay hidden when drafts do.- A reference to another entity of the package reads as
{id, label}, and that entity must be inrecordstoo. A reference to a document reads as{id, name, type, size}; to a user or contact as{label}, the name only.jsonfields are never shared.
What a member creates
Section titled “What a member creates”With create, members may create records of that entity: an enquiry, a claim. fields are the fields they fill in (a subset of the fields they read), required the ones they must fill, and set what nexxus sets itself: literals, $now, $today, and {{member.name}} or {{member.email}} in text fields. A one-step via is filled in by nexxus with the member’s scope record. A document field with accept takes only documents of those types here too.
A member creates at most 10 records a minute and 50 a day, counted over all entities and including the actions that create a record, because every new record raises an event for the package’s service. Beyond that nexxus answers 429 TOO_MANY and tells the member when it works again, for example You created 10 entries in the last minute. Please wait a minute before you create the next one.
What a member does
Section titled “What a member does”actions names actions of type update, create or service on entities in records, such as “submit proof” on an obligation. Mail actions and core actions are not allowed. A service action runs as usual, but its own result never reaches the member: they get the changed record and whether the service took the work on.
Every member has one role of their audience. A role without records, views or actions gets everything the audience declares; with them, the subset it names. Two flags:
admin: true: the member manages the colleagues of their scope record themselves: invites them, changes their role, blocks them.secondFactor: true: sign-in needs a code from an authenticator app as well. The member sets it up at the first sign-in.
The pages: member views
Section titled “The pages: member views”Every page of the area is a custom view of the package:
{ "key": "konto.vertraege", "type": "custom", "slot": "member", "html": "ui/konto-vertraege.html", "label": { "de": "Verträge", "en": "Contracts" }, "icon": "description" }A member view has no target and never appears in menu. The portal draws the frame around it: a header with the firm’s logo, the member’s scope record and the area’s name, who is signed in with their role, Sign out, and the role’s views as tabs, in the order of views. Your view draws the content below it, nothing else: no header, no tabs, no sign-out. The area is always light, in the portal’s colours from the tenant’s branding. For layout, see Look and feel.
Context
Section titled “Context”await nx.ready() returns user: null and instead:
| Field | Meaning |
|---|---|
member | {id, name, email, role: {key, label}, admin}: who is signed in |
scope | {entity, id, title}: their scope record, e.g. their firm |
firm | {name}: the firm whose portal this is |
views | [{key, label, icon}]: the role’s views, the portal’s tabs |
start | The role’s start view |
can | {read, create, actions, upload}: the entities the role reads and creates, its action keys, and whether it may upload |
params | {id} when the page was opened for one record, /konto/<view>?id=12 |
A view that serves several roles draws only what can names, instead of trying a call and catching the error:
const ctx = await nx.ready();if (ctx.can.create.includes('webanfrage')) showEnquiryButton();if (ctx.can.upload) showUploadField();| Call | In a member view |
|---|---|
nx.records.search(entity, {q?, filter?, sort?, from?, size?}), nx.records.get(entity, id) | The role’s fields only. filter and sort on indexed fields, q on the title field, size up to 100 |
nx.records.create(entity, data) | Entities with create, with the create fields |
nx.invoke(action, {recordId?, payload?, successToast?}) | The role’s actions; answers {result: null, record, accepted} |
nx.files.upload(file, {name?}) | A file from your own <input type="file"> or a drop; answers {id, name, type, size}. Only with uploads; TOO_LARGE above maxMb |
nx.documents.open(documentId, {page?}) | Right after a click: the file in a new tab, a PDF at the page |
nx.nav.open({view}), nx.nav.open({view, id}) | Another page of the role, or the same one for another record |
nx.members.list(), .invite({email, name, role, locale?}), .setRole(id, role), .block(id), .unblock(id) | Admin members only: their colleagues |
nx.member.signOut() | Ends the session; the portal shows its sign-in page |
nx.ui.toast, nx.ui.confirm, nx.images.url, nx.t, nx.chart, nx.table | As in every view; the confirmation is the portal’s own dialog |
nx.records.update and nx.records.remove, nx.lookup, nx.storage, nx.assistant, nx.pdf, nx.links, nx.form, nx.dialog and nx.ui.copy answer NOT_AVAILABLE here. A member changes records only through actions. The member calls (nx.files.upload with {name} only, nx.documents, nx.members, nx.member) answer NOT_AVAILABLE in every other kind of view.
A record a member may not read answers NOT_FOUND, never FORBIDDEN, so nothing tells them it exists. When the session ends, or the authenticator code is due, the portal replaces your view with its sign-in page and brings the member back to the same page afterwards. When the member’s sponsor (below) has left, the portal shows its page Access closed.
A start page in a few lines
Section titled “A start page in a few lines”<!doctype html><html><head> <meta charset="utf-8"> <style> main { max-width: 1160px; margin: 0 auto; padding: 24px 16px; display: grid; gap: 16px; } @media (min-width: 744px) { main { padding: 24px; } } @media (min-width: 1128px) { main { padding: 32px 40px; } } </style></head><body> <main> <h1 class="nx-title" id="hello"></h1> <section class="nx-card"><h2 class="nx-card__title" id="due-title"></h2><div class="nx-rows" id="due"></div></section> </main> <script> (async () => { const ctx = await nx.ready(); document.getElementById('hello').textContent = nx.t({de: `Guten Tag, ${ctx.member.name}`, en: `Hello, ${ctx.member.name}`}); document.getElementById('due-title').textContent = nx.t({de: 'Offene Pflichten', en: 'Open obligations'}); const {items} = await nx.records.search('pflicht', {filter: {status: 'offen'}, sort: 'faellig_am', size: 10}); for (const p of items) { const row = document.createElement('button'); row.type = 'button'; row.className = 'nx-entity-row'; row.textContent = p.data.titel; row.onclick = () => nx.nav.open({view: 'konto.aufgaben', id: p.id}); document.getElementById('due').append(row); } })(); </script></body></html>How staff invite people
Section titled “How staff invite people”A person who may change the scope record invites someone on its page, tab Client area (one section per audience): Invite a person with Name, E-mail, Role and Language (German, English or Polish, for the mails and the area). The AI Assistant can propose an invitation too, and runs it once the person confirmed.
That staff person becomes the member’s sponsor. A member acts through their sponsor: every read needs the sponsor’s right to read, every create and action runs with the sponsor’s rights, and the record’s history shows the sponsor. The module log names the member. If the sponsor leaves the firm or loses the right, the member’s access rests until someone else uses Take over responsibility. An admin member who invites a colleague passes on their own sponsor.
The tab also offers, per member: Change role, Send the invitation again or Send a sign-in link, Reset authenticator (after a new phone), Block and Unblock, and Remove access. What a removed member uploaded or created stays.
Sign-in and security
Section titled “Sign-in and security”- No password. The invitation link is valid for 7 days and works once. Later, the member enters their address at
/kontoand gets a link valid for 15 minutes. The answer is the same whether the address is known or not. - The session ends after 30 days, or after 7 days without use, on sign-out, or when the member is blocked or removed.
- One address, one scope record per package: a person who works for two of the broker’s client firms needs two addresses for now.
- Uploads land in the folder
uploads.folderin Files, owned by the sponsor, at most 50 per member a day. Once a record names such a file, every person in the tenant who may read that record can open it, not only the sponsor. A file no record names stays with the sponsor.
Trying it
Section titled “Trying it”A development tenant has a portal address of its own, so you can try the area with a real sign-in, without a mail server. On the scope record’s page, tab Client area, View as client opens the area in a new tab, signed in as the test access of that record; with more than one role, pick the role from its menu. Claude Code does the same with nxm open --member: it takes the newest record and the first role without an authenticator code, unless you name them with --record, --role and --audience.
The test access is a member like any other. It appears in the list on the tab with the address test-<audience>-<record>@<portal address>, and you are its sponsor. Each time you open it, it is signed in again with the role you picked, and older sign-in links stop working. Invitations by e-mail still reach nobody, because the tenant has no mail server.
A scratch tenant has no portal address. There, nxm validate and nxm apply still check the whole members section against the same rules, and the staff tab shows why the area is closed.
Not built yet: narrowing a role by a second reference (one location of a firm), a sign-in page of the package’s own, an AI Assistant for members, mails to members other than the sign-in, staff looking at the area as a member outside a development tenant, and the PDF viewer with highlights (nx.documents.open opens the file in the browser’s own viewer instead).
When something goes wrong
Section titled “When something goes wrong”In the staff tab Client area:
| Message | Cause and fix |
|---|---|
| “The client area is closed: this package is not the tenant’s portal. Nobody can sign in.” | Another package is the tenant’s site. Only one package per tenant has a portal |
| “The client area is closed: it was not approved when the package was installed. Nobody can sign in.” | The administrator did not agree to portal:members. An administrator gives that consent in the install dialog of the package, see Consent at install |
| “The client area is closed: the tenant has no portal domain. A superadmin adds one under Settings › Tenants.” | As it says |
| “This e-mail address already has access.” | The address is already a member in this package, for another scope record |