Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

NoxHarmonium/peoples-choice

Repository files navigation

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="[email protected],[email protected]"
export ADMIN_EMAILS="[email protected],[email protected]"
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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published