Yatai uses Golang for its backend and react/typescript for the frontend web UI. Download the source code:
git clone https://github.com/bentoml/yatai.git
-
NodeJS version 14.16.1 or above
For Apple computer with M1 chip, please install nodejs version
>=14.17.1
-
We recommend installing NodeJS using
nvm
which allows developers to quickly install and use different versions of node:# Install NVM curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash nvm install 14.17.1 nvm alias default 14.17.1
-
-
Yarn package manager (optional)
Yatai uses
yarn
package manager to run varies of Web UI related ops in the Makefile.npm install -g yarn
-
PostgreSQL
A local PostgreSQL database is required to set up a local development environment. Follow the official installation guide for your system here: https://www.postgresql.org/download/
For mac users, install Postgres with homebrew:
brew install postgresql
After installation, create a database for Yatai
createdb yatai
-
Golang
Yatai uses golang for its backend. Install Golang for your system following the official installation guide here: https://go.dev/doc/install
For Mac users, install Golang with homebrew:
brew install go
Yatai uses yarn to manage its front-end dependencies. Run the make command:
make fe-deps
Alternatively navigate to the dashboard
directory and run yarn
command:
cd dasboard
yarn
Yatai uses go command to download the dependency packages. Run the make command:
make be-deps
Alternatively to run the download command directly:
go mod download
-
Generate Yatai config file
Create
yatai-config.dev.yaml
file that bases on theyatai-config.sample.yaml
template and update thepostgrsql
section in the configuration file. -
Run make command that start the development server for both Yatai UI and Yatai server.
make yatai-dev
Visit http://localhost:7777 to view the Yatai Web UI
Visit http://localhost:7777/swagger to view Yatai server’s API definitions.
To start Yatai UI separately, run make command:
make fe-run
To start Yatai server separately, run make command:
make be-run