Amazon Location Service GeoTrack Vue.js

Location data is a vital ingredient in today's applications, enabling capabilities ranging from asset tracking to location-based marketing.

With Amazon Location Service, you can easily add capabilities such as maps, points of interest, geocoding, routing, geofences, and tracking to applications. You retain control of your location data with Amazon Location, so you can combine proprietary data with data from the service. Amazon Location provides cost-effective location-based services (LBS) using high-quality data from global, trusted providers Esri and HERE Technologies.

This repo contains a Vue.js application that displays the users last positions reported in the past 15min in a map, leveraging Amplify for authentication. In the Amplify build process, there is automation that automattically creates the Amazon Location Services' resources and associate a policy to Amazon Cognito role for accessing them.

Architecture Overview

Stack

  • Front-end - Vue.js as the core framework, Quasar for UI, MapLibre for map visualiztion, AWS Amplify for Auth UI component and AWS integration.
  • Data - User data is saved in Amazon DynamoDB via GraphQL using AWS AppSync. Devices GPS positions are stored in Amazon Location Service Tracker.
  • Auth - Amazon Cognito provides JSON Web Tokens (JWT) and along with AppSync fine-grained authorization on what data types users can access.
  • IoT - AWS IoT with topics and rules integrated with an AWS Lambda.

User Interface

Real-time tracking visualization

Managing Delivery Agents

Managing Delivery Routes

Testing the solution

At the toolbar there is a fire icon button. Upon clicking this button, the application will simulate the existent delivery routes. An AWS Lambda reads the start and end positions of each delivery route, calculates the route and sends IoT messages with the IoT devices associated to the delivery agents reporting their geo-location over time. The application does not prevent having two routes with the same IoT device, which will produce inconsistent position.

Deployment

To deploy this solution into your AWS Account please follow our Deployment Guide

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.