DogLookBook is a Udacity capstone project for the Cloud Developer Nanodegree. It is a Serverless web application where users can keep information of their dog(s).
- Functionalities
- Tech Stack
- Getting Started
- API Endpoints
- How to use the application
- Functionalities
- Udacity Requirements
- Application can be able to CREATE, UPDATE, DELETE, POST an item.
- User can click on "Upload New Image" button to select and UPLOAD an item.
- Application can be login/logout and show contents of the current user.
- User needs to be authenticated
- Serverless Framework
- React.js
- AWS DynamoDB, Cloudwatch, Lambda, API Gateway, Cloudformation, S3, X-Ray, SDK
- Auth0 using RS256 Algorithm
- Node.js Version 12.x.x
Go to Backend by running:
cd server
npm install
sls deploy -v
Go to Frontend by running:
cd client
npm install
npm run start
cd postman
Method | endpoint |
---|---|
GET | https://stzf6sj4g6.execute-api.us-east-2.amazonaws.com/dev/images |
POST | https://stzf6sj4g6.execute-api.us-east-2.amazonaws.com/dev/images |
PATCH | https://stzf6sj4g6.execute-api.us-east-2.amazonaws.com/dev/images/{imageId} |
DELETE | https://stzf6sj4g6.execute-api.us-east-2.amazonaws.com/dev/images/{imageId} |
POST | https://stzf6sj4g6.execute-api.us-east-2.amazonaws.com/dev/images/s3/{imageId} |
- First, user should login to the application with by click on the
Log In
button.
- Second, user should login with Googgle in order to use Auth0 authentication. This application only has option to login with Google account.
To create a new dog, click on Upload New Image
.
- Fill in description and image data.
- Click
Upload
To update an existing dog, click on the Edit
button of the newly created dog.
- Enter new description in Edit page
- Click
Update
To delete a dog, click on the Delete
button of the newly created dog.
- Codebase:
- Lambda function codes has to split into multiple files/classes.
- Business logic is seperated from code for database access, file storage, etc.
- Using
async/await
contructs instead of passingcallbacks
.
- Best Practices:
- All resources needed to be defined in
serverless.yml
. - All permissions are defined per function in
serverless.yml
. - Application has distributed tracing enabled, log statements, or level metrics
- Incoming HTTP requests are validated in Lambda handlers or using request validation via API Gateway using
serverless-reqvalidator-plugin
.
- Architecure:
- Has 1:M relationship between users and items modeled using DynamoDB.
- Has a composite key with both partition and sort keys.
KeySchema:
- AttributeName: partitionKey
KeyType: HASH
- AttributeName: sortKey
KeyType: RANGE
- Items are fetched using
.query()
instead of.scan()
method.