shlinkio / shlink-web-client

A React-based client application for Shlink
https://app.shlink.io
MIT License
295 stars 79 forks source link

Preparation for Shlink Dashboard #338

Closed acelaya closed 1 year ago

acelaya commented 3 years ago

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

Extracted component

Potential component names:

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:

garethjax commented 3 years ago

Hi @acelaya, it's great! would then be possible to export the chart data?

acelaya commented 3 years ago

Hey @garethjax.

That's something I have considered many times. Could you please open a separate feature request ticket for that?

garethjax commented 3 years ago

of course!

acelaya commented 1 year ago

All preparations are done.

mvalois commented 8 months ago

Hey, we're interested by this project! Is there any ETA for the Shlink Dashboard? Any way to help? Any todo list?