It is an app that builds a platform for both doctors and patients to create, edit and cancel appointments. In this special situation, we want to be able to help people to get medical service when we are keeping social distance.
The backend is built in Express.js, and the database is built in MongoDB. The frontend is built in React. To explore the backend, you can do the following:
To start the server:
git clone [email protected]:pranavs2004/Def-Hacks-Patient.git
Then go to the directory by typing this in the terminal:
cd Def-Hacks-Patient
Then you should see your terminal shows that you are in that directory.
Then you can run npm install
to install all the packages and npm start
to start the server. Then the server will be running.
- post '/auth/login'
A login route will take email and password from the frontend like this:
{
user: {
"email": [email protected],
"password": 123456,
"identity": "doctor"/"patient"
}
}
And if it is success, it will return a token to the front, so user can carry that going through the website. {"token": ...............................}
- post '/auth/register'
A register route will take data like this from the frontend: username, password, first name, last name, phone number
{
user: {
username:
password:
firstName:
lastName:
phoneNumber:
}
}
And will get an user back.
- GET '/doctors'
This route is used for getting all doctors.
- GET '/doctors/:id'
This route is used for get a certain doctor information.
- PUT '/doctors/:id'
This route is used for changing doctor information.
- GET '/doctors/:doctorId/appointments'
This route is used for getting all of the appointments that a doctor has.
- POST '/doctors/:doctorId/appointments'
This route is used for creating an appointment that a doctor has. i also need the patientId to get this done. So please pass a patientId to me, like:
{
appointments: {
}
}
- GET '/doctors/:doctorId/appointments/:appointmentId'
This route is used for reading an appointment that a doctor has.
- GET '/patients/:id'
This route is used for getting a certain patient's information.
- PUT '/patients/:id'
This route is used for changing a certain patient's information.
- GET '/:patientId/appointments'
This route is used for creating an appointment that a patient has.
- GET '/:patientId/appointments/:appointmentId'
This route is used for reading an appointment that a patient has.