Skip to content

Commit 4c5dafc

Browse files
committed
Update documentation
1 parent e4e1251 commit 4c5dafc

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

CONTRIBUTING.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributing
2+
3+
> #### Table of Contents
4+
> - [Running Locally](#running-locally)
5+
> - [Directory Structure](#directory-structure)
6+
7+
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!
8+
9+
## Running Locally
10+
11+
1. Fork this repository.
12+
13+
2. Clone your forked repo to your machine.
14+
15+
```bash
16+
git clone https://github.com/<your-username>/server.git
17+
```
18+
19+
3. Install [Docker](https://docs.docker.com/install/), if not done already.
20+
21+
4. Install dependencies, and run the server.
22+
23+
```bash
24+
cd server
25+
26+
npm install
27+
28+
npm run watch
29+
```
30+
31+
5. Open [`http://localhost:8080/`](http://localhost:8080/) in a web browser.
32+
33+
## Directory Structure
34+
35+
- [**src/**](src) contains source code.
36+
- [**config/**](src/config) contains configuration files.
37+
- [**controllers/**](src/controllers) routes and processes incoming requests.
38+
- [**middlewares/**](src/middlewares) contains Express middlewares.
39+
- [**models/**](src/models) manages algorithm visualizations and their hierarchy.
40+
- [**tracers/**](src/tracers) build visualization libraries and compiles/runs code.
41+
- [**utils/**](src/utils) contains utility files.
42+
43+
**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.

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Server
2+
3+
> This repository is part of the project [Algorithm Visualizer](https://github.com/algorithm-visualizer).
4+
5+
`server` serves [`algorithm-visualizer`](https://github.com/algorithm-visualizer/algorithm-visualizer) and provides APIs that the web app needs on the fly. (e.g., GitHub sign in, compiling/running code, etc.)
6+
7+
## Contributing
8+
9+
Check out the [contributing guidelines](https://github.com/algorithm-visualizer/algorithms/blob/master/CONTRIBUTING.md).

0 commit comments

Comments
 (0)