Applications and Architectures

Robust. Scalable. Secure.

Weather

The Weather application is a highly scalable and completely serverless application hosted in AWS. The application consists of a React SPA, or single-page application, user interface which interacts with the LEANSTACKS REST API to obtain weather forecast information. The REST API is backed by a suite of serverless microservices in AWS Lambda. The microservices store information in highly scalable DynamoDB tables.

Open the Weather application.

Architecture

Weather Application Architecture Diagram

Features

Content Delivery Network (CDN)
All requests for the Weather application are serviced by an Amazon CloudFront CDN. Requests to fetch both static and dynamic resources, i.e. API calls, are routed to the CDN. Rules within CloudFront determine where requests are routed. Static resources, such as JavaScript and HTML for the Weather UI, are served from Amazon S3 buckets. Dynamic content, such as REST API calls, are routed to the Amazon API Gateway. Since CloudFront CDNs are hosted at Amazon edge locations around the globe, there is much lower network latency by routing all requests across Amazon's high-speed networks rather than traversing the Internet.

React SPA User Interface
The Weather UI component is constructed using modern, single-page application technologies and techniques. The foundation of the technlogy stack is the React Framework.

REST API
The UI obtains data from the LEANSTACKS REST API. The REST API is implemented in Amazon API Gateway. The Gateway authenticates requests with AWS Lambda Authorizers before routing the requests to backend services.

Microservices
The business functionality is implemented in fine-grained, domain-specific microservices. The microservices are deployed as AWS Lambda functions. The Lambda functions utilize microservice design patterns such as Robust API, Gatekeeper, Aggregator, and Circuit Breaker. Each microservice is authored in JavaScript and uses the Node.js 8.10 runtime. The Serverless Framework is the foundation of the DevOps and application technology stacks.

Database
Amazon DynamoDB tables serve as both a cache for third-party vendor APIs and as a transactional database. DynamoDB is inexpensive to operate, highly scalable, and serverless.

Screenshots

Technology Stacks

User Interface
  • React
  • Redux
  • Moment
  • Lodash
  • Bootstrap
  • FontAwesome
  • Babel
  • JavaScript
  • Webpack
Services
  • AWS SDK
  • Express
  • Moment
  • Lodash
  • Node.js 8.10
  • JavaScript
  • Serverless Framework

Try it on LEANSTACKS  Weather.

Flashcards

The Flashcards application is a highly scalable and completely serverless application hosted in AWS. The application consists of a React SPA, or single-page application, user interface which interacts with the LEANSTACKS REST API to search, create, and manage decks of flashcards. The REST API is backed by a suite of serverless microservices in AWS Lambda. The microservices store information in highly scalable DynamoDB tables. Amazon Cognito secures the application. Users may sign up for a LeanStacks account or may authenticate using popular services like Google.

Open the Flashcards application.

Architecture

Flashcards Application Architecture Diagram

Features

Content Delivery Network (CDN)
All requests for the Flashcards application are serviced by an Amazon CloudFront CDN. Requests to fetch both static and dynamic resources, i.e. API calls, are routed to the CDN. Rules within CloudFront determine where requests are routed. Static resources, such as JavaScript and HTML for the Flashcards UI, are served from Amazon S3 buckets. Dynamic content, such as REST API calls, are routed to the Amazon API Gateway. Since CloudFront CDNs are hosted at Amazon edge locations around the globe, there is much lower network latency by routing all requests across Amazon's high-speed networks rather than traversing the Internet.

React SPA User Interface
The Flashcards UI component is constructed using modern, single-page application technologies and techniques. The foundation of the technlogy stack is the React Framework.

REST API
The UI obtains data from the LEANSTACKS REST API. The REST API is implemented in Amazon API Gateway. The Gateway authenticates requests with AWS Lambda Authorizers before routing the requests to backend services.

Security
The Flashcards application allows users to freely browse and use published, public decks of flashcards without an account. However, users must sign into the application to create their own personalized decks of flashcards. Amazon Cognito manages the security for the Flashcards application. Users may create a LEANSTACKS account or authenticate using popular, third-party services like Google. Amazon Cognito securely houses account information and issues OAuth tokens which grant access to the LEANSTACKS REST API.

Microservices
The business functionality is implemented in fine-grained, domain-specific microservices. The microservices are deployed as AWS Lambda functions. The Lambda functions utilize microservice design patterns such as Robust API, Gatekeeper, and Internal Handoff. Each microservice is authored in JavaScript and uses the Node.js 8.10 runtime. The Serverless Framework is the foundation of the DevOps and application technology stacks.

Scheduler
Some application features, such as determining the most popular decks of flashcards, require microservices to be invoked on a schedule rather than triggered by user action, i.e. the REST API. Amazon CloudWatch Rules publish CloudWatch Events that invoke microservices on a flexible, configurable schedule.

Database
Amazon DynamoDB tables serve as the primary database. DynamoDB is inexpensive to operate, highly scalable, and serverless.

Screenshots

Technology Stacks

User Interface
  • React
  • Redux
  • Moment
  • Lodash
  • AWS Amplify
  • Bootstrap
  • FontAwesome
  • Babel
  • JavaScript
  • Webpack
Services
  • AWS SDK
  • Express
  • Moment
  • Lodash
  • Node.js 8.10
  • JavaScript
  • Serverless Framework

Try it on LEANSTACKS  Flashcards.