Install boba-frontend
Clone project
Section titled “Clone project”In a terminal, run the following commands:
# Clone the codebase from githubgit clone https://github.com/BobaBoard/boba-frontend.git# Enter the codebase directorycd boba-frontend# Install all necessary dependenciesyarn installboba-frontend does not currently require any special env set up.
Develop
Section titled “Develop”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.
- Run
yarn run dev:bonjour - Go to
http://twisted-minds_boba.local:3000in your browser.
Connect to a different backend
Section titled “Connect to a different backend”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:
NEXT_PUBLIC_DEFAULT_BACKEND=https://backend.bobaboard.comTest local updates to boba-components
Section titled “Test local updates to boba-components”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.
1. Build the boba-components package and create a local package to link.
Section titled “1. Build the boba-components package and create a local package to link.”In your boba-components directory run:
# Run the "boba-components first installation instructions" first.yarn run buildyarn link2. Link the local boba-components package to boba-frontend
Section titled “2. Link the local boba-components package to boba-frontend”In your boba-frontend directory run:
cd boba-frontendyarn link @bobaboard/ui-componentsTroubleshooting
Section titled “Troubleshooting”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.