Windows 11 guide to building, compiling and running the Bitshares Astro UI locally

in BitShares5 months ago (edited)

The Bitshares Astro UI is an ElysiaJS API hosted AstroJS web application for Bitshares DEX operation creation; it aims to be as evergreen as possible, using cutting edge technologies to improve Bitshares DEX user experience.

If using windows 11, you must first install WSL, this installs the ubuntu windows linux subsystem, enabling you to run linux applications (the ElysiaJS API) in the BUN.JS runtime.

Once you've installed WSL and reset your computer, you should then install Bun.JS, as it's required instead of Node.JS

Once Bun is installed, launch a powershell terminal in a folder you want to store the web app, then run these commands:

git clone [email protected]:BTS-CM/beet_api.git
cd beet_api
wsl
bun install

bun run fetchPools
bun run fetchAssets
bun run fetchDynamicData
bun run fetchIssuers
bun run fetchBitassetData
bun run fetchOffers
bun run fetchDeals
bun run fetchFees

bun run constructUI

bun run compile
or
bun run dev

.
The above commands fetch the Bitshares Beet API repo (the ElysiaJS API), launches the windows linux subsystem, installs the required packages using the BUN package manager, fetches the required data and AstroUI DIST contents before finally compiling to an executable file titled beet_api.

Now that you've compiled the Astro UI + ElysiaJS API into the exectutable beet_api, you can run the following command within the WSL powershell terminal:

./beet_api

This will output the following message: Elysia is running at localhost:8080

You're now running the ElysiaJS API web server, simply navigate to http://localhost:8080/ using your web browser of choice!

Don't forget to download the latest Bitshares BEET wallet for use with the AstroJS DEX UI via deeplinks and local JSON file based operation prompts.

image.png


If you are interested in hosting this for others to use, any linux web server should suffice as long as it supports the Bun.JS runtime. All you'd need to do is to use a reverse web proxy server such as nginx to route the localhost:8080 web app to an external port on the web server behind an SSL certificate.


Interested in how it all works? Check out these repositories:

Don't forget to click the ⭐ button to like the github repos above!


These developments were brought to you by the NFTEA Gallery.
Consider collecting an NFTEA NFT to support continued Bitshares developments.

Don't have a Bitshares account? Make one today!

Sort:  

Where to get help trying to run this on linux? Running into some issues. Nice work, this is shaping up to be a solid wallet.

I've only run this on windows, using the WSL (linux subsystem), so an ubuntu os environment.

What step are you stuck on?

Thanks

Did you manage to sort out the issues you ran into, mate?

I've recently updated the readme files for the astro ui & beet api. It should be easier to get running now.