Coder Social home page Coder Social logo

paired-be's Introduction

Paired Back-End

Table of Contents

Deployed App

Vist the deployed Paired app at https://www.paired.tech.

Local Deployment

See this Deployment Guide for detailed instructions on how to deploy the app in a local environment.

Dev Team

Paired 2.0's dev team:

Rock & Pebble feature's dev team:

Description

This repo contains the Paired 2.0 Back-end, a GraphQL API built with Ruby on Rails and PostgreSQL. It provides data, logic, and other services to a React/Redux Front-end (paired-fe), and communicates with a Flask micro-service which handles SMS text notifications (paired-sms).

Together, these micro-services facilitate paired programming and peer mentoring between Turing students throughout their seven-month immersive program. Students later in the program can create available booking slots, and students earlier in the program can browse those and book paired sessions.

Paired 2.0 was built by a team of students in Turing's Back-End Engineering program. It adds SMS and email notifications of bookings and a user statistics dashboard to the original Paired app (front-end repo, back-end repo) which was built by Front-end students in April of 2019. They graciously allowed contributions to the app and were helpful throughout this process.

Rock & Pebble Feature

The Rock & Pebble feature adds the ability for Paired users to offer to be peer mentors, search for and request peer mentors, and manage their mentors/mentees. Building on the previous 2.0 work, it sends descriptive email notifications throughout the process. By adding this feature we hope to support the grassroots tradition at Turing of upper-module students ("rocks") being partnered with lower-module students ("pebbles") to support their journey.

The Rock & Pebble feature was developed over the course of 2020 by a group of 1909 back-end and front-end graduates, some from the Paired 2.0 dev team and some new contributors. The development took place on forks of the BE and FE repos, which are now archived but can be found here and here respectively for future reference.

Agile Development

Paired 2.0 was developed over the course of 9 days using accelerated agile practices. After an initial proposal was written by the project lead, the team collaboratively participated in an "inception" process. After writing problem and solution statements, the team "brain-dumped" all their feature proposals then went through a feature prioritization process in order to determine which would be part of the "minimum viable product" (MVP).

Soon thereafter the team had a "DTR" meeting to establish goals, communication plans, project management conventions, and more. It was agreed upon that the team would use a Kanban system for project management using Github Projects, and have daily stand-up meetings and weekly retrospective meetings. The team met with a project manager every three days for check-ins and communicated with her regularly via Slack.

Technologies & Architecture

Technology and Architecture Chart

  • Hosting: Firebase (FE) and Heroku (BE, SMS)
  • Database: PostgreSQL
  • Front-end: React & Redux
  • Back-end: Ruby on Rails
  • SMS Micro-service: Flask & Python
  • Testing: Jest (FE), RSpec (BE), and PyTest (SMS)
  • GraphQL: Apollo Client (FE) and GraphQL-Ruby (BE)
  • OAuth: Github via Firebase
  • SMS Notifications: Twilio
  • Email Notifications: Sendgrid
  • Background Workers: Sidekiq and Redis
  • Performance Tracking: Skylight

React & Redux Tutorial

As a team of back-end engineers, stepping into a JavaScript-heavy tech stack was an incredible and bewildering learning experience. To help share that learning with our fellow students in the back-end program, we wrote this tutorial: Explain It Like I'm a Back-ender: React and Redux.

Testing & Performance

Skylight performance dashboard

At date of project completion, the Paired 2.0 back-end service has 98% test coverage and all tests passing. Server performance and load times are monitored using Skylight, and at time of writing responses average 37 ms.

PostgreSQL Schema

Users Data Type Keys
Id ID Primary Key
name String
program String
pronouns String
mod Integer
slack String
email String
phone_number String
firebase_id String OAuth Token
Pairings Data Type Keys
Id ID Primary Key
pairer_id Integer User Foreign Key
pairee_id Integer User Foreign Key
date String
time String
notes String
Skills Data Type Keys
Id ID Primary Key
name String
user_id Integer User Foreign Key

GraphQL Endpoints

Our GraphQL endpoints fall into three categories: queries, mutations, and filter queries. For detailed examples of all the endpoints and example responses, see our GraphQL Endpoints Guide or click the specific query or mutation below to go its section.

To make live queries to the GraphQL endpoint and see live schema information, setup the back-end using the local deployment instructions and access GraphiQL at http://localhost:3001/graphiql.

Resource Credits

paired-be's People

Contributors

capleugh avatar danieleframpton avatar dependabot[bot] avatar msimon42 avatar rer7891 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

paired-be's Issues

Write Readme

Fill out the Readme with:

  • Local deployment
  • Dev team
  • History
  • Schema (PostgreSQL and GraphQL, with endpoint examples)
  • Architecture / Tech Stack

Stats User Story

As a User,
When I visit my Account Details
And I click "View Stats"
Then I should be on /stats-profile

And I should see the following:

User Name
Total Bookings (total number of paired sessions)
Total Mentor Hours (time you spent mentoring, assume 1/2 hr. sessions)
Total Hours Mentored (time you spent being mentored, assume 1/2 hr. sessions)
List of Mentees

FE Query Updates

[ ] User Mutations - need to change user: { } to input: { } and wrap other mutation inputs in input: {}

Edit Profile Phone Number Field

As a logged-in user,
When I visit the root path,
And I click on my profile picture,
And I click on "Edit Profile,"
I see a form that includes a phone number field which is required.
When I fill in the form and input a valid 10 digit US phone number,
and click "Submit,"
then I'm taken to the schedule page.

When I fill in the form and input no phone number or incomplete phone number,
I am returned to the form
and I see an error message "You must provide a valid U.S. phone number."

Create models and relationships

  • Create User model with self-referential foreign keys on Pairings
  • Create Pairings model
  • Create Skills model with relationship to Users

Factory Bot

Add all resources to factory bot for testing

Profile Create Phone Number Field

As a visitor,
When I visit the root path,
And I authenticate using GitHub,
I see a form that includes a phone number field which is required.
When I fill in the form and input a valid 10 digit US phone number,
and click "Submit,"
then I'm taken to the schedule page.

When I fill in the form and input no phone number or incomplete phone number,
I am returned to the form
and I see a error message "You must provide a valid U.S. phone number."

Make cards

Create cards for user stories and tasks

SMS Notifications

As a logged-in user,
when I click "Book a Pairing" in the navbar,
and when I select a program, module, and date for which a mentor is available,
and I click "Book Pairing" for a mentor's open time,
and the mentor has provided a phone number,
then the mentor/bookee will receive an SMS notification with:

  • the name of the mentee/booker
  • the date and time of the booking
  • and a link to view their schedule (https://www.paired.tech/schedule)

If the mentor has not provided a phone number,
then the mentor/bookee will receive an email notification with that same information.

Requires completion of:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.