Coder Social home page Coder Social logo

connellr023 / oncology-quest Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 927 KB

A progressive web app architected to aid Medical Oncology trainees and rotation directors.

Home Page: https://www.oncologyquest.net

Rust 33.13% HTML 0.59% TypeScript 12.62% Vue 22.15% SCSS 2.56% Shell 0.41% Dockerfile 0.44% Kotlin 0.04% Dart 27.83% Swift 0.22% Objective-C 0.01%
fullstack oncology solution-applications startup task-manager webapp pwa

oncology-quest's Introduction

$\text{Oncology Quest}$

A progressive web app architected to aid Medical Oncology trainees and rotation directors.

Important

This app is only meant for trainees. If that is not you, then please do not try using this service as it will place unnecassary load on the webserver and illegitimate accounts will be removed.

Note

A flutter client is in development to facilitate a mobile app and possibly replace the web client in the future so that the client code lives on a single code base.

Rust Actix JWT Postgres Vue.js TypeScript Flutter Dart AWS Docker API CI Status Flutter Client CI Status


Table of Contents


Features

  • Straightforward user registration and authentication
  • Management dashboard for administrative users
  • Responsive and dark themed front end user interface
  • Caching and memoization of frequently accessed data to reduce server and database load

Security Measures

  • Role based authentication for admins and regular users
  • Password hashing with BCRYPT combined with 64-bit integer nonce used as a salt
  • Simple rate limiter on sensitive API routes
  • HTTPS connection in production with appropriate cookies and CORS policies
  • REGEX patterns that filter every user input to prevent XSS attacks as well as SQL injection but the backend already uses prepared statements anyway
  • Writing the backend in Rust is a security feature in itself

Warning

While the security measures in place are sufficient for the data sensitivity of this app, be smart with choosing passwords. Use one that is unique to this service.


API Integration and Penetration Testing

  • There is a seperate Rust crate in this repository that handles integration testing for the API endpoint of this web app
  • The integration tests send automated requests to the API and assert the expected responses (as if to simulate a real user)
  • These tests are executed by orchestrating 3 containers via Docker Compose
    • Database container running a PostgreSQL instance
      • This serves as a disposable database for pure testing purposes
      • It is easily instantiated and destroyed since it is running in a container
    • Endpoint container running an instance of the backend server
    • Penetration/Integration container
      • This is the container that sends requests to the endpoint

Deployment Details

  • This web app is deployed for users on AWS via Elastic Container Service
  • An Application Load Balancer as well as Route 53 DNS services are employed to route users to the registered domain name

Building API for production

cargo build --release --features "production"

When building for production, it is essential to enable the production feature as that will enable the specialized cookie and CORS policies as well as the rate limiter.

Additionally, for single container monolith use with the API also serving the static frontend files, use the monolith feature.

cargo build --release --features "production monolith"

Next, to containerize the compiled binary run:

docker build -t oncology-quest-api:latest .

in the oncology-quest-api directory.

If the frontend is to be run as a seperate NGINX webserver, build the front end with:

docker build -t oncology-quest-web:latest .

in the oncology-quest-web directory.

To containerize as a monolith (assuming API was compiled with monolith feature) run:

docker build -t oncology-quest-monolith:latest . -f monolith.dockerfile

in the root project directory.


Backend Development Environment Variables

.env file sample for backend

HOST_IP=127.0.0.1
HOST_PORT=8080
DATABASE_URL=postgres://admin:password@localhost:5432/bqdev
JWT_SECRET=...

Screenshots

1 2 3 4 5 6


Developed and Tested by Connell Reffo in 2024.

oncology-quest's People

Contributors

connellr023 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.