All Projects → pjay79 → Moviesapp

pjay79 / Moviesapp

React Native Movies App: AWS Amplify, AWS AppSync, AWS Cognito, GraphQL, DynamoDB

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Moviesapp

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 (+1243.59%)
Mutual labels:  graphql, appsync, aws, dynamodb
Aws Mobile Appsync Chat Starter Angular
GraphQL starter progressive web application (PWA) with Realtime and Offline functionality using AWS AppSync
Stars: ✭ 449 (+475.64%)
Mutual labels:  graphql, appsync, aws, dynamodb
Graphql Auto Transformer
A custom transformer of the amplify-cli. It can control accessibility of auto generated fields.
Stars: ✭ 31 (-60.26%)
Mutual labels:  graphql, appsync, aws
Aws Serverless Appsync Loyalty
Unicorn Loyalty: E-Commerce Serverless GraphQL Loyalty Sample App
Stars: ✭ 110 (+41.03%)
Mutual labels:  graphql, appsync, aws
Appsync Resolvers Example
Example project for AppSync, GraphQL, and AWS Lambda resolvers using Go.
Stars: ✭ 50 (-35.9%)
Mutual labels:  graphql, appsync, aws
Graphql Serverless
Sample project to guide the use of GraphQL and Serverless Architecture.
Stars: ✭ 28 (-64.1%)
Mutual labels:  graphql, aws, dynamodb
This Or That
This or that - Real-time atomic voting app built with AWS Amplify
Stars: ✭ 87 (+11.54%)
Mutual labels:  graphql, aws, dynamodb
Aws Mobile Appsync Events Starter React Native
GraphQL starter application with Realtime and Offline functionality using AWS AppSync
Stars: ✭ 134 (+71.79%)
Mutual labels:  graphql, appsync, aws
Full Stack Serverless Cdk
Learn to Build Full-Stack Serverless Apps and APIs using AWS Cloud Development Kit (CDK) in Baby Steps.
Stars: ✭ 122 (+56.41%)
Mutual labels:  appsync, aws, dynamodb
Aws Lambda Graphql
Use AWS Lambda + AWS API Gateway v2 for GraphQL subscriptions over WebSocket and AWS API Gateway v1 for HTTP
Stars: ✭ 313 (+301.28%)
Mutual labels:  graphql, subscriptions, aws
Aws Mobile Appsync Sdk Ios
iOS SDK for AWS AppSync.
Stars: ✭ 231 (+196.15%)
Mutual labels:  graphql, appsync, aws
Aws Mobile Appsync Events Starter React
GraphQL starter application with Realtime and Offline functionality using AWS AppSync
Stars: ✭ 337 (+332.05%)
Mutual labels:  graphql, appsync, aws
Graphql Recipes
A list of GraphQL recipes that, when used with the Amplify CLI, will deploy an entire AWS AppSync GraphQL backend.
Stars: ✭ 137 (+75.64%)
Mutual labels:  graphql, aws, dynamodb
Aws Appsync Community
The AWS AppSync community
Stars: ✭ 356 (+356.41%)
Mutual labels:  graphql, appsync, aws
Aws Mobile Appsync Sdk Js
JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Stars: ✭ 806 (+933.33%)
Mutual labels:  graphql, appsync, aws
Panther
Detect threats with log data and improve cloud security posture
Stars: ✭ 885 (+1034.62%)
Mutual labels:  graphql, aws
Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-65.38%)
Mutual labels:  aws, dynamodb
Kikstart Graphql Client
🚀 Small NodeJS Wrapper around apollo-client that provides easy access to running queries, mutations and subscriptions.
Stars: ✭ 27 (-65.38%)
Mutual labels:  graphql, subscriptions
Tempest
Typesafe DynamoDB for Kotlin and Java.
Stars: ✭ 32 (-58.97%)
Mutual labels:  aws, dynamodb
Graphql
An implementation of GraphQL for Go / Golang
Stars: ✭ 8,176 (+10382.05%)
Mutual labels:  graphql, subscriptions

MoviesApp

React Native, AWS AppSync, AWS Amplify, AWS Cognito, GraphQL, DynamoDB. Please note: this is a work still in progress, and many features are not fully developed yet.

Update 24th July:

AWS Amplify library can be modularized: https://github.com/aws-amplify/amplify-js/wiki/Amplify-Modularization

