ores.web

Table of Contents

1. Diagram

ores.web component diagram

Figure 1: ores.web

2. Summary

ores.web is the browser interface for ORE Studio. It replaces the removed Qt desktop client. A browser cannot present a NATS client certificate on a WebSocket, so the component pairs a React client with a Fastify backend-for-frontend (BFF) that owns the mTLS connection to the broker.

The component is a TypeScript project. It has no C++ parts and no compiled CMake target. The four npm packages under packages/ are its structure: bff, contracts, web, and wire-protocol. It builds with npm ci and npm run build from the component root.

3. Inputs

  • The checkout .env, through ORES_WEB_* for the process settings and ORES_NATS_* for the broker.
  • The site configuration in config/environments.json, or the file named by ORES_WEB_SITE_CONFIG. It declares the environments, the active environment, the developer surface, and the ACME test accounts.
  • NATS responses over mTLS from ores.iam.service, ores.refdata.service, and the other domain services.
  • Change notifications that the services publish on their event subjects.
  • The org models under projects/ores.*/modeling/, which ores.codegen renders into the TypeScript protocol and domain types. The generated tree is committed.
  • Browser requests on the /api HTTP surface.

4. Outputs

  • The built browser bundle in packages/web/dist. The BFF serves it on ORES_WEB_PORT.
  • The /api HTTP surface on the same port.
  • NATS requests and subscriptions that the BFF sends on behalf of the browser.
  • A first-party session cookie that holds an opaque session identifier. The token stays in the BFF, and the browser never receives it.
  • Generated TypeScript in packages/wire-protocol/src/generated/.

5. Entry points

  • projects/ores.web/README.md — component overview and operator instructions.
  • projects/ores.web/packages/bff/src/main.ts — the BFF process entry point.
  • projects/ores.web/packages/bff/src/server.ts — the Fastify HTTP surface and the static browser bundle.
  • projects/ores.web/packages/web/src/main.tsx — the React browser entry point.
  • projects/ores.web/package.json — the workspace scripts: build, test, typecheck, verify:login, and seed:account.

6. Dependencies

  • ores.iam.service — authentication, sessions, accounts, and change reasons.
  • ores.refdata.service — reference data such as countries.
  • The other domain services that the browser reaches through the BFF.
  • ores.codegen — the generator that renders the TypeScript protocol and domain types from the org models.
  • Node.js 22 or later.
  • Third-party libraries: Fastify, React, React Router, TanStack Query, NATS.js, @msgpack/msgpack, Zod, Vite, Tailwind CSS, and Vitest.
  • The component links no C++ library, because it has no C++ parts.

7. See also

Emacs 29.3 (Org mode 9.6.15)