NoxHarmonium / peoples-choice

People's Choice is a web application that lets people vote for their colleagues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

peoples-choice logo

Deploy to Vercel

Summary

Feeling grateful? Want to recognise a colleague?

People's Choice is a web application that lets people vote for their colleagues.

Features

  • ๐ŸŽ‰ Confetti explosions when a vote is placed
  • ๐Ÿ“ฑ Responsive layout
  • ๐Ÿ™ˆ Obfuscated vote records
  • โœ… Easy vote tallying and ranking
  • โ˜๏ธ Serverless ready

Requirements

G Suite

The candidates are pulled from G Suite via the Admin SDK.

If your workplace uses G Suite (likely if you read your work emails via the Gmail interface) then you are probably good to go.

Google Cloud Project

Create a Google Cloud project and do the following:

DynamoDB Table

  • Create a DynamoDB table in AWS with a partition key called "email" with type "string
  • Export the name of the DynamoDB table as the DYNAMO_USER_TABLE_NAME environment variable
  • Create an IAM user for your application and export the access key and secret as the "AWS_ACCESS_KEY_ID_" and "AWS_SECRET_ACCESS_KEY_" environment variables. Note the trailing underscores which are needed to avoid conflicting with variables exposed by the Vercel deployment.

Development

Hot reload for local development:

$ yarn dev

To analyse build size:

$ ANALYZE=true yarn build

Environment Variables

export API_CLIENT_ID="11111-xxxxx.apps.googleusercontent.com"
export API_CLIENT_SECRET="some secret"
export JWT_SECRET="some random secret"
export DIRECTORY_DOMAIN="mycorp.com.au"
export EXCLUDED_EMAILS="hello@mycorp.com.au,support@mycorp.com.au"
export ADMIN_EMAILS="elpresedente@mycorp.com.au,someother@mycorp.com.au"
export MAX_VOTES="3"
export OBFUSTICATION_PEPPER="QmAyxZJv6EM85EBW79aXPkt^N"

export DYNAMO_USER_TABLE_NAME="PeoplesChoiceUserTable"

export AWS_ACCESS_KEY_ID_=SOME_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY_=SOME_SECRET_ACCESS_KEY
export AWS_REGION_=ap-southeast-2

Thanks

About

People's Choice is a web application that lets people vote for their colleagues

License:Apache License 2.0


Languages

Language:TypeScript 98.1%Language:JavaScript 1.9%