CONTRIBUTING.md 2.3 KB
Newer Older
J
Jason Park 已提交
1 2 3 4
# Contributing

> #### Table of Contents
> - [Running Locally](#running-locally)
J
Jason Park 已提交
5
> - [Running in Gitpod](#running-in-gitpod)
J
Jason Park 已提交
6 7 8
> - [Directory Structure](#directory-structure)

Are you a first-timer in contributing to open source? [These guidelines](https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution) from GitHub might help!
J
Jason Park 已提交
9 10 11

## Running Locally

J
Jason Park 已提交
12
1. Fork this repository.
J
Jason Park 已提交
13 14 15 16 17 18

2. Clone your forked repo to your machine.

    ```bash
    git clone https://github.com/<your-username>/algorithm-visualizer.git    
    ```
J
Jinseo Park 已提交
19 20 21 22 23 24 25 26 27
    
3. Choose whether to run [`server`](https://github.com/algorithm-visualizer/server) on your machine or to use the remote server.
    - If you choose to run the server locally as well, follow the instructions [here](https://github.com/algorithm-visualizer/server/blob/master/CONTRIBUTING.md#running-locally).

    - If you choose to use the remote server, **temporarily** (i.e., don't commit this change) modify `package.json` as follows:
        ```diff
        - "proxy": "http://localhost:8080",
        + "proxy": "https://algorithm-visualizer.org",
        ```
J
Jason Park 已提交
28

J
Jinseo Park 已提交
29
4. Install dependencies, and run the web app.
J
Jason Park 已提交
30 31 32 33 34 35

    ```bash
    cd algorithm-visualizer

    npm install
    
J
Jason Park 已提交
36
    npm start
J
Jason Park 已提交
37 38
    ```
    
J
Jinseo Park 已提交
39
5. Open [`http://localhost:3000/`](http://localhost:3000/) in a web browser.
J
Jason Park 已提交
40

J
Jason Park 已提交
41
## Running in Gitpod
A
Anudeep Reddy 已提交
42

J
Jason Park 已提交
43
You can also run `algorithm-visualizer` in Gitpod, a free online dev environment for GitHub.
A
Anudeep Reddy 已提交
44 45 46

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/algorithm-visualizer/algorithm-visualizer)

J
Jason Park 已提交
47 48 49 50 51 52 53 54 55 56 57 58 59 60
## Directory Structure

- [**branding/**](branding) contains representative image files.
- [**public/**](public) contains static files to be served.
- [**src/**](src) contains source code. 
    - [**apis/**](src/apis) defines outgoing API requests.
    - [**common/**](src/common) contains commonly used files.
    - [**components/**](src/components) contains UI components.
    - [**core/**](src/core) processes visualization.
        - [**layouts/**](src/core/layouts) layout tracers.
        - [**renderers/**](src/core/renderers) renders visualization data.
        - [**tracers/**](src/core/tracers) interprets visualizing commands into visualization data.
    - [**files/**](src/files) contains markdown or skeleton files to be shown in the code editor.
    - [**reducers/**](src/reducers) contains Redux reducers.