theogiraudet / sirius-components

Reusable frontend and backend components for Sirius Web

Home Page:https://www.eclipse.org/sirius/sirius-web.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sirius Components (for Sirius Web)

Eclipse Sirius Web is a framework to easily create and deploy studios to the web. We keep the principles which made the success of Eclipse Sirius Desktop and make them available on a modern cloud-based stack.

This repository, sirius-components, contains the building blocks from which Sirius Web applications are built. The folder packages contains both the Spring Boot projects from which the corresponding backend is built and the reusable React components used to build the application’s UI.

To actually build and run a complete example application, see the sirius-web repository which contains a complete example of a Sirius Web modeler built using these components.

Building

Requirements

To build the components in this repository on your own, you will need the following tools installed:

  • Git, and a GitHub account

  • To build the backend components:

  • To build the frontend components:

    • Recent versions of Node and NPM: in particular, Node >= 18.7.0 is required along with npm >= 8.15.0.

    • rollup (npm install -g rollup)

    • yalc (npm install -g yalc)

Warning
Note that there are issues with NPM under Windows Subsystem for Linux (WSL). If you use WSL and encounter error messages like "Maximum call stack size exceeded" when running NPM, switch to plain Windows where this should work.

GitHub Access Token

The backend part of Sirius Components depends on sirius-emf-json, which is published as Maven artifacts in GitHub Packages. To build sirius-components locally, you need a GitHub Access Token so that Maven can download the sirius-emf-json and Flow-Designer artifacts.

  1. Create a personal token with a scope of read:package by following the GitHub documentation if you do not have one already.

    Warning
    Once generated, a token cannot be displayed anymore, so make sure to copy it in a secure location.
  2. Create or edit $HOME/.m2/settings.xml to tell Maven to use this token when accessing the Sirius EMF JSON repository:

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
      <servers>
        <server>
          <id>github-sirius-emfjson</id>
          <username>$GITHUB_USERNAME</username>
          <password>$GITHUB_ACCESS_TOKEN</password>
        </server>
        <server>
          <id>github-flow</id>
          <username>$GITHUB_USERNAME</username>
          <password>$GITHUB_ACCESS_TOKEN</password>
        </server>
      </servers>
    </settings>

    Be sure to replace $GITHUB_USERNAME with your GitHub user id, and $GITHUB_ACCESS_TOKEN with the value of your acess token.

    Important
    The id used in your settings.xml must be github-sirius-emfjson and github-flow to match what is used in the POMs.

Build steps

  1. Clone the Sirius Components repository:

    git clone https://github.com/eclipse-sirius/sirius-components.git
  2. Build the frontend packages

    npm ci
    npx turbo run build
    Note
    In order to run tests, use npx turbo run coverage and if you want to publish the packages on yalc use npx turbo run publish:local. If you want to run the whole Sirius Web frontend, use npm start.
  3. Build the backend components. From the sirius-components/packages directory:

    mvn clean install
    Tip
    If you are behind a proxy, you may get Maven errors about checkstyle.org not being available. In this case you need to explicitly disable CheckStyle from the build: mvn clean install -f releng/org.eclipse.sirius.emfjson.releng/pom.xml -P\!checkstyle

License

Everything in this repository is Open Source. Except when explicitly mentioned otherwise (e.g. for some resources likes icons which are under Apache-2.0), the license is Eclipse Public License - v 2.0.

About

Reusable frontend and backend components for Sirius Web

https://www.eclipse.org/sirius/sirius-web.html

License:Eclipse Public License 2.0


Languages

Language:Java 68.6%Language:JavaScript 19.8%Language:TypeScript 10.8%Language:CSS 0.8%Language:HTML 0.1%Language:Shell 0.0%Language:Dockerfile 0.0%