by Gerard Sans |  @gerardsans

Finding a bike

in London with AWS Amplify

Finding a bike

in London with AWS Amplify

SANS

GERARD

Developer Advocate AWS

Developer Advocate AWS

International Speaker

Spoken at 139 events in 36 countries

Bike Sharing

Benefits

  • Transport flexibility
  • Reduce traffic emissions
  • Reduce traffic congestion
  • Health benefits for users

Santander Cycles

Overview

  • Since 2010
  • +12,000 Bikes
  • +700 stations

Boris Bikes

London

Unified API

/BikePoint

/BikePoint/id

TfL Unified API

/BikePoint/Search

[
  {
    "id": "BikePoints_1",
    "commonName": "River Street , Clerkenwell",
    "additionalProperties": [{
      "key": "NbBikes", "value": "11",
     }],
    "lat": 51.529163,
    "lon": -0.10997
  }
  // 777 more
]

/BikePoint

{
  "id": "BikePoints_1",
  "commonName": "River Street , Clerkenwell",
  "additionalProperties": [{
    "key": "NbBikes", "value": "11",
  }],
  "lat": 51.529163,
  "lon": -0.10997
}

/BikePoint/BikePoints_1

LNDBikes

AWS AMPLIFY

Fullstack Serverless

🦄

🌩️

Update

Init

Add

Push

Amplify CLI

Categories

interactions

storage

notifications

auth

analytics

function

amplify add <category>

api

hosting

xr

AWS-AppSync_light-bg
Amazon-Pinpoint_light-bg
Amazon-S3_light-bg
AR-VR_light-bg
Amazon-Cognito_light-bg
Amazon-Lex_light-bg
Amazon-Kinesis_light-bg
AWS-Lambda_light-bg
Amazon-CloudFront_light-bg

Working with maps

Data Transformations

GeoJSONfeature

BikesPoint

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [-0.10997, 51.529163]
  },
  "properties": {
    "id": "BikePoints_1",
    "name": "River Street , Clerkenwell"
  }
}

geoJSON feature

Coordinates = [-0.10997, 51.529163]

51.529163

-0.10997

Coordinates

Data Transformations

GeoJSONfeature

BikesPoint

mapbox Source

mapbox Layer

Adding Search

Data Transformations

GeoJSONfeature

BikesPoint

GraphQL API

Elastic Search

type BikePoint @model @searchable {
  id: ID!
  name: String!
  description: String
  location: Location
}
type Location {
  lat: Float
  lon: Float
}
type Query {
  nearbyBikeStations(location: LocationInput!, km: Int): ModelBikePointConnection
}

GraphQL Schema

Future

More

@undef_obj

@kurtiskemple

@dabit3

Kurt Kemple

Richardo

Nader Dabit

@TheSwaminator 

Nikhil Swaminathan

Finding a bike in London with TfL Unified API and AWS Amplify

By Gerard Sans

Finding a bike in London with TfL Unified API and AWS Amplify

Are you visiting London and want a bike to move around? Are you with some friends? No worries. In this talk, we are going to build LDNBikes an app to find in real-time how many bikes are available so you and your friends are good to go and enjoy a great ride!

  • 2,116