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.
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
- Compile the Angular Typescript code. By default the code is compiled into the
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/wwwdirectory on the servers. The
globalnavmodules are libraries that need to be copied to all servers. The
ssomodules 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.htmlfile 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.
This is an open source project and we would love your help. We have prepared a contributing guide to help you get started.