Independent consultant
Web / Mobile / VR / AR / IoT / AI
GDE, author, software architect
Static site generator
Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps
Static site generator
A query language for your API
Description of resource is coupled to implementation
Overfetching
Underfetching
chaining requests to server to get needed data
Avoid over-fetching
Prevent multipe API calls
Lesser communication with API developers
Self-documenting
type Post {
title: String!
content: String!
user: User!
}
type Person {
name: String!
address: String
posts: [Post!]!
}
npm install -g gatsby-cligatsby new gatsby-siteInstall Gatsby CLI
Generate a new site
npm install -g gatsby-cligatsby new gatsby-siteInstall Gatsby CLI
Generate a new site
npm install -g gatsby-cligatsby new gatsby-siteInstall Gatsby CLI
Generate a new site
gatsby new [SITE_DIRECTORY_NAME] [URL_OF_STARTER_GITHUB_REPO]Page queries
Static query
Plugins
plugins are installed and configured in gatsby-config.js
Plugins
npm install --save gatsby-source-filesystem{
resolve: `gatsby-source-filesystem`,
options: {
name: `posts`,
path: `${__dirname}/content`,
},
},configure plugin to pull content
transform markdown
npm install --save gatsby-transformer-remarkPlugins
Plugins
The Amplify Command Line Interface (CLI) is a unified toolchain to create, integrate, and manage the AWS cloud services for your app.
npm install -g @aws-amplify/cli
amplify configure
amplify initPlugins
Connects your app to the cloud
import Amplify from 'aws-amplify';
import config from './src/aws-exports'
Amplify.configure(config)Plugins
Plugins
Let's create and deploy Gatsby site with CI/CD pipeline
create github repo and connect to branch using AWS Amplify console
Plugins
import Amplify from 'aws-amplify';
import config from './src/aws-exports'
Amplify.configure(config)Plugins
Amazon Cognito
Create, configure new Amazon Congito for signup & signin
Use Auth class from aws-amplify
Use preconfigured components
import { withAuthenticator } from 'aws-amplify-react'
export default withAuthenticator(SecondPage)amplify add authnpm install --save aws-amplify aws-amplify-reactPlugins
Amazon Lambda + AWS API Gateway
Create new Lambda Functions
Scaffold basic Lambda code
Configure API Gateway
Interact with Lambda function with client library
Plugins
AWS AppSync
Create new AWS AppSync GraphQL API
Configure AppSync
Perform queries, mutations, subscriptions from your app
Plugins
Amazon S3
Creates & configures S3 bucket for hosting
Configure CloudFront
Publish assets to S3, push updates from CLI
Storage.put(this.state.filename, this.state.file)amplify add storagePlugins
Amazon Pinpoint
Record events from the client app
Automatically records session and auth data
Analytics.record({ name: 'pageVisit' });amplify add analyticsPlugins
Plugins
Using componentDidMount
Using subscriptions, using ApolloClient
@VladimirNovick