Skip to content

Install boba-frontend

In a terminal, run the following commands:

Terminal window
# Clone the codebase from github
git clone https://github.com/BobaBoard/boba-frontend.git
# Enter the codebase directory
cd boba-frontend
# Install all necessary dependencies
yarn install

boba-frontend does not currently require any special env set up.

Connect to a local boba-backend (default Realm)

Section titled “Connect to a local boba-backend (default Realm)”

To connect to a local boba-backend instance, make sure that the instance is up, then run yarn run dev. Going to http://localhost:3000 will show the default Realm (twisted-minds).

Connect to a local boba-backend (multiple Realms)

Section titled “Connect to a local boba-backend (multiple Realms)”

boba-frontend uses the website address (URL) to distinguish between different communities (Realms). For local development, we use the Bonjour protocol to create fake localhost addresses in your local network. This allows you to use http://REALM_NAME_boba.local addresses to simulate multiple realms.

  1. Run yarn run dev:bonjour
  2. Go to http://twisted-minds_boba.local:3000 in your browser.

To connect to a different backend, you can set the backend address by updating the NEXT_PUBLIC_DEFAULT_BACKEND environment variable in the .env.development file.

For example, to connect to a server running at https://backend.bobaboard.com, you can add:

Terminal window
NEXT_PUBLIC_DEFAULT_BACKEND=https://backend.bobaboard.com

If you made changes to boba-components, you may want to also test your local updates in boba-frontend. To do so, you’ll need to build the boba-components package locally, and link it into the boba-frontend repository.

Section titled “1. Build the boba-components package and create a local package to link.”

In your boba-components directory run:

Terminal window
# Run the "boba-components first installation instructions" first.
yarn run build
yarn link
Section titled “2. Link the local boba-components package to boba-frontend”

In your boba-frontend directory run:

Terminal window
cd boba-frontend
yarn link @bobaboard/ui-components

I’m getting [error that happens when the backend is not up]

Section titled “I’m getting [error that happens when the backend is not up]”

TODO: explain

Help! Things are weird and I don’t know why!

Section titled “Help! Things are weird and I don’t know why!”

A good first step in troubleshooting is to install dependencies again. Double-check that you’re using the correct node version by running node -v (it should start with 18), then simply re-run yarn install --force in the root folder.