Skip to content

Instantly share code, notes, and snippets.

@gabru-md
Last active Aug 10, 2018
Embed
What would you like to do?
gsoc-gabru-md.md

GSoC 2018 Work - Manish Devgan

Aim

Developing Badgeyay into a complete Macro Service with UI enhancement, Badge Management System, Admin panel and a lot more features.

Project

My project was badgeyay. It is a badge generator for conferences and meetups built using Python-Flask and EmberJS. I've worked on this project during the Google Summer of Code 2018 under FOSSASIA.

My work in Badgeyay

  • Issues (Opened) : here
  • Issues (Reviewed/Interacted) : here
  • Pull Requests Made : here
  • Commits Made : here

Overview of Work Done

Flask API

The complete backend of the project is refactored. Initially it was just a single file containing the complete backbone of the project. Now the backend has been modularised. Controllers contains all the logic for the API endpoints, Config contains all the configuration files ranging from the PostgreSQL server to Firebase console. Models contains all the relational table models that are being used in the backend PostgreSQL server.Utility contains the functions that have been used in multiple controllers throughout the project, Helpers have the verification and upload functionality inside them and Schemas contain the high level abstraction over the database models(schemas) that are used to receive or distribute data in a specified JSON-API format.

Using Ember for frontend

Prior to GSOC 2018, the project was just a bunch of Flask templates being rendered by the JINJA engine, but now we used Ember js to modify the complete frontend from scratch. Ember is an MVC frontend framework. The frontend comprises of individual components with specific functionalities. Using ember as an option for frontend increases the productivity and the maintainance of the project. Badges are, now, generated using series of operations involving the sending of image, uploading of the data and all the font customisations that are specifed by the user. This makes the work flow a lot more easier to understand. We used template helpers and utility functions to improve our efficiency. My-Badges feature has also been implemented for the user to Download-Edit-Delete badges that he/she has created. The project also has an admin panel for gathering logs and assigning user roles etc.

Adding Migrations

Since this project had to be developed over a period of time, therefore the database was bound to see drastic changes. And to cope up with these changes we initialisez Flask-Migrate. This allows us to make changes to the models or schemas and those changes will be reflected to the deployment of our project.

Integration of Firebase

  • Authentication - We are using oAuth provided by firebase to handle login and signup sessions for our service. Once logged in, a jwt token is produced for the account that needs to operate the website. This token is then issued and can be consumed by the frontend.
  • Storage - We are using firebase as a secondary storage for our generated badges and uploaded images allowing us to get more space on the free heroku service.
  • Realtime DB - Firebase has a realtime db. The logs from this db can be taken up when needed and can be used for monitoring isssues and storage stuff.
  • Cloud Functions - These are the functions that run the code when a certain event is triggered on firebase using some HTTPS method. One such example is sending badge-generation emails.

Screenshots

Screenshot 1 Screenshot 2
Screenshot 3 Screenshot 4
Screenshot 5 Screenshot 6
Screenshot 7 Screenshot 8
Screenshot 9 Screenshot 10
Screenshot 11 Screenshot 12
Screenshot 13

The feature mentioned above have been implemented and are working great. I would love to work with FOSSASIA in future and develop this project post GSoC as well.

Additional Links

  • My daily scrum updates (i.e updates on what I worked on everyday) are posted here
  • All my blog posts can be found here
  • Blog shares on Twitter: link
  • Videos of my work : here
  • Screencasts : Phase 1, Phase 2, Phase 3
  • Presentation : here

Organised various meetups during Google Summer of Code 2018

  • Meetup during Phase 1 : here
  • Meetup during Phase 2 : here
  • Meetup during Phase 3 : here

Thank you FOSSASIA for an amazing GSoC 2018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment