BMC-UI is a web-based user interface for managing and configuring the BMC of a Turing Pi cluster.
- React - JavaScript library for building user interfaces
- Tailwind CSS - Utility-first CSS framework
- TanStack Router - Routing library for React applications
- Handles route management and route protection
- TanStack Query - Data fetching and caching library for React
- react-i18next - Internationalization library for React
- Vite - Fast build tool and development server
- TypeScript - Typed superset of JavaScript
-
Clone the repository:
git clone https://github.com/turing-machines/BMC-UI.git
-
Install dependencies:
cd BMC-UI npm install
-
Start the development server:
There are multiple ways to run the development server:
a. Connect to a local Turing Pi cluster (default):
npm run dev
This will connect to
https://turingpi.local
for the API by default.b. Connect to a specific Turing Pi cluster:
If your Turing Pi cluster is using a different hostname, domain or IP address, you can specify it using the
CLUSTER_URL
environment variable:CLUSTER_URL=https://your-cluster.lan npm run dev
or
CLUSTER_URL=https://192.168.1.100 npm run dev
c. Use bmcd-api-mock:
If you want to use bmcd-api-mock as the API for development:
-
Clone and set up the bmcd-api-mock repository.
-
Run the mock server (usually on
http://localhost:4460
). -
Start the BMC-UI development server with the CLUSTER_URL environment variable:
CLUSTER_URL=http://localhost:4460 npm run dev
-
-
Open your browser and visit
http://localhost:5173
to see the application running.
The deployment process for BMC-UI is automated using GitHub Actions. The version management is handled by the version
field defined in the package.json
file.
Whenever a pull request targeting the main
branch is created and the package.json
file is modified with an updated version, a new build is triggered automatically. Once the pull request is merged into the main
branch, the version change will be detected, and the built files will be packaged into a tarball and released as an artifact on GitHub.
To deploy a new version:
-
Create a new branch and update the
version
field in thepackage.json
file following semantic versioning (e.g.,2.1.0
,2.1.1
,3.0.0
). -
Commit the changes and push the branch to the repository.
-
Open a pull request from the branch targeting the
main
branch. -
Review and merge the pull request into the
main
branch. -
GitHub Actions will automatically detect the version change, trigger a new build, and create a release with the tarball artifact.
-
The release artifact can be downloaded and deployed to the target environment.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
Please note that due to memory restrictions on the BMC, the final bundle size of the application cannot exceed 4MB. To ensure this limit is maintained, every pull request will report its bundle size, allowing us to track the bundle size over time. When contributing, please be mindful of the bundle size impact of your changes.
This project is licensed under the GNU General Public License v2.0.