Skip to content

Commit d1c1e11

Browse files
Update READMEs (#281)
* Add README to VC+ and remove steps of VC+ from main README * Change port from 8000 to 8080 in backend README * Change port from 3000 to 4000 of frontend
1 parent b4b9733 commit d1c1e11

5 files changed

Lines changed: 107 additions & 37 deletions

File tree

README.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,6 @@ For eg. `python -m venv .venv`
4141
5. Add `.env` file to the `backend` folder. And add the variables as defined in [.env.template](./.env.template)
4242
6. Create the static files to serve during execution by `python manage.py collectstatic`
4343

44-
45-
### How to setup the VC+
46-
47-
1) Navigate to VC+:```cd VC+```
48-
2) Activate the environment:```source env/bin/activate```
49-
3) Install required packages
50-
```
51-
pip install django
52-
pip install djangorestframework
53-
pip install django-webpack-loader
54-
```
55-
56-
4) Install dependencies for REACT (with Yarn or npm, required Node.JS >= 14.16)
57-
```
58-
cd react_frontend/ && yarn install
59-
```
60-
6144
## Start Application
6245

6346
#### Step 1: Start Frontend
@@ -69,21 +52,8 @@ cd react_frontend/ && yarn install
6952
1. Navigate to the backend directory:```cd backend```
7053
2. Start the backend server:```python3 manage.py runserver 8080```
7154

72-
73-
#### Step 4: Start VC+ Frontend
74-
1. Navigate to VC+:```cd VC+```
75-
2. Navigate to the react_frontend directory:```cd react_frontend```
76-
3. Run the development server:```yarn run dev```
77-
78-
79-
#### Step 5: Start Another Backend Instance
80-
1. Open another terminal.
81-
2. Navigate to VC+:```cd VC+```
82-
3. Activate the environment:```source env/bin/activate```
83-
4. Start another instance of the backend server:```python3 manage.py runserver```
84-
85-
#### Step 6: Run Docker image RADI
86-
``sudo docker run --rm -it --name radi -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-academy:3.4.5 --no-server``
55+
### How to setup the VC+
56+
In order to setup VC+ to use RoboticsAcademy and VisualCircuit together, follow the instructions given [here](./VC%2B/README.md)
8757

8858

8959
<!-- CONTRIBUTING -->

