nanreh / calendar-hack

Calendar Hack: a web application for runners who train for races.
https://www.defy.org/hacks/calendarhack
MIT License
71 stars 24 forks source link
fitness runnning

Calendar Hack Project Info

Calendar Hack is a web application for runners who train for races. It renders a training program on a calendar and provides some basic editing features. It also provides for downloading the result as an iCal file which can be imported into any calendar application worth using.

The project is hosted at defy.org/hacks/calendarhack

More project details are available on the About page

Contributing

If you have a bugfix, a new feature, a new training plan, a UX/UI fix, or other contribution, please send a PR. Feel free to create a GitHub issue if you want to call something out.

Plans

Training plans are represented as YAML files that are easy to create and edit. They can be found in plans/yaml. A JSON schema exists at public/schema/plan-schema.json

Running Locally

Calendar Hack is a React application. It was created using Create React App with the TypeScript template:

yarn create react-app ch-bootstrap --template typescript

So you can run locally with: yarn start

The other standard scripts exist also: yarn test, yard build, etc.

Validating Plans

The plan validator depends on ajv to validate against a JSON schema

Install ajv npm install -g ajv-cli

then

yarn run validatePlans

Converting new plans

If you are adding a plan, you should write it in YAML and then run ./bin/convertPlans to generate the JSON version for the application. The converter is written in python and requires pyyaml

python3 -m venv my_env
source ./venv/bin/activate
pip install pyyaml
python3 ./bin/convertPlans