Created on 27th March 2021
•
The project comes under Goal-12(Responsible Consumption & Production) of the 17 Sustainable Development Goals of the United Nations. Through this project our aim is to motivate and educate citizens to throw waste in garbage containers. We aim to achieve this goal through a mobile APP which will give the nearest dustbin location to the user, and also a leaderboard system for contributing the location of dustbins, not only this we are also giving the feature of rating the dustbins based on how clean it is, through this data of ratings we can rate an entire area on its cleanliness. For example a user wants to buy a new house he/she can check the rating of the cleanliness of that area before buying.
There were many challenges while developing this project, as we have decided to keep our frontend and backend completely seperate by making API's for backend side and calling those API's on frontend side.
Part which took a lot of my time was OAuth, so after developing the whole backend API, which when called will send the JWT Token, but for calling this part user needs to go to another page click on his/her id, than return to the APP page, this part was easy for a website, but for our react native APP, we have to go through a lot of hurdles, until we discovered a component provided by expo called "expo-web-browser", integrating it properly with the APP was also a challenge it took me almost whole day to connect this piece correctly.
Another big Problem which we ran into was uploading the user profile picture from the APP to our S3 bucket. So after comleting the backend API successfully only part left was to call the API in frontend and provide it with the Image in req.file, in backend we used "multer" to store the image temporary in the buffer before getting uploaded successfully. After connecting with frontend we were getting "network error" when calling the upload API, after searching a lot, we found the problem was because the ImagePicker gives the file name in android in a different format than we needed and finally after this the problem was resolved
There were many more problems which came, but these were the problems which I found most challenging due to lack of proper error message.