Mince Pie Challenge: Building a Serverless RESTful API and React Client
Since moving our infrastructure over to the AWS stack I have keen to explore how we can take advantage of the large number of services at our disposal, along with the Serverless methodology. In this blog-series I wish to document my experience building a complete Serverless application which harnesses as many of the AWS offerings as possible. We will explore building both a RESTful API and a React Client, all hosted without any Servers to maintain!
Mince Pie Challenge
The application itself will revolve around the responsibly of managing the ‘extremely important’ challenge of rating mince pies. We will provide the user with the ability to register, login, add new mince pies to the challenge (with a photo) and rate these pies. Although this may seem like a trivial CRUD system it will allow us to explore many different technologies and services in the process.
📝 The API will demonstrate the use of:
- RAML to design and document the API endpoints.
- HAL to represent the API.
- Serverless Framework to manage the AWS Lambda functions and accompanying resources.
- Managing the Serverless Framework dependency using Docker and Docker Compose.
- The latest ES6 JavaScript features will be used to implement the service, with Webpack, Babel and Flow.
- Testing will be achieved using Jest.
- Authentication will be handled by Amazon Cognito using JSON Web Tokens.
- Persistent state will be stored within Amazon DynamoDB.
- Signed Amazon S3 URLs will be used to upload and store photos.
- Thumbnails will be created using an asynchronous S3 upload trigger and AWS Lambda (inc. ImageMagick).
- The custom Amazon API Gateway domain will be managed using serverless-domain-manager.
🖥️ The Client will demonstrate the use of:
- React for presentational logic.
- Redux and redux-thunk for state management.
- React Router will be used to manage URL-based navigation transitions.
- The application will be managed using create-react-app.
- Managing the create-react-app dependency using Docker and Docker Compose.
- Authentication will be supplied by the Amazon Cognito Identity SDK.
- Testing will be achieved using Jest and Enzyme.
- Semantic UI for component styling.
- Terraform to provision the static endpoint we will publish the resulting client to.
With so much to do, we better get started! Join me in the next post were we will go about designing and documenting our RESTful API using RAML and HAL.