Skip to content

Architecture#

Empowerment Center 8 is a web application: users work with a browser and everything is calculated on the server. This page describes the parts that make up an installation, what each one stores and how a request travels, so that you can decide where to install each thing and what to protect.

The parts#

What is installed Installation with Docker Compose: only the nginx frontend publishes a port and receives the HTTPS traffic; it routes the backend paths, and the backend uses the own database with PostGIS and, by profile, Chromium and Valhalla, and goes out to the client databases, the organization's SMTP and the identity provider. DOCKER COMPOSE (INTERNAL NETWORK) HTTPS /api/ · /embed/ · /.well-known/… · SSO DevTools opens the document Browsers, host applications, clients of the API and the MCP ONLY PUBLISHED PORT Frontend (nginx) :8080 the web application and the proxy Backend (Spring Boot) :8080 Chromium :9222 render profile not published Own DB PostgreSQL 18 + PostGIS db-data volume Valhalla :8002 routing profile routing-data volume Client databases Oracle, SQL Server, PostgreSQL Organization's SMTP Identity provider OIDC/SAML TLS on the frontend or on a proxy in front Public entry Internal network Leaves the installation Optional, by profile
What is installed Installation with Docker Compose: only the nginx frontend publishes a port and receives the HTTPS traffic; it routes the backend paths, and the backend uses the own database with PostGIS and, by profile, Chromium and Valhalla, and goes out to the client databases, the organization's SMTP and the identity provider. DOCKER COMPOSE (INTERNAL NETWORK) HTTPS /api/ · /embed/ · /.well-known/… · SSO DevTools opens the document Browsers, host applications, clients of the API and the MCP ONLY PUBLISHED PORT Frontend (nginx) :8080 the web application and the proxy Backend (Spring Boot) :8080 Chromium :9222 render profile not published Own DB PostgreSQL 18 + PostGIS db-data volume Valhalla :8002 routing profile routing-data volume Client databases Oracle, SQL Server, PostgreSQL Organization's SMTP Identity provider OIDC/SAML TLS on the frontend or on a proxy in front Public entry Internal network Leaves the installation Optional, by profile
What is installed View full size View full size

An installation has three mandatory parts (the frontend, the backend and the own database), connects to the client databases and, optionally, to other services of the organization. The figure shows the sample installation, with the own database in PostgreSQL.

Part What it is What it stores Mandatory
Frontend An unprivileged nginx that serves the web application and the manuals (under /ayuda/) and acts as a reverse proxy to the backend. It is the only thing that is published. Nothing: only the files of the web application and of the manuals, which come in its image. Yes
Backend The ECenter server, a Java 25 application. It serves the API, calculates cubes, charts, maps, forms and lists, launches scheduled tasks, sends email and keeps the audit. In memory, the jobs in progress and their results (the calculated cubes, for example). On disk, only the temporary files of external data and geographic layer uploads. Yes
Own database PostgreSQL 18 with the PostGIS and pg_trgm extensions, which is the default engine, or an Oracle 19c or later schema (see The own database in Oracle). Everything of ECenter's: metadata, users, roles and privileges, workbooks and their backups, lists, groupings, portal publications and templates, geographic layers, scheduled tasks and their history, subscriptions and alerts, service credentials (with their secrets encrypted), sessions, audit, console activity and license. Yes
Client databases The databases being analyzed: Oracle, SQL Server or PostgreSQL. They are added as connections from the application. The business data, which ECenter queries. ECenter creates work tables in them (lists, groupings, values of long conditions and external data) in the schema it is told. At least one, to have something to analyze
Mail server (SMTP) The organization's. Nothing in ECenter. No: without it no email goes out (subscriptions, data alerts, operations and scheduling notifications) and everything else works.
Headless browser A Chromium in a separate container. Nothing: each rendering starts clean. No: without it, the PDF of charts, maps and portal pages and the image of the document in the email body are not offered.
Routing engine Valhalla (self-hosted) or OpenRouteService. Valhalla keeps its road graph in its own volume. No: without it there are only radial-distance isochrones (circles) and no time and distance matrix.
Identity provider The organization's, through OIDC or SAML 2.0, and optionally SCIM. Nothing in ECenter, except the link between each user and their account. No: without it, users sign in with login and password.
Base map A tile or style provider for the map background, external or self-hosted. Nothing in ECenter. No: without it the layers are drawn on a plain background.

Important

The own database is the only thing you need to back up to recover an installation, together with the secrets key (ECENTER_SECRETS_KEY) and the configuration. The frontend and the backend store nothing that cannot be rebuilt from their images. See Backups and restore.

The own database, in PostgreSQL or in Oracle#

There is a single own database, with all the connections of the installation, and it can be on two engines:

Engine When it suits Where it is
PostgreSQL It is the default engine and the one of the sample installation. A PostgreSQL database for ECenter only, in the db container of deploy/compose.yaml or on a server or managed service of the organization.
Oracle When the organization has its data in Oracle and wants a single database to install, back up and monitor. An Oracle 19c or later schema, with its own user, in the same database as the data or in another one.

