Skip to content

ploratran/DogLookBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Udacity Cloud Developer Nanodegree Capstone

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).

Demo:

Table of Contents

  1. Functionalities
  2. Tech Stack
  3. Getting Started
  4. API Endpoints
  5. How to use the application
  6. Functionalities
  7. Udacity Requirements

Functionalities:

  • 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

Tech Stack:

Getting Started:

Go to Backend by running:

cd server
npm install
sls deploy -v

Go to Frontend by running:

cd client
npm install
npm run start

Debugging with Postman and AWS X-Ray Tracing:

cd postman

API Endpoints:

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}

How to use the application:

  1. First, user should login to the application with by click on the Log In button.

  1. Second, user should login with Googgle in order to use Auth0 authentication. This application only has option to login with Google account.

Create a new dog

To create a new dog, click on Upload New Image.

  1. Fill in description and image data.
  2. Click Upload

Update a dog

To update an existing dog, click on the Edit button of the newly created dog.

  1. Enter new description in Edit page
  2. Click Update

Delete a dog

To delete a dog, click on the Delete button of the newly created dog.

Udacity Capstone Requirements

  1. 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 passing callbacks.
  1. 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.
  1. 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.

About

Project using Serverless Framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published