- Functionality of the application
- Demo
- Aws-Xray Map
- TODO items
- Frontend
- How to run the application
- What to do
This application will allow creating/removing/updating/fetching TODO items. Each TODO item can optionally have an attachment image. Each user only has access to TODO items that he/she has created.
The main project purpose was to complete a initial project with some best practices.
- AWS Lambda as Serverless Compute Service
- AWS Simple Storage Service (S3) as File Storage
- AWS DynamoDB - NoSQL Database
- AWS Api Gateway
- AWS CloudFormation
- AWS Xray
- Auth0 as authentication
- Serverless Framework
- React
The application should store TODO items, and each TODO item contains the following fields:
todoId
(string) - a unique id for an itemcreatedAt
(string) - date and time when an item was createdname
(string) - name of a TODO item (e.g. "Change a light bulb")dueDate
(string) - date and time by which an item should be completeddone
(boolean) - true if an item was completed, false otherwiseattachmentUrl
(string) (optional) - a URL pointing to an image attached to a TODO item
You might also store an id of a user who created a TODO item.
The client
folder contains a web application that can use the API that should be developed in the project.
It needs to API endpoint and Auth0 configuration:
const apiId = ''
const apiRegion = ''
export const apiEndpoint = `https://${apiId}.execute-api.${apiRegion}.amazonaws.com/dev`
export const authConfig = {
domain: '...', // Domain from Auth0
clientId: '...', // Client id from an Auth0 application
callbackUrl: 'http://localhost:3000/callback'
}
To deploy an application run the following commands:
cd backend
npm install
sls deploy -v
To run a client application first edit the client/src/config.ts
file to set correct parameters. And then run the following commands:
cd client
npm install
npm run start
This should start a development server with the React application that will interact with the serverless TODO application.
- Implement a new endpoint that allows sending full-text search requests to Elasticsearch
- Implementation pagination support to work around a DynamoDB limitation up to 1 MB
- Add an ability to sort TODOs by due date or priority
- Use middy middleware to increase code re-use
- Performance improvements: Reduce the cold start with plugin
- Each function has its own set of permissions
- Decrease the size of dependencies and increase performance of functions
- Canary Deployment