Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
/ belaUI-ts Public archive
forked from pjeweb/belaUI

Web interface for BELABOX (Fork), Rewritten using TypeScript

License

Notifications You must be signed in to change notification settings

CERALIVE/belaUI-ts

 
 

Repository files navigation

BelaUI Fork (CERALIVE)

This is a fork of the default BELABOX UI (belaUI), that ported the code to Typescript and ESM (ECMAScript Modules). This fork is maintained by CERALIVE and includes additional features and improvements.

CeraUI Integration

This fork includes an option to use the CeraUI interface, which is an alternative user interface designed for enhanced usability and additional features. When the USE_CERAUI option is enabled during installation or deployment, the system will download the latest CeraUI main package from the release and use it instead of the standard BelaUI interface.

Install the fork on your BELABOX

Note: Replacing the original UI directly may cause issues. When your BELABOX is updated, it can revert the UI. Ensure you monitor updates and reapply the override after updates.

  • Enable SSH for the default user (user) on your existing belaUI

  • Connect to the BELABOX via SSH (use Putty on Windows, JuiceSSH on Android)

  • Then run:

    # Standard installation with BelaUI
    wget -qO- https://raw.githubusercontent.com/CERALIVE/belaUI-ts/main/install.sh | bash

    or

    # Installation with CeraUI interface
    wget -qO- https://raw.githubusercontent.com/CERALIVE/belaUI-ts/main/install.sh | USE_CERAUI=true bash
  • To get back to the default belaUI, you can then run sudo bash /opt/belaUI/reset-to-default.sh through SSH.

Installation Script

This repository includes a unified installation script (install.sh) that handles both local installation and remote deployment:

Local Installation (from GitHub releases)

# Standard installation
./install.sh

# With CeraUI interface
USE_CERAUI=true ./install.sh

Remote Deployment (from local dist folder)

# Standard deployment
./install.sh --remote [SSH_TARGET]

# With CeraUI interface  
USE_CERAUI=true ./install.sh --remote [SSH_TARGET]

# Examples
./install.sh --remote root@belabox.local
./install.sh --remote root@192.168.1.100

Use ./install.sh --help to see all available options.

Note: The previous separate install.sh and deploy-to-local.sh scripts have been unified into a single install.sh script. The old scripts are available as .bak files for reference and will be removed in a future release.

Development

Prerequisites

You will need to have bun.sh in version v1.2.3 or newer installed to run the scripts.

Install dependencies

To install the dependencies, you can use the following command:

bun install

Run locally on dev machine

Local development is not really supported. Ideally you have a BELABOX to test changes. Build for production (see below) and deploy with the deploy script (see above).

You can run the UI locally with the following command:

bun run dev:ui

To run the server locally, you can use the following command:

bun run dev:server

Build for production

To build the UI for production, you can use the following command:

bun run build

Install built version to BELABOX

Preparation

It is recommended to create an SSH key pair and install public key on the BELABOX, since the deployment script uses multiple ssh calls that would require you to type the password each time.

You can follow this tutorial to generate the key pair: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-22-04

Set up on the BELABOX

  • Enable SSH for the default user (user) and connect via SSH
  • Enable SSH on boot to make things easier (sudo systemctl enable ssh)
  • Use sudo su to get root privileges and add to the authorized keys for the root user. Add the generated public ssh key to /root/.ssh/authorized_keys or create the file if it does not exist yet:
    1. Create the directory if it does not exist: mkdir -p /root/.ssh
    2. Append your ssh key to the authorized_keys file (replace ssh-... with your generated public key): echo "ssh-..." >> /root/.ssh/authorized_keys).
  • Install rsync (sudo apt install rsync)
  • Install an editor (e.g. sudo apt install nano)

Set up on host (currently tested on macOS)

  • Install the generated private ssh key on the host (e.g. ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub)
  • It might be necessary or recommended to install a newer version of rsync from brew or similar (not tested if necessary)
  • Run the deployment script by specifying the SSH target as an argument. For example, to deploy as root to a host at 192.168.100.100, run:
# Standard deployment with BelaUI
./install.sh --remote root@192.168.100.100

# Deployment with CeraUI interface
USE_CERAUI=true ./install.sh --remote root@192.168.100.100

Reset to default belaUI

To reset the BELABOX to the default belaUI, you can run the reset script from the host (./reset-local.sh).

License

This project is licensed under the GPL-3.0 License. See the LICENSE file for more details.

About

Web interface for BELABOX (Fork), Rewritten using TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.0%
  • HTML 6.1%
  • Shell 3.3%
  • CSS 0.6%