Skip to main content
Version: v3.0

Manual Installation

Clone the repo

  1. Clone the repo
git clone https://github.com/rhino-project/rhino-project-template.git

Postgres and Redis

Versions:

  • PostgreSQL: 15 or newer
  • Redis: 7

OSX

This assumes you have Homebrew installed.

  1. Install postgres
brew install postgresql
  1. Install redis
brew install redis-server

WSL2 on Windows

This assumes you are using Ubuntu 20

  1. Install postgres
sudo apt install postgresql postgresql-contrib libpq-dev
  1. Start postgres
sudo service postgresql start
  1. Setup postgres user
sudo -u postgres createuser -s -i -d -r -l -w <<username>>
sudo -u postgres psql -c "ALTER ROLE <<username>> WITH PASSWORD '<<password>>';"
  1. Install redis
sudo apt install redis-server
  1. Start redis
sudo service redis-server start

Ruby and Node

Versions:

  • Ruby: 3.3.4
  • Node: 20.14.0

RVM (Ruby) and NVM (Node)

  1. Install rvm
 curl -sSL https://get.rvm.io | bash -s stable --ruby=3.3.4
  1. As per rvm instructions on completion to start using RVM you need to run
source $HOME/.rvm/scripts/rvm
  1. Install nvm: https://github.com/nvm-sh/nvm#installing-and-updating
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
  1. Install node 20.14.0,
nvm install v20.14.0

Asdf (Ruby and Node)

  1. Install asdf https://asdf-vm.com/guide/getting-started.html

  2. Install plugins from .tool-versions in the root of the project

asdf install

Launch the application

  1. Create the environment file
rails rhino:dev:setup

and select 'n' when asked if you are installing for docker.

info

env.sample is provided as an example. You can manually copy this to .env and modify the values as needed

  1. Install gem and node dependencies
bundle install
npm install
  1. Create and load the database
rails db:setup
  1. Run the rails server
rails s
  1. Run the client development server
npm start

Updating the production model data

The static copy of the data model is automatically updated with the rhino vite plugin. The data model can be manually updated with:

rails rhino:open_api_export

Customization

The data model driving the UI is loaded from src/models/index.js in production or or dynamically from the server at /api/info/openapi in development (by default http://localhost:3000/api/info/openapi). See Updating the production models for further instructions on export.