https://github.com/sergiobenitez/rustlab2023
RustLab 2023 Rocket Workshop
https://github.com/sergiobenitez/rustlab2023
Last synced: 4 months ago
JSON representation
RustLab 2023 Rocket Workshop
- Host: GitHub
- URL: https://github.com/sergiobenitez/rustlab2023
- Owner: SergioBenitez
- License: agpl-3.0
- Created: 2023-11-19T13:11:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-24T08:54:24.000Z (over 1 year ago)
- Last Synced: 2025-01-29T19:46:25.075Z (5 months ago)
- Language: Rust
- Size: 276 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rocket EHR
This an (extremely basic and limited) electronic health records application
written in [Rocket](https://rocket.rs) for the RustLab workshop [Effective
Rocket]. It showcases making use of several of Rocket's unique features.
Notably:* Rocket's _guards_ to ensure 100% input validation.
* _Request guard transparency_ to create type-level proofs of request-time conditions.
* _Private cookies_ to confidentially store data client-side.
* Rocket's _sentinels_ to catch runtime errors before your application starts.
* Use Rocket's _async, real-time, typed streams_ to live-update client-side data.[Effective Rocket]: https://rustlab.it/talks/effective-rocket-building-secure-blazing-fast-web-apps-with-confidence
## Scope
This application is designed only as an education tool. It is not designed to be
a comprehensive or feature-complete EHR solution. It is not designed to adhere
to or meet legal standards associated with managing patient data. It is not
intended to be used in production. Again, it is solely an educational tool.The functionality implemented by this application consists of:
```mermaid
erDiagram
ADMIN ||--o{ DOCTOR : managesDOCTOR ||--|{ PATIENT : treats
DOCTOR ||--|{ VISIT : writes
PATIENT ||--|{ VISIT : readsADMIN {
}
DOCTOR {
}
PATIENT {
}
VISIT {
}
```* Health Records
* Roles: administrators, doctors, and patients.
_Admins_ have complete authority over the application. They may add doctors
and patients and assign and re-assigned patients to doctors._Doctors_ may see their patients and any of their patients visits.
_Patients_ may see their doctor and their visits.
* Records: Visits w/ notes.
# Getting Started
```
git clone https://github.com/SergioBenitez/RustLab2023.git
cd RustLab2023
export DATABASE_URL="sqlite:$(pwd)/db/db.sqlite"
cargo install sqlx-cli --no-default-features --features sqlitecd db
cargo sqlx database create
cargo sqlx migrate runcargo run
```# License
This source code is licensed under the [GNU AGPLv3](LICENSE).
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this project shall be licensed under the GNU AGPLv3 License,
without any additional terms or conditions.