MEDomicsLab-docs
V1
V1
  • 👋Welcome!
  • 👊Quick start
  • 👀Overview
  • 🏫Tutorials
    • 🔵Design
      • Extraction Module
        • Image Extraction Page
        • Text Extraction Page
        • Time Series Extraction Page
        • MEDimage
      • Input Module
        • Feature Reduction Tool
        • MEDprofiles
          • MEDprofiles Viewer
      • Exploratory Module
    • 🟠Development
      • Learning Module
      • Evaluation Module
    • 🟢Deployment
      • Application Module
  • 🆕New features
  • Upcoming features
  • 💻Contributing
    • Our coding standards
    • How to push my modification ?
  • 🤕Troubleshooting
  • ❓FAQ
  • 🤓About us
  • Important Links
    • Official Website
    • 📔Release Notes
    • 🥲Known Issues
    • 😎Project Board
    • 🧬Physionet
  • MEDIA
    • ⚛️MEDomics
    • 👾Discord
    • 😺Github
    • 📺YouTube
  • Forms
    • 🗣️Contact us
    • 📝Report an issue
Powered by GitBook
On this page
  • The MEDomicsLab architecture
  • Setup from the ground up 🌱
  • Scalability Branch
  • 1. Installation of Nvm
  • 2. Installation of npm/node.js
  • 3. Clone the repository
  • 4. Setup server side (Go)
  • 5. Init submodules
  • 6. Start the electron app !
  • To Test the Production Build
  • Build the Electron app and Run the built version
Edit on GitHub

Contributing

PreviousUpcoming featuresNextOur coding standards

Last updated 6 months ago

The MEDomicsLab architecture

The map below illustrates the organization of files, modules, databases, and the Frontend-Backend connection within MEDomicsLab. This visual guide is designed to support new contributors in understanding the application’s structure, streamlining the integration of new features, and aiding efficient navigation through the codebase.

Setup from the ground up 🌱

Scalability Branch

The requirements in this section are only necessary if you want to work from the scalability branch.

1. Installation of MongoDB Community Edition

  • Do not install MongoDB as a service.

  • You do not have to install MongoDB compass.

  • You do not have to install mongosh.

  • Install the latest version of MongoDB

2. Installation of MongoDB database tools

  • Install with the MSI Installer.

  • Install with the DEB package.

  • Install with Homebrew.

1. Installation of Nvm

2. Installation of npm/node.js

nvm install lts
nvm use lts

3. Clone the repository

We are currently using develop as our main branch.

git clone -b develop https://github.com/MEDomics-UdeS/MEDomicsLab.git
git clone -b develop git@github.com:MEDomics-UdeS/MEDomicsLab.git

4. Setup server side (Go)

4.1 Installation of Go

4.2 Setup of environment

Execute these commands in a cmd prompt:

setx GOPATH %USERPROFILE%\go
setx PATH "%PATH%;C:\Go\bin"

Execute these commands in a terminal:

echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.bashrc
echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> $HOME/.bashrc

After, close all your terminals because these commands will take effects on the initialisation of any terminal

4.3 Verify installation

  1. Open a new terminal

  2. Run the command go version

  3. If Go is installed correctly, you should see the version number printed to the console.

4.4 Setup for the application

  1. Open a new command prompt and go to the <repo path>/go_server directory.

  2. Run the command go run main.go (on first time, it should download requiered libraries and lunch the server)

  3. you can terminate the process by pressing CTRL + C

  4. Then build the app by running go build main.go (It should create an executable file -> that file will be run by the client side javascript so modification to .go files must be followed by a rebuild) Congratulations, you're now ready to start developing Go applications!

5. Init submodules

cd <.../MEDomicsLab/>
git submodule init
git submodule update --init --recursive --remote
cd pythonCode/submodules/MEDimage
git checkout dev_lab
cd ../MEDprofiles
git checkout fusion_MEDomicsLab

6. Start the electron app !

cd <.../MEDomicsLab>
npm install
npm run dev
  • Use node version v18.16.1. Run:

    • nvm install v18.16.1

    • nvm use v18.16.1

  • Set the Python3.11 :

    • $Env:npm_config_python="C:\path\to\python.exe" # PowerShell

  • Run npm install -g node-gyp

  • Run again npm install

Modify startup settings

  1. Go to file medomics.dev.js

  2. Here is a description of the Object:

const config = {
  // If true, the server will be run automatically when the app is launched
  runServerAutomatically: true,
  // If true, use the react dev tools
  useReactDevTools: false,
  // the default port to use for the server, be sure that no programs use it by default
  defaultPort: 5000,
  // Either "FIX" or "AVAILABLE" (case sensitive)
  // FIX 		-­> if defaultPort is used, force terminate and use defaultPort
  // AVAILABLE 	-> if defaultPort is used, iterate to find next available port
  portFindingMethod: PORT_FINDING_METHOD.FIX
}

To Test the Production Build

Build the Electron app and Run the built version

npm run build:win                            # build and package the application 
.\build\dist\win-unpacked\MEDomicsLab.exe    # Run the executable of the built version
npm run build:linux                    # build and package the application 
bash build/dist/linux-unpacked/medapp  # Run the executable of the built version
npm run build:mac                                                    # build and package the application 
bash build/dist/mac-arm64/MEDomicsLab.app/Contents/MacOS/MEDomicsLab # Run the executable of the built version     

The built app will be located in the build/dist folder

Go visit our !

Follow the installation instructions depending on your OS .

Do not forget to .

Follow the installation instructions depending on your OS .

Download the latest stable release of Go from the official website:

Follow the for your operating system.

On Windows, if you encounter error messages when running npm install,follow the steps here to solve the issue : .

You will need to install the (select the C++ build environment)

Install Python3.11 from

💻
github develop branch
MongoDB Installation
Install MongoDB on Windows
add MongoDB binaries to the System PATH
Install MongoDB on Linux (Ubuntu)
Install MongoDB on Mac
MongoDB Database Tools Installation
Install MongoDB Database Tools on Windows
Install MongoDB Database Tools on Linux
Install MongoDB Database Tools on Mac
NVM for Windows
NVM for Ubuntu
https://golang.org/dl/
installation instructions
https://github.com/nodejs/node-gyp#on-windows
Visual Studio Build Tools
here
MEDomicsLab detailed architecture
High-Level Architecture of the Main Framework Used in the Application