SmartGare
Operations

Configuration

Datasource, broker, security, station time, scheduler, and frontend deployment configuration.

SmartGare is station-agnostic. Deployment differences belong in environment configuration, referential records, or effective-dated rules.

Backend configuration groups

ConcernConfiguration
DatabaseDATABASE_URL or standard Spring datasource properties
KafkaKAFKA_BOOTSTRAP_SERVERS and Spring Kafka settings
JWTJWT_ISSUER_URI plus deployment authority mapping
CORSExplicit allowed origins; closed by default
Referential rulesStation timezone and activation delay
Permit expiryEnabled flag, timezone, warning horizons, cron
Modulith eventsPublication completion and republishing behavior
ManagementActuator port, exposure, readiness groups

DATABASE_URL supports standard PostgreSQL URI forms and percent-encoded credentials. Another database scheme is rejected rather than guessed.

Dedicated services

A deployment that runs the backend as dedicated services gives every service the server's settings plus where the others run (SMARTGARE_SWITCHBOARD_ADDRESSES_<MODULE>), its identity towards them (SMARTGARE_SWITCHBOARD_IDENTITY_TOKEN_URI, _CLIENT_ID, _CLIENT_SECRET), and optionally the switchboard's time limits. The internal API gateway routes each part of the API with API_<PART>_HOST. See One server or dedicated services.

Station time

Every business date comes from configured station time, not the server's local zone or a browser clock. Rule effective inputs and permit expiry share that principle.

Use an IANA timezone such as Africa/Casablanca. Missing or invalid timezones must stop startup for components that cannot decide safely without one.

Frontend deployment

The shared edge gateway exposes one public station origin and keeps upstream services private. The API itself has no public path: an internal API gateway routes it, and only the apps' own servers call it (frontend ADR-0006).

Public pathUpstream
/realms/*Keycloak, excluding master administration
/counter/*Counter app, served by its own server
/supervision/*Supervision app, served by its own server
/console/*Back-office SSR application
/api/*Nothing: answers 404

Each app's server runs the person's sign-in and keeps their tokens in an encrypted, HTTP-only cookie; the browser never holds a token. Its runtime configuration is its public origin, a session secret, the internal API URL, the OIDC authority and client, and, for a confidential client, the client secret.

Keep secrets out of builds and docs

Refer to credentials by variable name. Never print, copy, document, or embed their values in client bundles, examples, logs, screenshots, or generated artifacts.

On this page