There are some new helpers also available to reduce boilerplate code, see this article for details: https://medium.com/open-graphql/save-hundreds-of-lines-of-code-in-your-next-graphql-app-with-this-one-weird-trick-3bef9ef0d45a

screenflow

Screenshots

iOS

simulator screen shot - iphone x - 2018-06-18 at 16 00 02 simulator screen shot - iphone x - 2018-06-18 at 16 00 44 simulator screen shot - iphone x - 2018-06-18 at 16 05 25 simulator screen shot - iphone x - 2018-06-18 at 16 06 02 simulator screen shot - iphone x - 2018-06-18 at 16 06 09 simulator screen shot - iphone x - 2018-06-18 at 16 07 04 simulator screen shot - iphone x - 2018-06-18 at 16 07 19 simulator screen shot - iphone x - 2018-06-18 at 16 07 24 simulator screen shot - iphone x - 2018-06-18 at 16 08 09 simulator screen shot - iphone x - 2018-06-18 at 16 08 47 simulator screen shot - iphone x - 2018-06-18 at 16 09 44 simulator screen shot - iphone x - 2018-06-18 at 16 09 47

Technology stack:

  • aws-amplify
  • aws-amplify-react-native
  • aws-appsync
  • aws-appsync-react
  • aws-sdk
  • graphql-tag
  • lodash
  • moment
  • prop-types
  • react-apollo
  • react-native-app-intro-slider
  • react-native-elements
  • react-native-modal
  • react-native-splash-screen
  • react-native-vector-icons
  • react-navigation
  • react-navigation-material-bottom-tabs
  • react-navigation-tabs
  • uuid

Installation

React Native setup:

brew install node
brew install watchman
npm install -g react-native-cli

And also install Xcode for iOS simulator + Android Studio / Genymotion for Android simulator. Alternatively connect up a hardware device.

Project setup:

Clone the repo: git clone https://github.com/pjay79/MoviesApp.git
Change to the project folder: cd MoviesApp
Add dependencies: npm install or yarn

Amazon

Sign up to AWS Free Tier:
https://aws.amazon.com/free/

AWS Mobile CLI setup

(note: you will be directed to create a new IAM user and prompted to enter the accessKeyId and secretAccessKey, store these in a safe place):

npm install -g awsmobile-cli
awsmobile configure
awsmobile init (in the project folder)

awsmobile2

awsmobile user-signin enable
awsmobile push
awsmobile console (opens the aws console in browser)

This project's source directory is 'app'.

AWS AppSync setup:

In the aws console Services section locate AWS AppSync and then do the following:

  • select Create API

appsync-starter

  • enter API name AWS Movies App and select authorization type to Amazon Cognito User Pool

appsync-settings appsync-settings-userpool

  • select Custom Schema

Paste the following into the Custom Schema box:

type Movie {  
    id: ID!  
    title: String!  
    genre: String!  
    director: String!  
    reviews: [Review]  
    likes: Int!  
    author: String!  
    createdAt: String!  
}

type Review {  
    id: ID!  
    movieID: ID!  
    rating: Int!  
    content: String!  
    author: String!  
    createdAt: String!  
}

type Query {  
    fetchMovie(id: ID!): Movie
}

schema {  
    query: Query  
}

Select Save and then Create Resources, then select type Movie with table name MovieTable. Repeat the same process for type Review with table name ReviewTable.

create resources

Update resolvers

Back in the AppSync console, find the Data Type Movie and attach a resolver to the reviews field, it should look like this:

resolver-reviews

Back again in the AppSync console, find the Data Type Query and modify resolver for the listReviews field, it should look like this:

resolver-query

DynamoDB table index:

From your AppSync console:

  • select DataSources
  • select ReviewTable
  • select Create index in DynamoDB
  • select primary key movieID, and index name movieID-index
  • set read and write capacity to 1 unit each

create-index

index-table

Add AppSync configuration

Download the React Native AppSync.js file:

appsync-config

Add the contents of this file to app/aws-appsync.js as follows:

export default {  
    graphqlEndpoint: 'ENTER_ENDPOINT',  
    region: 'ENTER_REGION',  
    authenticationType: 'AMAZON_COGNITO_USER_POOLS',  
    apiKey: 'null',  
};

AWS Cognito

In the aws console Services section locate Cognito and select Manage User Pools. Here you can customise the user and authorisation settings. For this project MFA has been set to OPTIONAL.

cognito-page

Launch

Run on ios: react-native run-ios
Run on android: react-native run-android

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].