Skip to content

MycroftAI/selene-ui

Repository files navigation

License CLA Team Status

PRs Welcome Join chat

Selene -- Mycroft's Web Backend

Selene provides the services used by Mycroft Core to manage devices, skills and settings. It consists of two repositories. This one contains GUI web applications built using the Angular framework. data access layer, APIs and scripts. The second repository, Selene Backend, contains Python and SQL representing the database definition,data access layer, APIs and scripts that support the web applications defined in this repository.

There are three web applications defined in this repository, account management single sign on, and skill marketplace. Each application is designed to run independently of the others. This repository also includes two libraries containing code common to each of the applications.

Installation

These instructions assume that the APIs and databases in the Selene Backend repository have been installed. The README file in that repository contains the necessary instructions. As with the Selene Backend repository, these instructions will also assume that each application (API & GUI) will run on an independent server or virtual machine. Running Selene on a single server is possible. Many of the instructions below are also applicable to running on a single server. The biggest difference being that all the compiled code will live on the same server.

To eliminate redundantly downloading and building the code on each server, it is recommended to do so on a build host. Once the build is complete, copy the compiled code to the servers that will run the applications. This repository includes a Jenkinsfile that builds the code and deploys it via ssh. It can be altered to work with any Jenkins instance.

  • Install Angular 7 and node.js on your build host.
  • Download this repository to your build host. The simplest method is via git (git installation instructions)
cd <directory of your choice>
git clone https://github.com/MycroftAI/selene-ui.git
cd selene-ui
  • Install the required node.js packages
npm install
  • Compile the Angular Typescript code. By default the code is compiled into the selene-ui/dist directory
ng build --project shared
ng build --project globalnav
ng build --project account --prod
ng build --project market --prod
ng build --project sso --prod
  • Copy the compiled code to the /var/www directory on the servers. The shared and globalnav modules are libraries that need to be copied to all servers. The account, market and sso modules need only be copied to their respective servers.

Running the Web Applications

  • Install a web server on each of the application servers. Configure the web server to serve the index.html file of the web application.
    Instructions on how to do this will vary depending on web server used. See the software provider's documentation for detailed instructions.
  • Add the web applications to the reverse proxy that is already being used for the APIs in the Selene Backend repository.

Getting Involved

This is an open source project and we would love your help. We have prepared a contributing guide to help you get started.

If this is your first PR or you're not sure where to get started, say hi in Mycroft Chat and a team member would be happy to mentor you. Join the Mycroft Forum for questions and answers.