|
2 | 2 |
|
3 | 3 | > #### Table of Contents |
4 | 4 | > - [Running Locally](#running-locally) |
5 | | -> - [Creating a Pull Request](#creating-a-pull-request) |
| 5 | +> - [Running in Gitpod](#running-in-gitpod) |
| 6 | +> - [Directory Structure](#directory-structure) |
| 7 | +
|
| 8 | +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! |
6 | 9 |
|
7 | 10 | ## Running Locally |
8 | 11 |
|
|
13 | 16 | ```bash |
14 | 17 | git clone https://github.com/<your-username>/algorithm-visualizer.git |
15 | 18 | ``` |
| 19 | + |
| 20 | +3. Choose whether to run [`server`](https://github.com/algorithm-visualizer/server) on your machine or to use the remote server. |
| 21 | + - 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). |
16 | 22 |
|
17 | | -3. Install [Docker](https://docs.docker.com/install/), if not already installed. |
| 23 | + - If you choose to use the remote server, **temporarily** (i.e., don't commit this change) modify `package.json` as follows: |
| 24 | + ```diff |
| 25 | + - "proxy": "http://localhost:8080", |
| 26 | + + "proxy": "https://algorithm-visualizer.org", |
| 27 | + ``` |
18 | 28 |
|
19 | | -4. Install dependencies, and run the server. |
| 29 | +4. Install dependencies, and run the web app. |
20 | 30 |
|
21 | 31 | ```bash |
22 | 32 | cd algorithm-visualizer |
23 | 33 |
|
24 | 34 | npm install |
25 | 35 | |
26 | | - npm run dev |
| 36 | + npm start |
27 | 37 | ``` |
28 | 38 | |
29 | | -5. Open [`http://localhost:8080/`](http://localhost:8080/) in a web browser. |
30 | | - |
31 | | -## Creating a Pull Request |
32 | | - |
33 | | -6. Create a branch addressing the issue/improvement you'd like to tackle. |
| 39 | +5. Open [`http://localhost:3000/`](http://localhost:3000/) in a web browser. |
34 | 40 |
|
35 | | - ```bash |
36 | | - git checkout -b my-problem-fixer-branch |
37 | | - ``` |
| 41 | +## Running in Gitpod |
38 | 42 |
|
39 | | -7. Write some awesome code. |
| 43 | +You can also run `algorithm-visualizer` in Gitpod, a free online dev environment for GitHub. |
40 | 44 |
|
41 | | -8. Commit the changes, and push them to `my-problem-fixer-branch` branch on your forked repo. |
| 45 | +[](https://gitpod.io/#https://github.com/algorithm-visualizer/algorithm-visualizer) |
42 | 46 |
|
43 | | - ```bash |
44 | | - git add . |
45 | | - |
46 | | - git commit -m "Explain my awesome changes" |
47 | | -
|
48 | | - git push origin my-problem-fixer-branch |
49 | | - ``` |
| 47 | +## Directory Structure |
50 | 48 |
|
51 | | -9. Create a pull request from `my-problem-fixer-branch` branch on your forked repo to `master` branch on the main repo. |
| 49 | +- [**branding/**](branding) contains representative image files. |
| 50 | +- [**public/**](public) contains static files to be served. |
| 51 | +- [**src/**](src) contains source code. |
| 52 | + - [**apis/**](src/apis) defines outgoing API requests. |
| 53 | + - [**common/**](src/common) contains commonly used files. |
| 54 | + - [**components/**](src/components) contains UI components. |
| 55 | + - [**core/**](src/core) processes visualization. |
| 56 | + - [**layouts/**](src/core/layouts) layout tracers. |
| 57 | + - [**renderers/**](src/core/renderers) renders visualization data. |
| 58 | + - [**tracers/**](src/core/tracers) interprets visualizing commands into visualization data. |
| 59 | + - [**files/**](src/files) contains markdown or skeleton files to be shown in the code editor. |
| 60 | + - [**reducers/**](src/reducers) contains Redux reducers. |
0 commit comments