Google Summer of Code | Week 7

This week — June 25 to July 1— was the fourth week of the coding period of Google Summer of Code (GSoC) with Systers Open Source. If you want to know more about this you can read the introduction to my journey, my latest weekly blog posts or my weekly status report for this week.

Non-technical work

This week, my mentor Murad, deployed the backend, I’m working on, to Amazon Web Services (AWS). So this can already be used by community members without the need to run the project and test it locally. So I started the presentation slides to do a demo of the Mentorship System backend and test it in front of community members. I also want to encourage the community to test the backend API intensively through the Swagger UI to receive feedback and detect potential bugs.

On Thursday, I wrote a blog post about Mentorship System, presenting the idea and the motivation behind this project I proposed for GSoC. After writing it I shared with the community to receive feedback before publishing it and then I submitted to Systers Open Source medium’s publication.

Technical work

I’ll explain some features of the application and backend already discussed and their implementation.

Delete/Reject/Cancel a mentorship relation or request APIs

In the Mentorship System, we have users that can both be a mentor or a mentee in a 1:1 relationship. In this mentorship relation, we’ll have a user that takes the action to send a mentorship request to another user.

Delete a mentorship request

Reject a mentorship request

Cancel a mentorship relation

Get all mentorship relations and requests

Snippet of the Swagger Documentation on Mentorship System API

Using flask-jwt-extended instead of flask-jwt

I replaced the usage of flask-jwt for flask-jwt-extended which provided me with more flexibility to define my error messages depending on the exceptions thrown on the backend (e.g.: error for invalid or expired authentication token). This new extension also provided me with flexibility on the checks performed on POST /login API. This library also appears to be actively maintained. For this I submitted PR #64.

Background scheduler to complete mentorship relation

Email verification feature final retouch

I implemented some changes to the previously sent PR #53. The changes include improvements on the email template (according to the project weekly feedback), a new endpoint for a user to be able to resend a confirmation token to its email and allowing only users with the email confirmed to login into the app.

2nd version of the email template for email confirmation

Export Swagger documentation and Postman collection in json format

I’ve been studying a way to export the postman and swagger collection, without having to manually download the swagger json file or set up a postman collection manually. I already started developing following the flask-restplus documentation on both postman and swagger exporting.

Plans for next week