Skip to content
Florian Spiess edited this page Dec 6, 2021 · 23 revisions

Welcome to the Vitrivr NG, the user interface component in the vitrivr stack. The NG stands for 'Angular' or 'Next generation'.

Vitrivr NG is a web-based user interface developed to be used with the latest version if Cineast. It allows the user to browse in and retrieve from mixed multimedia collections.

Getting started

First, simply clone the repository

git clone https://github.com/vitrivr/vitrivr-ng.git

For development, you will require NodeJS and the npm package manager. Once npm is available on your machine, you can install Angular CLI globally using the following command in your console:

sudo npm install -g @angular/cli

Then, install the dependencies in the vitrivr-ng folder (you might need to apt install build-essential first) using

npm install

That's it. Now you should be ready to run Vitrivr NG!

Running Locally

You can simply start a development server on your command line using ng serve

Deploying

You can use ng build since this is an angular project. Copy the dist folder to wherever you want to serve the files from. Alternatively, We provide a deploy-script. For instance, to deploy to your local apache instance, use ./deploy.sh /var/www/html.

Remember to Configure your Webserver to fallback to index.html which is a must for Angular Apps.

Building without node.js or npm installation

Using the included gradle wrapper, Vitrivr NG can be built without having a system wide node.js or npm installation. Building is as easy as

./gradlew buildAngularApp

Deploying with an apache instance on ubuntu

One of the most common setup-scenarios is performing a clean setup on an ubuntu machine. Therefore, we provide full setup instructions here.

  • First, install apache2: sudo apt install -y apache2
  • Modify permissions so you don't have to deploy with sudo: sudo chmod 777 /var/www/html/
  • Remove the index.html file put there by default (otherwise non-sudo execution of the deploy-script gets stuck): sudo rm /var/www/html/index.html
  • Run the deploy-script ./deploy.sh /var/www/html/
  • Remember to create symlinks to thumbnails / objects.
  • Use sudo a2enmod rewrite to enable rewrites
  • Create a .htaccess File in the directory you're serving vitrivr from (e.g. /var/www/html) and fill it with The lines from the Angular Doc
  • Add the following lines to your /etc/apache2/apache2.conf:
<Directory "/var/www/html">
   AllowOverride All
</Directory>
  • Restart the apache service with sudo service apache2 restart

Configure

The configuration of Vitrivr NG can be made through the src/config.json file. Most importantly, you have to adjust the api.host and api.port settings so that they point to a running instance of Cineast. Furthermore, you have to adjust the URLs under resources.host_thumbnails and resources.host_object. All references to thumbnails and media files will be resolved relative to those locations.

A detailed description of the configuration file and its fields can be found on the Configuration page.