- Rust 56.3%
- HTML 22.4%
- JavaScript 20%
- jq 1.3%
| .idea | Initial commit | |
| grafana | add README and grafana dashboard examples | |
| src | fix some serialisation issue with the form timestamp | |
| static | fix add strain button getting removed by remove_levels() function | |
| .gitignore | Add an update method by supplying the object ID | |
| Cargo.lock | Add functionality to add a custom time stamp | |
| Cargo.toml | Add functionality to add a custom time stamp | |
| README.md | add README and grafana dashboard examples | |
| Rocket.toml | Add a cookie with the bearer token when logging in | |
This project aims to provide a convenient way of tracking stress levels.
Installation / Quick Start
PKGBUILD for archlinux coming soon (tm).
For now, you need to
- clone the repository
cargo build- add
jquery-3.7.1-min.jsto thestaticdirectory - add
js.cookie.min.jsto thestaticdirectory - configure the application via
Rocket.toml(example is provided here)- provide a mongodb URL
- set a default username and password
cargo runand visit https://localhost:8001
Interface
You'll be greeted by a login modal if you're not already logged in. Currently there's only the option to add a new level. Optionally with custom time stamp and a note.
Features TODO (webapp)
- login screen
- add level
- add level with note
- add level with note and custom timestamp
- display levels and notes for a specific day
- edit level:
- add note
- delete
- monthly overview of stress levels
Grafana
An Json config is provided to quickly spin up a dashboard.
- Install the Infinity Datasource Plugin
On Arch-Linux for example using the grafana cli:
sudo -u grafana grafana cli --homepath "/usr/share/grafana" plugins install yesoreyeram-infinity-datasource
- Set up URL and Headers
Authentication is provided by setting the Authentication header to a bearer token.
You can get this token for example by sending a CURL request to the login endpoint:
curl -X POST -H 'Content-Type: application/json' -d '{ "username": "puppy", "password": "wauwauwau" }' http://localhost:8001/login
Alternatively, you can aquire the content of the token Cookie after logging into the web application.
Background
For people suffering from borderline personality disorder (BPD), but also post traumatic stress disorder (PTSD) or anyone else struggling with high levels of stress caused by feelings, getting a feeling of your stress levels is essential to efficently and successfully use skills instead of engaging in self-harming behaviour. This project aims to enable a digital tracking of stress levels and causes.