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 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.
It also contains the Sirius Web sample application.
To test Sirius Web you have two possible options:
-
If you just want to run an already built version of the example application, follow the Quick Start.
-
If you want to build the example application yourself, follow the complete build instructions.
If you want a quick overview of how Sirius Web looks and feels like without building the sample application yourself:
-
Install Docker if you do not have it already.
-
Download the
docker-compose.ymlfile from the root of the Sirius Web git repository. -
Open a terminal in the directory where you put the
docker-compose.ymlfile, and issuedocker compose up.
Docker will automatically download and start both the database (PostgreSQL) image and the latest version of Sirius Web published on Docker Hub.
|
Warning
|
This may take a while the first time you run this as Docker will first pull the required Docker images. |
Once the application is started, simply point your browser at http://localhost:8080 and enjoy!
When you are done, you can stop the application by hitting Ctrl-c from the terminal where you launcher docker compose up.
|
Note
|
This way of running the application is only useful for quick testing and should not be used for actual deployments. |
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:
-
Docker must be installed and running for some of the backend components tests to run.
-
To build the frontend components:
-
LTS versions of Node and NPM: in particular, Node >= 22.16.0 is required along with npm >= 10.9.2.
-
TurboRepo (
npm install -g turbo)
-
|
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. |
For Windows users: Due to the Maximum Path Length Limitation of Windows, you may exceed the limit of 260 characters in your PATH. To remove this limitation, apply the this procedure with this command line in PowerShell (New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force), then active the longpath option in Git in a command line with administrator rights (git config --system core.longpaths true).
The backend components of this repository depends on sirius-emf-json, which is published as Maven artifacts in GitHub Packages.
The frontend components of this repository depends on @ObeoNetwork/react-trello and @ObeoNetwork/gantt-task-react, which are published as Node artifacts in GitHub Packages.
To build sirius-web locally, you need a GitHub Access Token so that:
* Maven can download the sirius-emf-json and Flow-Designer artifacts.
* Node can download the @ObeoNetwork/react-trello and @ObeoNetwork/gantt-task-react artifacts.
-
Create a personal token with a scope of
read:packageby following the GitHub documentation if you do not have one already.WarningOnce generated, a token cannot be displayed anymore, so make sure to copy it in a secure location. -
Create or edit
$HOME/.m2/settings.xmlto 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_USERNAMEwith your GitHub user id, and$GITHUB_ACCESS_TOKENwith the value of your access token.ImportantThe idused in yoursettings.xmlmust begithub-sirius-emfjsonandgithub-flowto match what is used in the POMs. -
Create or edit
$HOME/.npmrcto tell Node to use this token when accessing the Github Node artifacts repository://npm.pkg.github.com/:_authToken=$GITHUB_ACCESS_TOKENBe sure to replace
$GITHUB_ACCESS_TOKENwith the value of your access token.
-
Clone this repository
-
Build the frontend packages:
npm ci npx turbo run build
NoteIn order to run tests, use npx turbo run coverageWarningTo build the package
@eclipse-sirius/sirius-components-diagramsthemkdircommand is required.For Windows users, according to the npm documentation the default value for script-shell configuration on Windows is
cmd.exewhich does not support themkdircommand. We recommend to use git bash instead of the default command tool.Then you can set the
script-shellconfiguration with the following command:npm config set script-shell "C:\Program Files\Git\bin\bash.exe"
-
Install the frontend artifacts as static resource to be served by the backend. From the root directory of the repository:
mkdir -p packages/sirius-web/backend/sirius-web-frontend/src/main/resources/static cp -R packages/sirius-web/frontend/sirius-web/dist/* packages/sirius-web/backend/sirius-web-frontend/src/main/resources/static -
Build the backend components.
mvn clean install -f packages/pom.xml
TipIf 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\!checkstyleNoteDocker must be installed and running for some of the backend components tests to run. If Docker is not present, you can still build the backend by skipping the tests execution with mvn clean install -f packages/pom.xml -DskipTests. -
You can find in the output artifacts in the various
targetfolders of the backend components and thedistfolders of the frontend components. You could publish those to your maven or npm repository to consume them in other applications. We are already publishing those components in the NPM and maven repositories of our Github organization.Using these instructions, we can find a Spring Boot "fat JAR" in
packages/sirius-web/backend/sirius-web/target/sirius-web-{YEAR.MONTH.COUNT-SNAPSHOT}.jar. Refer to the instructions in the "Quick Start" section above to launch it.
