This Repository contains the Backend code that have been used in RoboBrain Project.
The repository contains the following routes:
METHOD | ROUTE | FUNCTIONALITY | ACCESS |
---|---|---|---|
POST | /chair/data | Store the upcoming sensor's data | Superusers |
GET | /chair/data | Get sensor's data | Superusers |
POST | /patient/signup | Register new user | All users |
POST | /patient/login | Login user | All users |
GET | /patient/me | Get patient information | Superusers |
The repository contains the follwoing files:
main.py
: The main file that combine all the routes together and run the server withtest_main.py
: Where we test our routes from sending correct and wrong requests and shows the expected responserequirements.txt
: Contains all the packages and dependencies neededrouters/chair.py
: Contains all the routes related to the data that will come from chair's sensorsrouters/patient.py
: Contains all the routers related to the patient that will use the mobile app and the chairdb/database.py
: Where we connect to our PostgreSQL databasedb/models.py
: Contains the models that will create our tables in databasedb/crud.py
: Contains all the needed function to process the CRUD operations for the routesdb/schemas.py
: Contains all the schemas that used in Request and Response operationsauth/schema.py
: Contains the configuration settings for JWT and the schema used in returning the access token
All needed Packages and libraries included in requirements.txt
you can install it by following the instructions:
python -m venv venv
For Git Bash
source venv\Scripts\activate
For Powershell or cmd
venv\Scripts\activate
pip install requirements.txt
You can run the server by typing the following command line:
uvicorn main:app --reload