Skip to content

Mattrax Enterprise Overview

Mattrax Enterprise is the organization-scoped management product for enrolling devices, organizing them into groups, and applying policy configurations. The Enterprise API is implemented by packages/enterprise-backend/ and defined by packages/enterprise-domain/.

Core Concepts

ConceptMeaning
TenantAn organization boundary. Devices, groups, policies, APNs configuration, users, billing, and enrollments belong to a tenant.
UserA signed-in person using Mattrax Enterprise. A user can belong to one or more tenants.
Tenant memberThe relationship between a user and a tenant. The member role controls what the user can do.
InvitationA pending tenant membership invite sent to an email address.
EnrollmentA tenant-owned enrollment entry that controls which platforms can enroll and whether a code is required.
DeviceA managed endpoint enrolled into a tenant. Devices can be Apple, Windows, or Android.
GroupA collection that links devices and policies. Groups are how policies are assigned to devices.
PolicyA named management intent containing one or more configurations.
ConfigurationA typed payload inside a policy. Each configuration is stored by kind and contains platform-specific management data.
APNsThe Apple Push Notification service certificate and topic for a tenant. Required for Apple device management.
BillingThe tenant billing summary, including plan, subscription status, and billable enrolled device count.

Tenants

A tenant is the top-level Enterprise boundary. Most API routes are scoped by tenantId, and the backend checks that the current user is a member of that tenant before returning data.

Tenant records include:

FieldPurpose
idStable tenant identifier used in API paths.
nameDisplay name.
slugURL-friendly tenant name.
logoOptional tenant logo.
metadataOptional tenant metadata.
roleCurrent user's role in the tenant.

Write operations require an owner or admin role. Tenant deletion requires owner and is blocked when the tenant still has more than one user.

Users, Members, And Invitations

Users authenticate with the platform, then access tenants through memberships. A member has a role string such as owner, admin, or member.

Tenant admins can:

ActionDescription
List usersView tenant members.
Invite usersCreate invitations for email addresses.
List invitationsView pending or historical invitations.
Cancel invitationsRevoke an invitation before it is accepted.
Change rolesUpdate a member role.
Remove usersRemove a member, as long as they are not the last tenant user.

Enrollments

An enrollment controls how new devices join a tenant. It can require a code, limit the number of devices, and enable or disable platform-specific enrollment.

Enrollment settings include:

SettingMeaning
codeOptional code required before returning authenticated enrollment options.
enabledAppleAllows Apple enrollment when true.
enabledWindowsAllows Windows enrollment when true.
enabledAndroidAllows Android enrollment when true.
enabledAssetTagAllows asset tag collection during enrollment when true.
maxDevicesMaximum devices allowed for the enrollment.

For Apple enrollment, the tenant must also have APNs configured. If APNs is missing, the enrollment response returns an Apple-specific error instead of a profile.

Devices

A device is an enrolled endpoint in a tenant. Devices have a protocol, lifecycle status, inventory fields, and editable operator fields.

Supported device protocols are:

ProtocolMeaning
appleApple MDM device.
winWindows device.
androidAndroid device.

Device statuses are:

StatusMeaning
enrollingDevice has started enrollment.
enrolledDevice is actively managed.
unenrollingTenant has requested unenrollment.
unenrolledDevice is no longer actively managed.

Operators can update device name, notes, and assetTag. Unenrolling a device sets enrolled devices to unenrolling, allowing the device management layer to complete the protocol-specific unenrollment flow.

Groups

Groups connect devices and policies. A group can contain many devices and many policies, and the same device or policy can belong to multiple groups.

Group records include:

FieldPurpose
idStable group identifier.
nameDisplay name.
notesOptional operator notes.
devicesCountCount of assigned devices when returned by list views.
policiesCountCount of assigned policies when returned by list views.
createdAt / updatedAtAudit timestamps.

Group membership updates use explicit assign and unassign lists for devices and policies. The backend validates that referenced devices and policies belong to the same tenant before changing membership.

Policies

A policy is a named management intent. Policies do not target devices directly; they become effective through group assignment.

Policy records include:

FieldPurpose
idStable policy identifier.
nameDisplay name.
notesOptional operator notes.
configurationsOptional map of configuration kind to configuration data.
createdAt / updatedAtAudit timestamps.

Policies can be created, patched, duplicated, deleted, and synced. Duplicating a policy copies its configurations to a new policy.

Configurations

A configuration is stored inside a policy by kind. The backend persists each configuration as JSON data plus a hash of that data.

Patch behavior:

InputResult
{ "someKind": { ... } }Creates or replaces the someKind configuration.
{ "someKind": null }Deletes the someKind configuration.

This lets a policy contain multiple independent configuration payloads while still updating or removing each configuration type independently.

APNs

APNs configuration belongs to a tenant and is required for Apple management. The stored APNs record includes an email address, certificate PEM, and MDM topic.

When a certificate is uploaded, the backend extracts the topic from the certificate UID when possible. If no topic is found, it falls back to a tenant-specific placeholder topic.

Search And Nodes

Enterprise exposes two generic lookup patterns:

FeatureDescription
SearchLists rows for device, group, or policy within a tenant.
Node lookupFetches a single device, group, or policy by ID.

Node lookup is used when the UI needs the detail representation for one entity. Policy node responses include configurations.

Billing

Billing is tenant-scoped. The summary includes the current plan, subscription status, subscription ID, and billable device count.

Billable devices are counted from devices in the enrolled status.