Git Product home page Git Product logo

aws-appsync-survey-tool's Introduction

AWS Appsync Survey Tool

Sample Survey Tool Progressive Web Application written with React, GraphQL, AWS AppSync & AWS Amplify

amplifybutton

Features

  • Full Progressive Web Application (PWA)
  • Install (desktop) or Add to Homescreen (mobile)
  • Offline ready
  • Adminstration Portal
  • User management

Technologies

  • AWS AppSync
  • AWS Amplify
  • GraphQL
  • React Router
  • React Apollo
  • Material UI

Quicklinks


Introduction

This is a demonstration solution that uses AWS AppSync to implement a survey app as a Progressive Web Application (PWA). In this app, users can complete assigned surveys, including pre and post questionnaires. The solution also includes an administration portal, which allows admins to create and manage surveys and questionnaires. The solution demonstrates GraphQL capabilities (e.g. Mutations, Queries and Subscriptions) with AWS AppSync, offline support with the AWS AppSync SDK and React Apollo, and integrates with other AWS Services such as:

  • Amazon Cognito for user management, as well as Auth N/Z
  • Amazon DynamoDB with NoSQL Data Sources
  • Amazon S3 for asset storage
  • Amazon Pinpoint for web client analytics data collection

Getting Started

Prerequisites

  • AWS Account with appropriate permissions to create the related resources
  • NodeJS with NPM
  • AWS CLI with output configured as JSON (pip install awscli --upgrade --user)
  • AWS Amplify CLI configured for a region where AWS AppSync and all other services in use are available (npm install -g @aws-amplify/cli)
  • Create React App (npm install -g create-react-app)

Automated Setup

This process will use the configuration in the amplify folder of this repo.

  1. First, clone this repository and navigate to the created folder:

    git clone https://github.com/aws-samples/aws-appsync-survey-tool.git
    
    cd aws-appsync-survey-tool
  2. Install the required modules:

    npm install
  3. Initilize the directory as an Amplify Javascript app using the React framework:

    amplify init
  4. Now it's time to provision your cloud resources based on the local setup and configured features. When asked to generate code, answer "NO" as it would overwrite the current custom files in the src/graphql folder.

    amplify push

    Wait for the provisioning to complete. Once done, a src/aws-exports.js file with the resources information is created.

  5. Run the project locally:

    npm start

Manual Setup

This process lets you configure custom settings for your backend components.

  1. First, clone this repository and navigate to the created folder:

    git clone https://github.com/aws-samples/aws-appsync-survey-tool.git
    
    cd aws-appsync-survey-tool
  2. Install the required modules:

    npm install
  3. Delete the amplify folder

    rm -f amplify
  4. Init the directory as an amplify Javascript app using the React framework:

    amplify init
  5. Add an Amazon Cognito User Pool auth resource. Use the default configuration.

    amplify add auth
  6. Add an AppSync GraphQL API with Amazon Cognito User Pool for the API Authentication. Follow the default options. When prompted with "Do you have an annotated GraphQL schema?", select "YES" and provide the schema file path backend/schema.graphql

    amplify add api
  7. Now it's time to provision your cloud resources based on the local setup and configured features. When asked to generate code, answer "NO" as it would overwrite the current custom files in the src/graphql folder.

    amplify push

    Wait for the provisioning to complete. Once done, a src/aws-exports.js file with the resources information is created.

  8. Run the project locally:

    npm start

Clean Up

To clean up the project use:

amplify delete

to delete the resources created by the Amplify CLI.


Change Log

1.0.0:

  • Initial release.

License

This library is licensed under the Apache 2.0 License.

aws-appsync-survey-tool's People

Contributors

robcost avatar jamesiri avatar dependabot[bot] avatar chriscoombs avatar

Watchers

James Cloos avatar

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.