Developers
A platform for law-firm software, with the rules in the code.
To a developer, Lumilex is a small operating system for a law firm: a core of shared records — matters, clients, people, the calendar, documents, time and invoices — and apps on top of it. The firm’s own screens are apps; so is the software its developer writes, and so is software from outside.
Every app reaches the records the same way, and the database’s row-level security decides the rows. For an app a firm installs, a partner’s approval decides the scopes, and the app sends nothing out of the firm beyond what that approval named. The core’s own mail — billing statements and staff notifications — goes out through Resend.
- The public API
- A firm’s own software reads and updates its records through
/api/v1, described in an OpenAPI file. Every call acts as the app’s own account under the same row-level security as a person, at the access level a partner approved — lawyer, finance or admin, never partner — and only within the scopes the partner approved. - lib/api/v1/with-api.ts →
- One set of functions
- Each
/api/v1handler for the firm’s records — matters, clients, deliverables, tasks, time, invoices, files — is a one-line adapter ontolib/core, the functions the firm’s own screens are moving onto one by one — Tasks already has. Both callers get the same scopes, and core adds no service role: the database decides the rows for each. - lib/core/context.ts →
- API keys
- A key is shown once and stored only as a hash. It expires within a year, can be rotated with a day’s overlap and is revoked at once. Each key is held to 600 calls a minute by default, and a write retried with the same
Idempotency-Keyruns once. - lib/api/tokens.ts →
- Signed webhooks and the event feed
- Events are signed to the Standard Webhooks scheme and sent only to hosts a partner approved, over HTTPS, never to a private address. Each delivery is decided again when it is sent: if the app could not read the record, nothing goes. Payloads carry ids, the names of changed fields and, for a status, its old and new value — never names, amounts or free text. The same events can be read from a pull feed.
- lib/webhooks/deliver.ts →
- Connected apps over OAuth
- Outside software describes itself in a manifest at its own HTTPS address and is authorized with OAuth 2: an authorization code with PKCE, the app proving itself with a signed assertion (
private_key_jwt, Ed25519 only). A code or refresh token used twice revokes everything issued from it. A person can also connect an app for themselves; it then sees what they see, and nothing once they leave. - lib/oauth/authorize.ts →
- Panels and actions on a record’s page
- An app can place a panel — its page in a sandboxed frame — or a button on a matter, client, deliverable, company, mark or case. It receives a context the instance signs for one record the person has already opened, good for five minutes, and trades it for a five-minute, read-only token that acts as that person and reaches only that record.
- lib/apps/context-token.ts →
- Agents that file suggestions
- An app’s agents can suggest a task or a chain of deadlines, and nothing else: autonomy is capped at propose, and there is no tier above it. A person accepts or dismisses each suggestion, and accepting runs as that person, so it does only what they could. At most 200 a day per app, and the firm can switch any agent off.
- lib/agents/app-proposals.ts →
- The catalog
- A catalog is a signed list of apps and the manifest versions a reviewer checked. Whoever runs an instance chooses which catalogs to trust and pins their Ed25519 keys. An older copy or one valid too long is refused, an install of an app it lists must match the digest listed, and by default a version the catalog revokes is suspended.
- lib/apps/catalog-verify.ts →
- Who may install
- Installing, approving, asking and removing are decided by one function, tested as a full matrix, which the Apps screen in Lumilex and every route ask again. A partner installs and an administrator asks; a partner, an administrator or, in a firm with no partner, a lawyer may remove.
- lib/apps/install-rule.ts →
01
02
03
04
05
06
07
08
09
Where to start.
The developer documentation — a quickstart, authentication, the manifest, OAuth, webhooks, events, panels, agents and the catalog — ships in the repository under docs/developers, with the API described in public/api/v1/openapi.json. Read it on GitHub.
Building something a firm would install, or a catalog of your own? Write to danielfordan@me.com.