Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Java (Corretto JDK 11+ recommended)

  • Maven 3

  • DockerYarn

  • v1pnpm v9

Set up your GitHub fork and a local repository

...

To run the app in development mode, run yarn pnpm install then yarn pnpm dev. This will launch three processes:

...

Expand
titleAlternative ways to run SynapseWebClient in development mode

Instead of running yarn pnpm dev, you can alternatively directly use the GWT Maven plugin (e.g. mvn gwt:run) or an IDE integration. Please note that depending on your IDE/plugin configuration, your environment may be subtly different than the production system (e.g. many GWT plugins deploy a Jetty server, when we use Tomcat in production), which can result in subtle differences in behavior.

...

If you have made changes to a JavaScript dependency (e.g. synapse-react-client), you can see those changes in your local development environment by “linking” the projects. As an example, we will link the synapse-react-client project.

  1. In the synapse-react-client directory, run

    Code Block
    yarn link

    In the SynapseWebClient directory, run

    Code Block
    yarnpnpm link ../path/to/synapse-web-monrepo/packages/synapse-react-client

    This will create a symlink on your machine so the node_modules/synapse-react-client directory points to your local synapse-react-client directory.

  2. Make desired changes in the synapse-react-client project

  3. Rebuild the JavaScript artifacts for synapse-react-client (in synapse-web-monorepo, run pnpm nx run synapse-react-client:build)

  4. If you’re running yarn pnpm dev, the changed JavaScript file should automatically be picked up. Refresh your browser window to see the changes (you will likely need to open your browser dev tools → Network → Disable Cache, and leave the browser devtools open)

When you want to unlink synapse-react-client, in the SynapseWebClient directory you can run yarn unlink synapse-react-client and then yarn install --force.

Known issues:

...

pnpm unlink synapse-react-client

...

.

Note

Linking a package updates the lockfile to reference the local repository, so you must unlink the package before you commit changes to the lockfile.

IDE Setup Instructions

This section contains instructions for setting up various IDEs to develop SynapseWebClient.

...

Expand
titleSetup with Intellij IDEA
  1. Download IntelliJ IDEA 

    1. The community edition is free

    2. The Ultimate edition requires purchasing a license. It includes enhanced support for GWT, but it’s not necessary for development. 

  2. Import the SynapseWebClient project into IntelliJ by File → New Project From Existing Sources... <Select Path to SWC Location>

  3. Set up IntelliJ to directly call yarn pnpm dev

    1. Run → Edit Configurations…

    2. Click “Add New Configuration” → npm

    3. Set the following options

      • Command: run

      • Script: dev

      • Package manager: yarnpnpm

Technologies used

There are several technologies that we are currently utilizing in the portal. The following is a list of primers for each:

...