The engine is chosen with the URL of the own database (ECENTER_DB_URL), and the application is the same with both: the same screens, the same API and the same rules. What changes (the requirements, the maps, the audit search, the backups and the user of the connections) is in The own database in Oracle. The engine is chosen at installation and is not changed afterwards.

With the own database in the same database as the data, the ECenter user and the user of each connection are different, and the user of a connection cannot see the ECenter tables (see Preparing the database).

A single origin#

The browser only talks to the frontend. The frontend serves the web application and passes to the backend, untouched, the paths that belong to it:

Path What it is
/api/ The application API, the query API, the MCP server, SCIM and the metadata exchange.
/embed/ The page that is embedded in other applications and the print mode that the headless browser uses.
/.well-known/oauth-protected-resource/ The MCP server metadata for clients that sign in with OAuth.
/oauth2/, /login/oauth2/, /saml2/, /login/saml2/ The trip to the identity provider and back (OIDC and SAML).

/ayuda/ is the user and administration manuals, which the frontend itself serves without going through the backend (see The manuals under /ayuda/). Everything else is the web application: a file if it exists and, if not, its main page, which resolves the path in the browser.

That is why ECenter goes at the root of its own host name (https://ecenter.example.org/) and not under a path of another site (https://intranet.example.org/ecenter/ is not supported). The session is a cookie of the site itself, the API and the application share an origin and the browser needs no cross-origin permissions.

How a request travels#

How a request travels Sequence of a query: the browser asks the frontend for the application, and the frontend forwards the /api/ paths to the backend; the backend checks session, license and privileges in the own database, submits a job, queries the client database, audits and serves the result in windows from its memory. GET / (the web application) index.html and fingerprinted files (cached for a year) /api/… (cookie SESSION) the same request + X-Forwarded-* session, license and privileges submits a job to its queue query (connection pool) rows audit of the query follows the job and reads the result in windows result in the memory of the backend Browser Frontend (nginx) Backend Own DB Client database Jobs and their results live in the memory of the instance that calculates them.
How a request travels Sequence of a query: the browser asks the frontend for the application, and the frontend forwards the /api/ paths to the backend; the backend checks session, license and privileges in the own database, submits a job, queries the client database, audits and serves the result in windows from its memory. GET / (the web application) index.html and fingerprinted files (cached for a year) /api/… (cookie SESSION) the same request + X-Forwarded-* session, license and privileges submits a job to its queue query (connection pool) rows audit of the query follows the job and reads the result in windows result in the memory of the backend Browser Frontend (nginx) Backend Own DB Client database Jobs and their results live in the memory of the instance that calculates them.
How a request travels View full size View full size
  1. The user opens https://ecenter.example.org/. The frontend serves them the web application. Fingerprinted files are cached in the browser for a year; the main page is checked again on every visit, so after an upgrade the new version is loaded.
  2. The application requests its data from /api/… on the same origin. The frontend passes them to the backend with the X-Forwarded-* headers that give the original scheme, host name and client address.
  3. The backend checks the session (in the own database), the license and the user's privileges.
  4. If the request asks for a calculation that may take time (a cube, a chart, a list), the backend submits it as a job to a queue. The job queries the client database with the sessions of that connection's pool and leaves the result in the backend's memory.
  5. The application follows the job and, when it finishes, reads the result in windows. What each query reads from the client database is recorded in the audit, in the own database.

Scheduled tasks, subscriptions and data alerts follow the same path from the backend itself, on behalf of whoever created them.

One instance, and several if needed#

What is planned is one backend instance. Sessions, configuration and everything shared are in the own database, but jobs and their results live in the memory of the instance that calculates them.

With several instances behind a load balancer:

  • Requests from the same client must always go to the same instance (affinity). Otherwise, one instance does not find the job that another one launched. The affinity key and a configuration example are in The reverse proxy and TLS.
  • Each instance has its own name (ECENTER_INSTANCE_NAME) and, if used, its own headless browser.
  • Scheduled tasks, operational alerts and purges are shared out automatically among the instances with locks in the own database: they do not run twice.
  • A change to a connection (its URL, its user or its password) is noticed by all instances.
  • Revoking a service credential only cuts off immediately the queries in progress on the instance that processes the change. Those running on another one finish on their own or when they reach their time limit. New requests with that credential are rejected on all of them.
  • To upgrade to a new version, all instances must be stopped before starting the first new one (see Upgrading).

What leaves the installation#

It helps to know which connections each part opens in order to prepare the firewall:

Source Destination What for
Browsers, host applications, API and MCP clients Frontend (HTTPS) All use of ECenter.
Frontend Backend The paths in the table above.
Backend Own database Everything ECenter stores.
Backend Each client's database Queries, work tables and the changes from forms.
Backend SMTP server Email.
Backend Identity provider Single sign-on and, with the MCP through OAuth, the keys of its tokens.
Backend Headless browser (DevTools) Asking it to render a document.
Headless browser Frontend Opening the document it renders, with its data.
Headless browser and users' browsers Base map The map background.
Backend Routing engine Isochrones and time and distance matrices.
Identity provider Frontend SCIM, if it creates the users.

The ports of each part are in Requirements.

See also#