VC+/README.md

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,102 @@
1-
# VC+
2-
Version 1.0
1+
<div id="top"></div>
2+
3+
<a href="https://jderobot.github.io/"><img src="docs/assets/gif/logo.gif" width="150" align="right" /></a>
4+
5+
# Visual Circuit +
6+
7+
8+
[![Contributors][contributors-shield]][contributors-url]
9+
[![Forks][forks-shield]][forks-url]
10+
[![Stargazers][stars-shield]][stars-url]
11+
[![Issues][issues-shield]][issues-url]
12+
[![License](http://img.shields.io/:license-gpl-blue.svg)](http://opensource.org/licenses/GPL-2.0)
13+
14+
15+
16+
17+
Visual Circuit+ is an **open source** tool to use RoboticsAcademy alongwith Visual Circuit. We start a Docker image of Robotics Academy and connect to it with our Visual Circuit instance. This is done in order to able to use Circuits directly from the web-editor and run them with RoboticsAcademy exercises.
18+
19+
For more information visit our site [VisualCircuit](https://jderobot.github.io/VisualCircuit/)
20+
21+
22+
## Prerequisite
23+
24+
### Front-end
25+
For more specific instructions check the frontend [readme](./frontend/README.md)
26+
1. Clone the repository https://github.com/JdeRobot/VisualCircuit.git
27+
3. Change directory to `frontend`
28+
4. Run `npm install`
29+
30+
31+
### Back-end
32+
For more specific instructions check the backend [readme](./backend/README.md)
33+
34+
1. Clone the repository https://github.com/JdeRobot/VisualCircuit.git
35+
2. Change directory to `backend`
36+
3. Create a Python3 virtual environment using venv.
37+
For eg. `python -m venv .venv`
38+
4. After activating the virtual environment, install the dependencies by running
39+
`pip install -r requirements.txt`
40+
5. Add `.env` file to the `backend` folder. And add the variables as defined in [.env.template](./.env.template)
41+
6. Create the static files to serve during execution by `python manage.py collectstatic`
42+
43+
44+
### How to setup the VC+
45+
46+
1) Navigate to VC+:```cd VC+```
47+
2) Activate the environment:```source env/bin/activate```
48+
3) Install required packages
49+
```
50+
pip install django
51+
pip install djangorestframework
52+
pip install django-webpack-loader
53+
```
54+
55+
4) Install dependencies for REACT (with Yarn or npm, required Node.JS >= 14.16)
56+
```
57+
cd react_frontend/ && yarn install
58+
```
59+
60+
## Start Application
61+
62+
#### Step 1: Start Frontend
63+
1. Navigate to the frontend directory:```cd frontend```
64+
2. Start the frontend server:```npm start```
65+
66+
67+
#### Step 2: Start Backend
68+
1. Navigate to the backend directory:```cd backend```
69+
2. Start the backend server:```python3 manage.py runserver 8080```
70+
71+
72+
#### Step 4: Start VC+ Frontend
73+
1. Navigate to VC+:```cd VC+```
74+
2. Navigate to the react_frontend directory:```cd react_frontend```
75+
3. Run the development server:```yarn run dev```
76+
77+
78+
#### Step 5: Start Another Backend Instance
79+
1. Open another terminal.
80+
2. Navigate to VC+:```cd VC+```
81+
3. Activate the environment:```source env/bin/activate```
82+
4. Start another instance of the backend server:```python3 manage.py runserver```
83+
84+
#### Step 6: Run Docker image RADI
85+
``sudo docker run --rm -it --name radi -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-academy:3.4.5 --no-server``
86+
87+
88+
<!-- MARKDOWN LINKS & IMAGES -->
89+
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
90+
[contributors-shield]: https://img.shields.io/github/contributors/JdeRobot/VisualCircuit.svg?style=plastic
91+
[contributors-url]: https://github.com/JdeRobot/VisualCircuit/graphs/contributors
92+
[forks-shield]: https://img.shields.io/github/forks/JdeRobot/VisualCircuit.svg?style=plastic
93+
[forks-url]: https://github.com/JdeRobot/VisualCircuit/network/members
94+
[stars-shield]: https://img.shields.io/github/stars/JdeRobot/VisualCircuit.svg?style=plastic
95+
[stars-url]: https://github.com/JdeRobot/VisualCircuit/stargazers
96+
[issues-shield]: https://img.shields.io/github/issues/JdeRobot/VisualCircuit.svg?style=plastic
97+
[issues-url]: https://github.com/JdeRobot/VisualCircuit/issues
98+
[license-shield]: https://img.shields.io/github/license/opensource.org/licenses/GPL-2.0
99+
[license-url]: http://opensource.org/licenses/GPL-2.0
100+
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=plastic&logo=linkedin&colorB=555
101+
[linkedin-url]: https://linkedin.com/in/linkedin_username
102+
[product-screenshot]: images/screenshot.png

backend/.env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
# The key (for eg. DJANGO_DEBUG) should be as is in this template file. They are used in code to access the value.
77

88
DJANGO_DEBUG=true -> Don't set this is prod. Set it only for DEV
9-
VISUAL_CIRCUIT_FRONTEND_HOST='http://localhost:3000' -> Url for the VisualCircuit frontend
9+
VISUAL_CIRCUIT_FRONTEND_HOST='http://localhost:4000' -> Url for the VisualCircuit frontend
1010
DJANGO_ALLOWED_HOSTS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -> list of hosts to allow. For eg. localhost,visualcircuit.org
1111
DJANGO_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -> Secret key for django backend

backend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ For eg. `python -m venv .venv`
1212
`pip install -r requirements.txt`
1313
5. Add `.env` file to the `backend` folder. And add the variables as defined in [.env.template](./.env.template)
1414
6. Create the static files to serve during execution by `python manage.py collectstatic`
15-
7. Start the server by running `python manage.py runserver 8000`
15+
7. Start the server by running `python manage.py runserver 8080`

frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ React based front end application for VisualCircuit3.
88
3. Change directory to `frontend`
99
4. Run `npm install`
1010
5. Run `npm start`
11-
6. Open http://localhost:3000/ in browser.
11+
6. Open http://localhost:4000/ in browser.
1212

1313

1414

0 commit comments

Comments
 (0)