glacez-webapp-admin
Lane: UI · Repo: glacez/glacez-webapp-admin · Editing rules: Glacez/Webapps/glacez-webapp-admin/AGENTS.md
The admin console for Glacez master data: currencies (with their OHLCV, indicators, halving events and exchange pairs on one hub), users and authorities, external API keys, exchange pair info, fear & greed, data updaters, agent profiles and BTC-trend reports. Every screen is ADMIN-only.
Shape
Vaadin Flow 25.3.x, Java 25, single Maven module, jar packaging. Talks to glacez-soa-webservice only, over the webservice-api-v1 Feign contracts. 13 routes, all inside MainLayout, so there is no layout-free page.
Route strings are inconsistent on purpose (Ohlcv capitalised, agent_btc_trend_reports snake_case, the rest kebab-case) — bookmarks and the side navigation depend on them.
Data
Owns nothing; it is the operator's view over the services' data, and the place where master data lands (currencies, API keys, exchange info, indicator inputs). Writes go through webservice/<domain>/ proxies extending WsProxy.
Caches: exactly two — currencies and exchange_infos — each with its own evictor interval. A cache name missing from the registry, or an evictor key that does not match a cache name, behaves exactly like no caching at all — silently. A currency read crosses three 5-minute caches on its way here (findata's allCurrencies, webservice's currencies, this app's currencies), so a change made by another service can take up to 15 minutes to appear; a write made here evicts all three on the way back.
Currencies
A currency is one screen at currency/<id> with five tabs, and currency/new renders the same view with an empty form — there is no separate create/edit route.
| Tab | Shows | Reads |
|---|---|---|
| Edit | every field the currency contract carries: symbol, name, launch and delist dates, CMC rank, icon URL, tags, previous symbols. Save / Delete / Reset, each behind a confirm dialog; a symbol change gets its own | the cached currencies list; writes go to currencies and evict the cache |
| OHLCV | candlestick, grid, read-only editor | currency-ohlcv (one request per selection, feeding both the grid and the chart) |
| Indicators | close + SMA + EMA + ATH + change + halving markers | currency-ohlcv, currency-moving-average (twice), currency-ath, currency-change |
| Exchange pairs | every exchange's pair carrying the symbol | cached exchange_infos |
| Halving events | the currency's halving records, editable | currency-halving (list, then writes) |
The Edit tab is the row-click destination and renders from the currency already in the cache, so opening a currency costs nothing on the wire. Tags are editable here (a multi-select with free text); an empty tag set is the one thing the platform refuses to apply — findata keeps the stored tags rather than clearing them, so clearing every tag from the form is a no-op.
Previous symbols are an add/remove badge list, not a multi-select: an alias re-keys venue records into this currency at the next import, so dropping one has to be a deliberate click rather than an unticked chip. The form normalizes an added alias to the shape the server stores, and findata validates the submitted list — its own symbol, another currency's symbol, a blank and a duplicate are all refused with the reason on the notification — so a typo cannot silently capture another coin's records.
A symbol change is confirmed on its own dialog, keyed on the typed symbol differing from the loaded one: it names the counts from GET /resources/currencies/{id}/references so the operator sees what the rename rewrites, and states what it does not need (the exchange's own records keep the venue's ticker and resolve through previousSymbols, so no release follows) and does not do (quantities are not rescaled). The Symbol field accepts only [A-Z0-9]+, the shape webservice stores, so the console rejects the value it would otherwise have to rewrite.
A delete asks the same references endpoint first and refuses when anything a user holds or configured still points at the symbol, suggesting a delist date instead. Delisting is a pricing flag (endTimestamp), not a lifecycle state. The whole chain — create, update, delete, what each leaves behind — is in Currency lifecycle.
The OHLCV, Indicators and Halving events tabs are panels; the standalone Ohlcv/<symbol> screen keeps its own filter bar and renders the same OHLCV panel, so there is one implementation of each chart. Indicators and halving events have no route of their own. Exchange pairs stay on the cached exchange_infos, which webservice serves from its own collection (written by worker) with no findata hop.
Security
Keycloak OIDC client (glacez-app), authorities from realm_access.roles and resource_access.glacez-app.roles, @RolesAllowed("ADMIN") on every view. Session timeout 6 h; the access token is refreshed and the session invalidated on failure, with a Keycloak end-session logout. Static asset paths need their own public matcher — the images live two directories deep and the existing matchers are one level.
Actuator shutdown is exposed here as it is platform-wide; that is not this repo's decision to change alone.
Jobs
None scheduled. The "updaters" screen (/updaters) triggers the one-shot maintenance legs, which run in the service that owns the data — webservice itself, findata or core. Chain, routes and their lifecycle: Updaters.