You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.7 KiB

Contributing

Table of Contents

Are you a first-timer in contributing to open source? These guidelines from GitHub might help!

Running Locally

  1. Fork this repository.

  2. Clone your forked repo to your machine.

    git clone https://github.com/<your-username>/server.git    
    
  3. Install Docker, if not done already.

  4. Create .env.local in the project root:

    GITHUB_CLIENT_ID = dummy
    GITHUB_CLIENT_SECRET = dummy
    

    It's safe to put any dummy value to them unless you need the GitHub sign in functionality locally.

  5. Install dependencies, and run the server.

    cd server
    
    npm install
    
    npm run watch
    
  6. Open http://localhost:8080/ in a web browser.

Directory Structure

  • src/ contains source code.
    • config/ contains configuration files.
    • controllers/ routes and processes incoming requests.
    • middlewares/ contains Express middlewares.
    • models/ manages algorithm visualizations and their hierarchy.
    • tracers/ build visualization libraries and compiles/runs code.
    • utils/ contains utility files.

NOTE that for JavaScript, it builds a web worker rather than a docker image. Once a browser fetches the web worker, it will submit users' code to the web worker locally, instead of submitting to the remote server, to extract visualizing commands.