>

Welcome to Taafi API Documentations

Get started

This is the Backend API Documentation For Taafi Medical System.

How to Use

To get Started, You Have To Have The Base URL For The API, For Example :
http://localhost:8000/
For Now it is : http://api.taafy.omarelnemr.xyz/ ( make sure to use HTTP not HTTPS as we didn't setp up the SSL Certificate for HTTPS yet )

Then You Would Have to Follow The Instructions Below For How to Use Every Endpoint with A Correct Parameters

Common Responses

Every Endpoint when Triggerd, It Takes it's Parameteres and then Respooned With with the Desired Data or one of The Following Four Options:

Done With Status 200:

When The Request is Supposed To Take an Action like Submitting Homework or adding a new Event Announcement, if you Receive "Done" That Means Every Thing Went Well and The Action is Successfully Performed

Missing Parameters With Status 406:

When The Request Require Some Parameters and they are not Given in the Request or may be misspelled, so make sure you add them and spill them right

Not Found With Status 404:

When You Are Trying to Get Some Data That is Not Exist in Database, or The Parameters are having invalid Values

Error While DB Request With Status 406:

When Something Happen After Initializing a Request To Database, in that case, you might Check the Parameters Data Types and Values, or How The Database Parameters are Named For Addressing

if you find Any Struggle with One of These Responses or there is another response Showed Up, Contact Me Immediately

For Example, To Use URL to Login, The URL Will Be Like:
https://localhost:8000/login/

Sections

Sections is The The Differant Features of the Project, like Login Feature, chat Feature, Blog and More

General Endpoints

Note 1 (Uploading):

when file has to be uploaded, Front-end User /uplaod or profileimageUpload 'as Below' To upload the file or an image to the Server, then use another Endpoint According to The Need to save This action to the Database

Here is All General Endpoints That Can Be Used:

User Authentication

The Section For User Authentication Operations, Like login, Signup, Forget Password and More

Note 1 (Signup):

in the Procces of Signup, the Steps Will Be As Follows:
- user click on Signup as a Doctor or as a Patient options
- then fill email and Password and then hit signup, so the app send a request to '/signup'
- then there Will Be A code sent To His Email, he has to fill it in in less than 2 minutes
- then the app send the Entered Verification Code to '/check-confirmation-code' to Check weather correct or Wrong
- if Correct, the App redirect to Main Info Page to Complete Main Info as Below, weather '/doctor-main-info' or '/patient-main-info' according to the Role

Note 2 (Forget Password):

in the Proccess of Password reseting "when Forget Password": - The User Click on Forget Password and fill in his email to send to /forget-password Endpoint
- The There will Be a Code Sent to His Email, so He Has to Fill It and Send to "/confirm-forget-password"
- if the user send the Correct Code, the Server Will send a Secret Code, the App should Store it localy, the Code has an Expiray Date of 2 Hours
- Then the app Should redirect to a Page for a User to Fill a New Password and Confirm New Passwords (two Fields) and then when user hit submit, the app Send to '/reset-password' with the Required Information as Below

Profile Edits (General)

Here is All Endpoints That Can Be Used:

Profile Edits (Patient)

Here is All Endpoints That Can Be Used:

Profile Edits (Doctor)

Here is All Endpoints That Can Be Used:

Public Community

Public Community is the Space for All Patient to Share their Thought and to have Something like a Group Therapy, they can Post what they want and then the System Doctor Admin decides Weather if the Post is Sutable to be Posted or not, if yes he approved it and the post appears on Posts Feed.

the Posts Will Be Loaded in Blocks, Meaning that it will load 15 Posts at a time in order To Reduce the Proccesing


Here is All Endpoints That Can Be Used:

Therapists

Therapists is the Section related to Find Doctors, With all Thier Details and Book an therapists, Here is All Endpoints That Can Be Used:

Blog

Blog are The Place where Doctors can Write Articles About Some Topic, and Patient can read and Vote for These Articles.

When The Doctor Publish an Article, The Other doctors can See it and Vote for this Article, as well as patients can Vote For it too, in order to Establish a Good Communication Method Between All Doctors and All Patients.

the Articles Will Be Loaded in Blocks, Meaning that it will load 15 Articles at a time in order To Reduce the Proccesing


Here is All Endpoints That Can Be Used:

Q&A

Q&A is the Section Where Patient Can Ask Questions Publicly, and Doctors Answer Them


Here is All Endpoints That Can Be Used:

Supervisors

Supervisors are the Responsoble For Some Action on the System Like Filtering the Posts and Comments


Here is All Endpoints That Can Be Used:

Moderation

This Section is About Moderation Endpoints. Users can report inappropriate content, and the system automatically flags content as unsafe when first reported. Administrators can review and manage reported content.


Here is All Endpoints That Can Be Used:

Notifications

This Section is About Notifications Endpoints, the Notifications System is Implemented Using Firebase and the Data is Stored in the Firestore DB, the Following Endpoint with be Responsoble for Adding or Creating New Data as this Step Require some Authentication and Do Some Actions, so the Data Show Be readed Directly From Firebase, But When Adding New or Editing, its Highlyy REcomended to Do So Using the Following Endpoints If Available


Here is All Endpoints That Can Be Used:

AI Chat

This Section is About AI Chat Endpoints


Here is All Endpoints That Can Be Used:

Chat

This Section is About Chat Endpoints, the Chat System is Implemented Using Firebase and the Data is Stored in the Firestore DB, the Following Endpoint with be Responsoble for Adding or Creating New Data as this Step Require some Authentication and Do Some Actions, so the Data Show Be readed Directly From Firebase, But When Adding New or Editing, its Highlyy REcomended to Do So Using the Following Endpoints If Available


Here is All Endpoints That Can Be Used:

Admin

This Section is About Partner Endpoints


Here is All Endpoints That Can Be Used:

Admin

This Section is About Admin Endpoints


Here is All Endpoints That Can Be Used: