Skip to content

Instantly share code, notes, and snippets.

@flickz
Last active August 9, 2018 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flickz/2c479190bfb656d10c9d4b8a037d7503 to your computer and use it in GitHub Desktop.
Save flickz/2c479190bfb656d10c9d4b8a037d7503 to your computer and use it in GitHub Desktop.
2018 GSoC Final Submission Report

Google Summer of Code 2018 Final Submission Report

Authenticating Users via Email, Facebook and Google.

Summary

This part of the project involves authenticating users with email using Auth0 Passwordless authentication strategy. While also using Auth0 social connections to authenticate users via Facebook and Google. The previous Twitter authentication used on Streetmix was also moved to Auth0.

Screenshot

enter image description here

Code

Current Project State

This part of the project has been deployed to production but behind flag and disabled by default as at the time of writing this final report. To enable press Shift + F

Port Database from MongoDB to PostgreSQL

Summary

This last part involves updating the tests to cover REST Apis, writing PostgreSQL setup instructions, creating a database model to map with MongoDB document model and updating the APIs from using Mongoose to Sequelize. Read the full details on the process here.

Code

Completed Tasks

  • Write test to cover the API read/write to the database.
  • Standardize documents on the backend. Write a database migration script to run on the back-end and remove database schema "migration" from the front end.
  • Update Mongoose to use async/await syntax (fallback: Promises) instead of callback syntax.
  • Write instructions for Postgres implementation and operation on local machines (Mac / PC) and on production (Heroku).
  • Create a document that describes the MongoDB schema and how it maps to SQL schema.
  • Replace Mongoose with Sequelize.

Remaining Tasks

  • Write an import/export script which takes a snapshot of current data in MongoDB and imports that data into PostgreSQL.
  • Deploy the Sequelize branch to the test server and make sure everything is working.
  • Determine a maintainance window for the migration on the production side. Announce this in-app (via the Message Bar), on Twitter, forums, Slack, blog, and newsletter.
  • During the maintainance window, Streetmix will be taken offline to ensure no loss of data. Make a backup of MongoDB, run import/export to PostgreSQL, then deploy the Sequel branch. Bring the application back online and monitor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment