shortener integration
SUS
-
create docker repo: https://hub.docker.com/repository/registry-1.docker.io/siscc/dotstatsuite-url-shortener -
move code in .stat suite gitlab repo: https://gitlab.com/sis-cc/.stat-suite/dotstatsuite-url-shortener -
create pipeline -
create kube strategy -
deploy in QA -> it's an internal service like config (no healthcheck from outside)
DE
backend
-
update params to handle new entries (shortener url, auth url) -
add checkUser hook -
add shortener service relay (to not expose shortener service like config service) -
add method createOne that check user and forward to shortener service
client
-
When using this short URL and it is not valid, then a DE error page should be displayed--> handle error page for shortener api error -
new UI: not part of this ticket, but is defined here: #1278 (closed) - new button (as auth is required and dealing with bearer token may be not easy for targeted users) to create short url
- feedback to display response and short url if success
#1278 (closed))
Technical specs (copied fromread flow:
- user has a shorten url (define the url, suggestion:
<de_url>/short/<url_id>
) - the url hits DE server: it's caught by a new handler (there the api handler, healthcheck handler and the default handler which returns the DE client)
- the new handler requests the URL shortener service with the
url_id
- if no url is found, define a fallback (returns an error, returns the DE client)
- if url is found, perform a redirection to this url
- the user will see a single load of DE client with the original url
notes: with redirection, no hydration required in DE client, no impact on DE client
interesting considerations (the technical specs are compliant with):
- adding a state will be possible (in addition to the url)
- DE server will inject the state directly in the DE client before sending it to the browser (following the same principle of SETTINGS & CONFIG)
- DE client will just have to know how to get hydrated from a partial state
- next step is to pre-render DE client on DE server and cache the result to speed up most accessed urls
Edited by jean-baptiste nonin