I created a simple note-keeping web app called “scratch” using a stack of serverless technology.
The heart of the backend is a serverless REST API that utilizes AWS API Gateway and AWS Lambda. Lambda “functions” are short-living compute containers that are started in a response to some trigger, in our case an API call. The application also relies on Amazon Cognito for user management and authentication, Amazon Simple Storage Service (S3) for user file uploads, and Amazon DynamoDB for user note data. These services are managed with configuration files and use the Serverless application framework to manage the provisioning of services.
The front end is a single page application (SPA) written in JavaScript using the React framework. SPAs remove the need for page loads by delivering the code for the entire application upon first navigating to the website. This enables more responsive web applications that can rival native apps. The frontend data is hosted on Netlify’s content distribution network (CDN) which removes the concern of managing a dedicated web server.
Thanks to these serverless technologies, I do not need to worry about the availability or scalability of my application, as it is in the hands of the service providers. Although the project has little traffic, the backend is capable of smoothly scaling up to meet the needs of millions of users without delays or slowdowns, and without requiring any infrastructure management. As for cost, the application could support hundreds of users within the limits of the AWS free tier.
Future plans
I hope to further improve the user experience of this app by utilizing service workers, which will allow note data to be cached on user devices and displayed immediately once opening the app. This improvement will help bring the web app closer to a native app experience.
Furthermore, I intend to make the service end-to-end encrypted, meaning that user data is encrypted by the client app before it is stored within the cloud services. This way the developer (me) is completely unable to view the notes or files stored by the user. The current version uses TLS to protect the user data in-transit, along with encryption at rest for S3 and DynamoDB.
This project was created following the in-depth Serverless Stack guide.