Skip to content

A blood management system, formally verified using dafny

Notifications You must be signed in to change notification settings

AntoLepejian/ProjectVampire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjectVampire

Running Guide

Backend

  1. clone this repo to your computer
  2. Install Python
  3. Update apt-get sudo apt-get update
  4. Install venv: sudo apt install python3-venv
  5. Navigate to /api/ and enter python3 -m venv venv
  6. Navigate to /api/ and enter source venv/bin/activate
  7. type export LC_ALL=C
  8. Run pip install Flask while in (venv) mode
  9. Run pip install tinydb while in (venv) mode
  10. Run pip install flask_cors while in (venv) mode
  11. Run python api.py which is in /api directory to run the server
  12. Test it is working by navigating to the localhost url as shown in termal. The window should display 'working'

Frontend

  1. cd frontend
  2. npm install
  3. npm start

File Explanation

  • api/api.py - This contains the routes exposing the api endpoints
  • handleXXXXXX.py - Files beginning with handle are api endpoint handlers

Sample Queries

Some to test queries, navigate to the url as directed in your terminal (should be localhost:5000)

  • Entering http://localhost:5000/donor/register?name=anto&bloodtype=0- should display TODO: HandleRegisterDonor
  • Entering http://localhost:5000/blood/request?amount=50&hospital=stmarys&bloodtype=a+ should display TODO: HandleBloodRequest
  • Entering http://localhost:5000/blood/collect?bloodtype=A+&carid=batmobile should display TODO: HandleBloodRequest

About

A blood management system, formally verified using dafny

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •