A React web client (with React 15.6.1, React Router 4.1.2, and Redux 3.7.2) for a serverless Online Art Gallery application leveraging 8 AWS Services: S3, Cognito, API Gateway, Lambda, DynamoDB, Certificate Manager, CloudFront, and Route53. (This is a work-in-progress that will replace the currently-deployed Angular-based site at http://iartx.com.)
Setting up the project
With an eye toward using Bootstrap in this project, and following the Create React App documentation for extending the initial seed, I installed node-sass and npm-run-all, then added scripts to the package.json file to watch and build the SCSS files. Bootstrap 3.3.7 and react-bootstrap were then also added to the project.
TODO: Upgrade to Bootstrap 4, when released (in first beta in Aug 2017)
Using Amazon Cognoto for Signup, Login, and Permissions Management
The initial code for this project followed the excellent Serverless Stack Tutorial by AnomalyInnovations. Among other things, that tutorial demonstrates how to leverage the Amazon Cognito service as a backend for user signup, signup confirmation, login, and logout. Following full implementation of the tutorial code, the following modifications and extensions were made:
Implemented Redux for state management, moving auth-related state and methods from the
Logincomponents into new
Appcomponent, making is a separate component
Merged the largely-redundant
Logincomponents into a single one named
Enhanced user confirmation functionality, showing the confirmation form following a login by an unconfirmed user, in addition to showing it immediately following a new signup.
TODO: Add Forgot Password and Login with Facebook functionality.
Additional details coming soon....