Giter Club home page Giter Club logo

amplify-datastore-adminui-base's Introduction

Getting started

  1. Clone this repository

  2. Install al the project dependencies

npm install
  1. Copy the new index.html file with some necesary imports
cp base/index-01.html public/index.html

Getting started with Amplify

  1. Go to your AWS console and create a new Amplify Backend Application

  2. Open the AdminUI for that application

Add authentication

  1. In the admin UI add authentication with the default settings and deploy it.

  2. After the application finish deploying. Go to your react application and do amplify pull as the instructions mentions.

  3. Add authentication in your front end

cp base/App-01.css src/App.css
cp base/App-01.js src/App.js
  1. Start the react app and see what happen. Create an account.
npm start

Add GraphQL API

  1. Go back to the AdminUI and in data, create a new model.

Make sure that you choose the cognito user pool (the authentication we just created) as authentication model for this API.

Model name: Note Attributes:

  • id
  • note: string!
  1. Deploy the API and after it finish deploying follow the instructions on amplify pull.

  2. Add the API in your client

cp base/App-02.js src/App.js
  1. Check the react app and see what happened. Add a note, delete it.

Deploy this in the cloud

  1. Create a new repository in github and put the react app in there.

NOTE: if you cloned this project make sure first to remove the origin so you can commit this code to a new place.

git remote remove origin
  1. Go to the AWS Console and Amplify and add a new github project for the frontend. Note: Pick the existing backend enviroment or if you want to have multiple environments pick a new one.

  2. Open the link and test the application that is in the cloud.

Add ML capabilities

  1. In the AdminUI, modify the data model and deploy it

Model: Note Attributes:

  • id
  • note
  • sentiment: String ---> NEW
  • spanish: String ---> NEW
  1. In the client pull the changes as the instructions mention

  2. Add predictions Interpret --> TEXT

$ amplify add predictions
? Please select from one of the categories below Interpret
? What would you like to interpret? Interpret Text
? Provide a friendly name for your resource interpretTextXXX
? What kind of interpretation would you like? All
? Who should have access? Auth users only
Successfully added resource interpretTextXXX locally
  1. Add predictions Convert --> Translate
$ amplify add predictions
? Please select from one of the categories below Convert
? What would you like to convert? Translate text into a different language
? Provide a friendly name for your resource translateTextfaXXX
? What is the source language? English
? What is the target language? Spanish
? Who should have access? Auth users only
Successfully added resource translateTextfaXXX locally
  1. When that is complete do amplify push
amplify push
  1. Then modify the client to see the new features in action:
cp base/App-03.js src/App.js
  1. Commit all the new changes in github and see how the CICD pipeline in the Amplify app triggers.

  2. Test it in the cloud.

In spanish - Mira todo este tutorial en formato video

https://www.youtube.com/watch?v=xIy0KVMOHHw

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.