70

GitHub - aws-samples/aws-appsync-chat: Real-Time Offline Ready Chat App written...

 5 years ago
source link: https://github.com/aws-samples/aws-appsync-chat
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Chatt

Real-Time Offline Ready Chat App written with GraphQL, AWS AppSync, & AWS Amplify

Features

  • User management
  • Routing (React Router)
  • Real-time
  • Offline ready (conflict resolution handled for you when user comes back online)

Technologies

  • AWS AppSync
  • AWS Amplify
  • GraphQL
  • MobX
  • React Router
  • React Apollo
  • Glamor

Screens

Building the App

  1. Make sure you are on the newest version of the AWS Amplify CLI
npm install -g @aws-amplify/cli@multienv
  1. Clone Chatt
git clone https://github.com/aws-samples/aws-appsync-chat.git
  1. Install dependencies
npm install
  1. Initialize the amplify project
amplify init
  • Enter a name for the environment master
  1. Push the new resources to the cloud
amplify push
  1. Run the project
npm start

Hosting with the AWS Amplify Console

The AWS Amplify Console provides continuous deployment and hosting for modern web apps (single page apps and static site generators) with serverless backends. Continuous deployment allows developers to deploy updates to either the frontend or backend (Lambda functions, GraphQL resolvers) on every code commit to the Git repository.

  1. Push your code to a Git repository of your choice.
  2. Login to the AWS Amplify Console and choose Connect app
  3. Connect your repository and branch.
  4. Accept the default build settings.
  5. Give the Amplify Console permission to deploy backend resources with your frontend. This will allow the Console to detect changes to your backend on every code commit. If you do not have a service role, follow the prompts to create one.
  6. Review your changes and then choose Save and deploy. You app will now be available at https://master.unique-id.amplifyapp.com.

About

Schema

This application utilizes 4 database tables:

  • User table (stores user's identity information)
  • Conversation table (stores conversations)
  • Messages table (stores messages)
  • ConvoLinkTable (stores relations between conversations & users)

License

This library is licensed under the Apache 2.0 License.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK