This project integrates a React Native front-end with an AWS Amplify back-end that has user authentication (AWS Cognito) and a GraphQL API (AWS AppSync) for CRUD operations between the client and the database (Amazon DynamoDB).
-
Users can sign up/in to the app.
-
Users can create posts by pressing the add button, writing inside the Modal, and pressing submit.
-
Users can like/unlike posts.
-
Users can delete their own posts.
-
Users can update the posts feed by:
- Pressing the reload button.
- Performing a pull-to-refresh.
-
npm install -g expo-cli
-
npm install -g @aws-amplify/cli
amplify configure
(link for a step by step video).
- Clone this repo to your local machine.
git clone https://github.com/yhenni1989/Zopher.git
cd Zopher
- Add AWS Amplify dependencies to your project.
yarn add aws-amplify aws-amplify-react-native
# or
npm install aws-amplify aws-amplify-react-native
- Initialise the AWS Amplify project.
amplify init
Follow the same instructions as below.
- Configure an Amazon Cognito User Pool to store users credentials.
amplify add auth
# When prompt, choose: Yes, use the default configuration.
- Add the API service to use GraphQL and store data in Amazon DynammoDB.
amplify add api
Follow the below configuration.
- Time to deploy your project to AWS.
amplify push
After few minutes of automated operations, the Amplify CLI will create an Amazon Cognito User Pool and Identity Pool to store users crendentials and an AWS AppSync GraphQL API to allow for CRUD operations between client and servers.
- Install client dependencies.
yarn
# or
npm install
- Launch the React Native app in your simulator under your project directory.
expo start --ios
# or
expo start --android
- Check out the full set up process in the Medium story
- Video link for the demo in here.