Skip to content

Workflow for New Developers

Flynn Duniho edited this page May 30, 2024 · 1 revision

As distributed to researchers in the field, the MEME tool is a single executable application. This is an Electron app, which is essentially an HTML/Javascript web application bundled with NodeJS and Chromium. This guide describes the high-level organization of the application and how to contribute to it.

Under the hood, MEME uses HTML/Javascript in three distinct programming contexts that share the same developer tools. The three parts are:

  1. MEME Server (an Electron desktop app) - The clickable desktop app that displays an informational window about how to connect to the MEME Web App through a web browser.
  2. MEME Web Apps (multiple Chrome web browser app instances) - These are web apps served to multiple web browsers. They are seved by the MEME Desktop App, which has a built-in web server.
  3. MEME development scripts (NodeJS command line apps) - These are javascript files that are executed on the command line through NodeJS. They can also be executed programmatically from the Electron Desktop App.

It is easy to confuse one environment for another. For most developers, you will primarily be working on the second class of MEME code, which is our web application framework.

Proposed Development Modes

Web App Develop

npm run dev performs the following actions:

  • invokes webpack-dev-server with configuration options from config/webpack.web.config.js
  • server entry point is web-main.js, which (eventually) will spawn the UR system
  • client entry point is web-index.html
  • live reload is supported with any modifications to the js files

Electron Develop

Tool Chain:

  • npm script spawns Electron app
  • npm script also spawns URNET
  • Electron app can connect to URNET's API programmatically
  • Electron app delivers PRE-BUILT web app (no live reload of this source)
  • Changes to the Electron app source DO cause reload of the Electron app itself

Electron Standalone Develop

Tool Chain:

  • npm script packages the entire set of distribution files into a single runtime
  • Electron app provides debug and logging tools
  • all debug code in webapp and electron app is still available for debugging; it's not a true "production" release.
  • installer is produced, and reports back to some kind of installation server