All Projects → dabit3 → This Or That

dabit3 / This Or That

This or that - Real-time atomic voting app built with AWS Amplify

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to This Or That

Graphql Recipes
A list of GraphQL recipes that, when used with the Amplify CLI, will deploy an entire AWS AppSync GraphQL backend.
Stars: ✭ 137 (+57.47%)
Mutual labels:  graphql, aws, serverless, aws-amplify, dynamodb
Conference App In A Box
Full stack & cross platform app customizable & themeable for any event or conference.
Stars: ✭ 693 (+696.55%)
Mutual labels:  graphql, aws, serverless, aws-amplify
Graphql Serverless
Sample project to guide the use of GraphQL and Serverless Architecture.
Stars: ✭ 28 (-67.82%)
Mutual labels:  graphql, aws, serverless, dynamodb
Aws Mobile React Sample
A React Starter App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.
Stars: ✭ 650 (+647.13%)
Mutual labels:  aws, serverless, aws-amplify, dynamodb
Aws Mobile Appsync Chat Starter Angular
GraphQL starter progressive web application (PWA) with Realtime and Offline functionality using AWS AppSync
Stars: ✭ 449 (+416.09%)
Mutual labels:  graphql, aws, aws-amplify, dynamodb
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+2482.76%)
Mutual labels:  aws, serverless, aws-amplify, dynamodb
Amplify Photo Sharing Workshop
Building full-stack cloud apps with AWS Amplify and React
Stars: ✭ 143 (+64.37%)
Mutual labels:  graphql, serverless, aws-amplify, dynamodb
Serverless
This is intended to be a repo containing all of the official AWS Serverless architecture patterns built with CDK for developers to use. All patterns come in Typescript and Python with the exported CloudFormation also included.
Stars: ✭ 1,048 (+1104.6%)
Mutual labels:  graphql, aws, serverless, dynamodb
Serverless Backend
The serverless back end for JAMstack CMS. Use this back end to deploy a custom CMS using your own front end.
Stars: ✭ 73 (-16.09%)
Mutual labels:  graphql, serverless, dynamodb
Dynamodb Toolbox
A simple set of tools for working with Amazon DynamoDB and the DocumentClient
Stars: ✭ 752 (+764.37%)
Mutual labels:  aws, serverless, dynamodb
Panther
Detect threats with log data and improve cloud security posture
Stars: ✭ 885 (+917.24%)
Mutual labels:  graphql, aws, serverless
Lambda Refarch Webapp
The Web Application reference architecture is a general-purpose, event-driven, web application back-end that uses AWS Lambda, Amazon API Gateway for its business logic. It also uses Amazon DynamoDB as its database and Amazon Cognito for user management. All static content is hosted using AWS Amplify Console.
Stars: ✭ 1,208 (+1288.51%)
Mutual labels:  aws, serverless, dynamodb
Serverless Dynamodb Local
Serverless Dynamodb Local Plugin - Allows to run dynamodb locally for serverless
Stars: ✭ 530 (+509.2%)
Mutual labels:  aws, serverless, dynamodb
Aws Appsync Chat
Real-Time Offline Ready Chat App written with GraphQL, AWS AppSync, & AWS Amplify
Stars: ✭ 522 (+500%)
Mutual labels:  graphql, serverless, aws-amplify
Dazn Lambda Powertools
Powertools (logger, HTTP client, AWS clients, middlewares, patterns) for Lambda functions.
Stars: ✭ 501 (+475.86%)
Mutual labels:  aws, serverless, dynamodb
Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-68.97%)
Mutual labels:  aws, serverless, dynamodb
Moviesapp
React Native Movies App: AWS Amplify, AWS AppSync, AWS Cognito, GraphQL, DynamoDB
Stars: ✭ 78 (-10.34%)
Mutual labels:  graphql, aws, dynamodb
Bootcamp 2021
Fusing Serverless Cloud Computing, Infrastructure as Code, Graph Databases, AI, and IoT Technologies and preparing for Operation Unicorn Startups
Stars: ✭ 55 (-36.78%)
Mutual labels:  graphql, aws, serverless
Aws Testing Library
Chai (https://chaijs.com) and Jest (https://jestjs.io/) assertions for testing services built with aws
Stars: ✭ 52 (-40.23%)
Mutual labels:  aws, serverless, dynamodb
Write With Me
Real-time Collaborative Markdown Editor
Stars: ✭ 81 (-6.9%)
Mutual labels:  graphql, aws, serverless

This or that

Scalable serverless voting app - built with AWS Amplify, AWS AppSync, and Amazon DynamoDB

This or that

To deploy

You can deploy this app and the back end infrastructure in one of two ways:

  1. The Amplify CLI
  2. One click deploy button

Amplify CLI

  1. First install and configure the Amplify CLI.

For a complete walkthrough of how to configure the CLI, see this video

$ npm install -g @aws-amplify/cli
$ amplify configure
  1. Clone the repo, install dependencies
$ git clone https://github.com/dabit3/this-or-that.git
$ cd this-or-that
$ npm install
  1. Initialize the app
$ amplify init

? Enter a name for the environment: (your preferred env name)
? Choose your default editor: (your preferred editor)
? Do you want to use an AWS profile? Yes
? Please choose the profile you want to use: your-profile-name

? Do you want to configure Lambda Triggers for Cognito? No
  1. Deploy the back end
$ amplify push --y
  1. Run the app
$ npm start

One click deploy

amplifybutton

About the app

While the voting API is built with DynamoDB and AppSync, the main functionality really is within a single GraphQL resolver that sends an atomic update to DynamoDB.

This atomic update allows the DynamoDB table to stay consistent regardless of the number of other operations that are happening.

Upvote resolver

Request mapping template

{
    "version": "2018-05-29",
    "operation": "UpdateItem",
    "key" : {
      "id" : $util.dynamodb.toDynamoDBJson($context.arguments.id)
    },
    "update": {
      "expression" : "set #upvotes = #upvotes + :updateValue",
      "expressionNames" : {
           "#upvotes" : "upvotes"
       },
       "expressionValues" : {
           ":updateValue" : { "N" : 1 }
       }
    }
}

Response mapping template

$util.quiet($ctx.result.put("clientId", "$context.arguments.clientId"))
$util.toJson($ctx.result)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].