|
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 | +[](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 |
0 commit comments