提交 c3c6dedb 编写于 作者: J Jason Park

Update documentations

上级 6d4326b9
......@@ -3,19 +3,22 @@
> #### Table of Contents
> - [Project Structure](#project-structure)
> - [Directory Structures](#directory-structures)
> - [algorithms](#algorithms)
> - [tracers](#tracers)
> - [algorithm-visualizer](#algorithm-visualizer)
> - [algorithms](#algorithms)
## Project Structure
The project [Algorithm Visualizer](https://github.com/algorithm-visualizer) consists of the following three repositories.
The project [Algorithm Visualizer](https://github.com/algorithm-visualizer) consists of the following repositories.
- [`algorithm-visualizer`](https://github.com/algorithm-visualizer/algorithm-visualizer) contains the frontend server written in React and the backend server written in Node.
- [`algorithms`](https://github.com/algorithm-visualizer/algorithms) contains public algorithms shown on the sidebar.
- [`tracers`](https://github.com/algorithm-visualizer/tracers) builds visualization libraries for each supported language based on the specifications, and executes users' codes to extract visualization data.
- [`tracers.js`](https://github.com/algorithm-visualizer/tracers.js) is a visualization library for JavaScript.
- [`algorithm-visualizer`](https://github.com/algorithm-visualizer/algorithm-visualizer) contains the frontend server written in React and the backend server written in Node.
- [`tracers.cpp`](https://github.com/algorithm-visualizer/tracers.cpp) is a visualization library for C++.
- [`tracers.java`](https://github.com/algorithm-visualizer/tracers.java) is a visualization library for Java.
## Directory Structures
......@@ -23,9 +26,9 @@ The project [Algorithm Visualizer](https://github.com/algorithm-visualizer) cons
- **Category A/** is the name of the category.
- **Algorithm A/** is the name of the algorithm.
- **code.js** is the implementation of the algorithm in JavaScript.
- **code.cpp** is the implementation of the algorithm in C++.
- **code.java** is the implementation of the algorithm in Java.
- **code.js** is the implementation of the algorithm in ECMAScript.
- **README.md** is the description of the algorithm.
- **Algorithm B/**
- **Algorithm C/**
......@@ -34,26 +37,6 @@ The project [Algorithm Visualizer](https://github.com/algorithm-visualizer) cons
- **Category C/**
- ...
### tracers
- **bin/** is where executables are written to.
- **docs/** is where library documentations are written to.
- **src/** contains source codes.
- **common/** contains commonly used files.
- **executables/** contains the source codes of executables.
- **languages/** builds visualization libraries and defines how to execute users' codes for ...
- **cpp/** ... C++.
- **builder/** builds a visualization library based on the specifications.
- **skeleton/** provides the skeleton of the visualization library.
- **executor/** defines how to execute users' codes.
- **java/** ... Java.
- **js/** ... ECMAScript.
- **specs/** defines the specifications.
- **randomizers/** contains the specifications of randomizers.
- **tracers/** contains the specifications of tracers.
**NOTE** that for ECMAScript, it builds a web worker rather than a visualization library. Once browsers fetch the web worker, they will submit users' codes to the web worker locally, instead of submitting to the remote backend server, to extract visualization data. It not only enables browsers to visualize ECMAScript codes quickly, but also significantly reduces the load on the backend server.
### algorithm-visualizer
- **app/** wraps the backend and frontend servers.
......@@ -67,10 +50,11 @@ The project [Algorithm Visualizer](https://github.com/algorithm-visualizer) cons
- **apis/** defines outgoing API requests.
- **common/** contains commonly used files.
- **controllers/** routes and processes incoming requests.
- **models/** manages the algorithm data.
- **public/** is where the backend server writes to.
- **algorithms/** is cloned [`algorithms`](https://github.com/algorithm-visualizer/algorithms) repo.
- **codes/** is where users' codes are uploaded to
- **tracers/** is cloned [`tracers`](https://github.com/algorithm-visualizer/tracers) repo.
- **algorithms/** is a cloned [`algorithms`](https://github.com/algorithm-visualizer/algorithms) repo.
- **codes/** is where users' codes are uploaded to.
- **tracers/** builds a web worker and docker images that compile and run users' codes.
- **frontend/** contains the source code of the frontend server.
- **apis/** defines outgoing API requests.
- **common/** contains commonly used files.
......@@ -81,3 +65,5 @@ The project [Algorithm Visualizer](https://github.com/algorithm-visualizer) cons
- **reducers/** contains Redux reducers.
- **skeletons/** contains skeleton files to be shown in the code editor.
- **static/** contains static files to be served.
**NOTE** that for JavaScript, it builds a web worker rather than a docker image. Once browsers fetch the web worker, they will submit users' codes to the web worker locally, instead of submitting to the remote backend server, to extract visualization data. It not only enables browsers to visualize JavaScript codes quickly, but also reduces the load on the backend server.
......@@ -12,18 +12,20 @@ Learning algorithms from text and static images is quite boring. There have been
## Contributing
**I want to add or improve an algorithm.**
If you want to ...
- We have a separate repository for public algorithms. Check out the [contributing guidelines](https://github.com/algorithm-visualizer/algorithms/blob/master/CONTRIBUTING.md) in [`algorithms`](https://github.com/algorithm-visualizer/algorithms) repo.
- **Add or improve an algorithm.**
**I want to improve the UI.**
We have a separate repository for public algorithms. Check out the [contributing guidelines](https://github.com/algorithm-visualizer/algorithms/blob/master/CONTRIBUTING.md) in [`algorithms`](https://github.com/algorithm-visualizer/algorithms) repo.
- Check out the [contributing guidelines](https://github.com/algorithm-visualizer/algorithm-visualizer/blob/master/CONTRIBUTING.md) in this repo. The [directory structure](https://github.com/algorithm-visualizer/algorithm-visualizer/blob/master/PROJECT_DETAILS.md#algorithm-visualizer) might be helpful as well.
- **Improve the UI.**
**I want to enhance visualization libraries.**
Check out the [contributing guidelines](https://github.com/algorithm-visualizer/algorithm-visualizer/blob/master/CONTRIBUTING.md) in this repo. The [directory structure](https://github.com/algorithm-visualizer/algorithm-visualizer/blob/master/PROJECT_DETAILS.md#algorithm-visualizer) might be helpful as well.
- It is highly recommended to read the entire [project details](https://github.com/algorithm-visualizer/algorithm-visualizer/blob/master/PROJECT_DETAILS.md) before working on it. Making changes to visualization libraries often requires a lot of work since you may need to work on all of the following repositories: [`algorithms`](https://github.com/algorithm-visualizer/algorithms), [`tracers`](https://github.com/algorithm-visualizer/tracers), and [`algorithm-visualizer`](https://github.com/algorithm-visualizer/algorithm-visualizer). We encourage you to raise an issue about your idea of enhancement before working on it.
- **Revise the specifications of visualization libraries.**
Making changes to the specifications is often followed by updating visualization libraries for every supported language and the affected public algorithms accordingly. It is highly recommended to read the entire [project details](https://github.com/algorithm-visualizer/algorithm-visualizer/blob/master/PROJECT_DETAILS.md) and to raise an issue about your proposal before working on it.
**I have a question in regards to contributing.**
- **Fix issues in a visualization library for a specific langauge.**
- Raising an issue is another way of contributing!
Check out the contributing guidelines ([JavaScript](https://github.com/algorithm-visualizer/tracers.js/blob/master/CONTRIBUTING.md), [C++](https://github.com/algorithm-visualizer/tracers.cpp/blob/master/CONTRIBUTING.md), and [Java](https://github.com/algorithm-visualizer/tracers.java/blob/master/CONTRIBUTING.md)) in the repo of the visualization library.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册