/WebUI

Primary LanguageVueGNU Affero General Public License v3.0AGPL-3.0

ShockLink WebUI

This is the ShockLink Web UI. It is a single-page application that communicates with the ShockLink API. It is written using JavaScript and SCSS using the Vue 3 framework.

Contents

Configuring

The webui container supports configuration via environment variables.

Variable Default Description
SHOCKLINK_API_URL https://api.shocklink.net/ URL of the API.
SHOCKLINK_WEBUI_URL https://shocklink.net/#/ URL of the ShockLink WebUI.
SHOCKLINK_SHARE_URL https://shockl.ink/s/ URL to prefix share links with. When visited, should redirect to ${SHOCKLINK_WEBUI_URL}/public/proxy/shares/links/{ID}.

Deployment

This documentation describes how to self-host the WebUI container. This might not be of interest to you if you are content using ShockLink.net.

Using Docker

Assuming you are running on localhost, with the API running on port 5001:

$ docker run \
    -p 5002:80/tcp \
    -e SHOCKLINK_API_URL=http://localhost:5001/ \
    -e SHOCKLINK_WEBUI_URL=http://localhost:5002/#/ \
    -e SHOCKLINK_SHARE_URL=http://localhost:5002/#/public/proxy/shares/links/ \
    --name shocklink-webui \
    ghcr.io/shocklink/webui:latest

Using docker-compose

See docker-compose.yml.

Development

Contributions are welcome! We're eager to see what you come up with. Make sure to join us on Discord.

Dependencies

To get started with development, you will need the following things:

  • NodeJs 17.9.1 or newer.
  • An IDE or editor:
    • VSCode
    • Web- or PhpStorm

Development

To start a local development server, check out the repository and run the command npm run start.

Build

To make a production ready build, use the command npm run build. This will output static web files to ./dist/ which can be deployed on pretty much any webserver.

This also works for cloudflare pages auto build pipeline.

Support

You can support me and my projects here Ko-fi.com/LucHeart