During the 2020 COVID-19 pandemic lockdown in India, good Samaritans and NGOs stepped up to help under-privileged localities with basic needs like food, water, sanitation, etc.
To help their efforts, I along with and
created an app that used Geo-fencing technology to highlight communities that were in need.
POST /helper
Query Params: none
FormData:
- group_name
- representative
- phone
- password
- locality (object of lat,lng and place)
- social_service (optional: Should be stringified array)
Registeration of social service groups/NGOs
POST /helper/verify
Query Params: none
FormData:
- otp
Verify OTP
POST /login
Query Params: none
FormData:
- phone
- password
Sign in of social service groups/NGOs
POST /report_help
Query Params: none
FormData:
- area_coordinates https://ibb.co/SsVvZYt
- reported_by (name)
- phone
- place (short version of area_coordinates)
- helpType (description of help needed, should be a stringified array)
Note: The `area_coordinates` property contains the lat lng of every point of the polygon. Make sure all the coordinates are of `Double` type
Report a help
Get helps in real time
- Initialize socket on the client
let socket = io("https://covid-project-api.herokuapp.com/");
- On getting the location of the device from the browser, emit an event to get new helps
socket.emit("new_help", { lat: pos.lat, lng: pos.lng });
- After submission of a new help, again emit an event for getting new helps
socket.emit("new_help", { lat: pos.lat, lng: pos.lng });
- Listen for new helps to be displayed onto the Google map
socket.on("helps", (data) => {
console.log(data);
// => Report objects are received
});
POST /help
Query Params:
- helpId
Authorization: Bearer <token>
FormData: none
Assign the help to the logged in helper
POST /help/cancel
Query Params:
- helpId
Authorization: Bearer <token>
FormData: none
Cancel the claim
POST /help/verify
Query Params:
- helpId
Authorization: Bearer <token>
FormData:
- photo (clicked by the camera)
Verify delivery of help
GET /profile
Query Params: none
Authorization: Bearer <token>
FormData: none
Profile of the helper