Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.84 KB

CONTRIBUTING.md

File metadata and controls

54 lines (37 loc) · 1.84 KB

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:

    # By putting dummy values, GitHub sign in will not work locally
    GITHUB_CLIENT_ID = dummy
    GITHUB_CLIENT_SECRET = dummy
    
    # By putting dummy values, extracting visualizing commands will not work locally (except for JavaScript).
    AWS_ACCESS_KEY_ID = dummy
    AWS_SECRET_ACCESS_KEY = dummy
  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.