WebStudio/README.md

50 lines
1.7 KiB
Markdown
Raw Normal View History

2020-04-11 10:25:57 +00:00
# WebStudio
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
WebStudio is URY's big fun machine for doing radio shows from home, using Web Audio and WebRTC.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
The clientside is written in TypeScript using React and Redux, the serverside is Python using AsyncIO and JACK.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
## Development
2019-11-12 12:21:05 +00:00
2020-04-11 10:27:44 +00:00
### Requirements
Client:
* Node.js and Yarn (Yarn 1, 2 isn't supported very well by webpack/typescript/anything really)
Server:
* Python >=3.7
2020-04-11 10:25:57 +00:00
### Installing
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
Clone the repo and run `yarn`.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
You'll probably want to change the values in `.env` to reflect the MyRadio environment and/or where the server is running (e.g. if you're running the server locally, change `REACT_APP_WS_URL` to `ws://localhost:8079/stream`).
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
If you want to hack on the server, create a virtualenv and install Python packages:
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
```sh
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
```
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
### Hacking
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
Start the client by running `yarn start`.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
Start the server by running `python3 server.py`.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
Don't forget to ensure that both TypeScript and MyPy pass, as your code will be rejected by CI otherwise - run `tsc --noEmit` and/or `mypy server.py` to check.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
## Releasing a new version
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
Every push to `master` is deployed automatically by Jenkins to https://ury.org.uk/webstudio-dev.
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
Deploying to https://ury.org.uk/webstudio is also automated but slightly more involved:
2019-11-12 12:21:05 +00:00
2020-04-11 10:25:57 +00:00
1. Change the `version` field in `package.json` to ensure the "about" page is up to date
2. Push up your version bump and create a pull request to the `production` branch - https://github.com/UniversityRadioYork/WebStudio/compare/production...master
3. Once your changes are merged into `production` they'll get deployed automatically (although you will need to restart the server - ssh to Dolby and run `sudo systemctl restart webstudioserver`)