Shlink web client is a fully static web app, with no backend.
That's pretty convenient, and simplifies a lot of things, but also introduces some limitations.
- Servers and configuration is not shared, which means every time you open the app in a new device, you need to configure it from scratch.
- Everything is public, so you cannot set permissions or user authentication.
- Shlink API keys are stored in the browser, which is a bit risky if someone else can access your computer.
- Many people don't understand the difference of a web app with backend and without it, which makes them not understand why the former points are not possible.
Since there has been requests for this in the past, I'm considering a new shlink-dashboard project, which would be a web client but with its own backend for frontend.
In order to do it, we need to split shlink-web-client, having a subcomponent which wraps all the operations done when you are connected to a server.
This component would be reused by both shlink-web-client and shlink-dashboard, and the list of servers, configs, etc, would be handled differently by each one of them.
It should aslo allow (at some point) to provide the list of permissions, so that shlink-dashboard can "hide" sections based on the user's permissions.
Once the component has been split (shlink-web-component?), it can be moved to its own repo and published separately as an npm package.
TODO
Extracted component
Potential component names:
<Shlink />
<ShlinkWebComponent />
<ShlinkWeb />
<ShlinkClient />
<ShlinkApp />
Usage:
import { ShlinkWebComponent } from '@shlinkio/shlink-web-component';
import type { Settings } from '@shlinkio/shlink-web-component';
import type { ShlinkApiClient } from '@shlinkio/shlink-web-component/api-contract';
<ShlinkWebComponent
settings={{} as Settings} // The settings (from local storage or server)
serverVersion="3.7.0" // To resolve supported features.
apiClient={{} as ShlinkApiClient} // An API client / an object fulfilling a contract. Implicitly knows how to consume current server
// Object determining the active section and its params, or use react-router?
activeSection={{}}
// Future versions
permissions={{}} // Allows to hide sections or restrict actions
/>
Peer dependencies:
- @reduxjs/toolkit (redux?)
- react-redux
- react
- react-dom
- bootstrap
- reactstrap
- date-fns
Shlink web client is a fully static web app, with no backend.
That's pretty convenient, and simplifies a lot of things, but also introduces some limitations.
Since there has been requests for this in the past, I'm considering a new shlink-dashboard project, which would be a web client but with its own backend for frontend.
In order to do it, we need to split shlink-web-client, having a subcomponent which wraps all the operations done when you are connected to a server.
This component would be reused by both shlink-web-client and shlink-dashboard, and the list of servers, configs, etc, would be handled differently by each one of them.
It should aslo allow (at some point) to provide the list of permissions, so that shlink-dashboard can "hide" sections based on the user's permissions.
Once the component has been split (shlink-web-component?), it can be moved to its own repo and published separately as an npm package.
TODO
ResultMessageSimpleCardSearchFieldDropdownBtnRowDropdownBtnInputFormGroupCheckbox,ToggleSwitchandBooleanControlNavPillsandNavPillItemOrderingDropdownand order helpers.useDomIduseElementRefuseTogglePass updates from appbase.scsswhich is distributed uncompiled and then imported wherever needed.Extracted component
Potential component names:
<Shlink /><ShlinkWebComponent /><ShlinkWeb /><ShlinkClient /><ShlinkApp />Usage:
Peer dependencies: