Code Monkey home page Code Monkey logo

scrum-reaction's Introduction

Scrum Reaction

https://scrum-reaction.now.sh/

ℹ Overview

A suite of scrum/agile methodology tools

Planning Poker

Participate in an online planning poker session, react to the results and hopefully (eventually) reach consensus!

poker example

💿 Running Locally

  • Install Node.js
  • Run yarn install
  • Run hasura locally by running yarn hasura:docker
  • Run yarn start to the run the client-side application

🔐 Auth0 Setup

Authentication is currently implemented using Auth0. Users are created in the database automatically when Auth0 rules are triggered. For this reason it is necessary when first logging into the app locally, to expose your local hasura instance to Auth0, which can be achieved using a service such as ngrok

  • Create an auth0 tenant
  • Create a SPA application within your auth0 tenant
  • Add a new .env.development file with the relevant auth0 configuration
  • Within your auth0 tenant add the following "Rules"
/// hasura-jwt-claim

function (user, context, callback) {
  const namespace = "https://hasura.io/jwt/claims";

  context.idToken[namespace] = {
    "x-hasura-default-role": "user",

    "x-hasura-allowed-roles": ["user"],
    "x-hasura-user-id": user.user_id
  };

    context.accessToken[namespace] = {
    "x-hasura-default-role": "user",

    "x-hasura-allowed-roles": ["user"],
    "x-hasura-user-id": user.user_id
  };

  return callback(null, user, context);
}
/// function (user, context, callback) {
  const userId = user.user_id;
  const nickname = user.name;
  const picture = user.picture;

  const hasuraEnvironments = [
    {url: 'http://yourlocalinstance.com/v1/graphql', adminSecret: 'localhostadminkey'},
  ];

  const mutation = `mutation($userId: String!, $nickname: String, $picture: String) {
    insert_users(objects: [{
        id: $userId,
        name: $nickname,
        default_picture: $picture,
      }],
      on_conflict: {
        constraint: users_pkey,
        update_columns: [last_seen, name, default_picture]
      }) {
        affected_rows
      }
    }`;

  hasuraEnvironments.forEach(({url, adminSecret}) => {
    request.post(
      {
        headers: {
          "content-type": "application/json",
          "x-hasura-admin-secret": adminSecret
        },
        url: url,
        body: JSON.stringify({ query: mutation, variables: { userId, nickname, picture } })
      },
      (error, response, body) => {
        console.log(body);
        callback(error, user, context);
      }
    );
  });

  return callback(null, user, context);
}

scrum-reaction's People

Contributors

deanbowler avatar

Stargazers

 avatar

Watchers

 avatar

scrum-reaction's Issues

Feature Request: Change Votes

Super project! Would it be possible to add the feature allowing users to change their votes after submission? This would give us the ability to see people changing their mind during discussions.

Feature Request: Observer Role

Do you think it would be possible to have the ability for users to log in and view a given board without having to vote (potentially including the board admin)? I think that this could mean revealing votes would be automatic once the last person voted (who needs to) instead of an admin pressing "Show Votes".

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.