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

> #### Table of Contents
> - [Running Locally](#running-locally)
J
Jason Park 已提交
5 6 7
> - [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 已提交
8 9 10

## Running Locally

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

2. Clone your forked repo to your machine.

    ```bash
    git clone https://github.com/<your-username>/algorithm-visualizer.git    
    ```
J
Jinseo Park 已提交
18 19 20 21 22 23 24 25 26
    
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 已提交
27

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

    ```bash
    cd algorithm-visualizer

    npm install
    
J
Jason Park 已提交
35
    npm start
J
Jason Park 已提交
36 37
    ```
    
J
Jinseo Park 已提交
38
5. Open [`http://localhost:3000/`](http://localhost:3000/) in a web browser.
J
Jason Park 已提交
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

## 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.