Code Monkey home page Code Monkey logo

indorse-backend's Introduction

Indorse

This repo has the code lambda functions for API service.

Problem Statement

Scope of Assignment

  • Create an API service in AWS that will accept data from incoming connections and insert / update in AWS Dynamo DB / Cloud hosted Mongo DB

  • Create AWS Lambda module(s) in NodeJS 8.x to complete all the features.

Basic feature of the application should include:

  • Lambda to create user profile. User profile will include user_id, name, email, mobile number, address, company, title

  • Lambda to update user profile when the email or mobile number matches in the incoming api request

  • Lambda to update user interests including sports, food, media and more. Come up with relevant fields that can be added to user profile and add the same as parameter for the function

  • All data should go to AWS Dynamo DB

  • Configure AWS API gateway and create relevant APIs for create and update user records. Configure security for the API and configure rate limiting for the APIs

  • Use async/await calls in the Node JS functions

  • Add relevant code comments and modularise the code properly. Create more than one Lambda wherever required and make inter Lambda calls if required

  • Write an automated test for this lambda

Run the project locally

Run the following command and the APIs will the available locally for testing and development.

git clone https://github.com/vijaykrishnavanshi/indorse-backend.git
cd indorse-backend
npm install
npm run offline

Deploy Project

Run the following command once the setup is working locally on your system.

npm run deploy

Lint Project

npm run lint  # for cheking the lint error
npm run lint-fix # for fixing the minor lint error

Run Tests

Used Mocha

npm run test  # for running tests

Generate Documentation

Used API Docs

npm run generate-docs  # for generating documentation

Basic Feature

  • Lambda to create user profile. User profile will include user_id, name, email, mobile number, address, company, title
  • Lambda to update user profile when the email or mobile number matches in the incoming api request
  • Lambda to update user interests including sports, food, media and more. Come up with relevant fields that can be added to user profile and add the same as parameter for the function
  • All data should go to AWS Dynamo DB / Mongo Cloud Hosted Server
  • Configure AWS API gateway and create relevant APIs for create and update user records. Configure security for the API and configure rate limiting for the APIs
  • Use async/await calls in the Node JS functions
  • Add relevant code comments and modularise the code properly. Create more than one Lambda wherever required and make inter Lambda calls if required
  • Write an automated test for this lambda

Deployed Information

Service Information
service: indorse-backend
stage: dev
region: us-east-1
stack: indorse-backend-dev
api keys:
  None
endpoints:
  GET - https://m0mlmbw42g.execute-api.us-east-1.amazonaws.com/dev/get
  POST - https://m0mlmbw42g.execute-api.us-east-1.amazonaws.com/dev/create-profile
  POST - https://m0mlmbw42g.execute-api.us-east-1.amazonaws.com/dev/update-profile
  POST - https://m0mlmbw42g.execute-api.us-east-1.amazonaws.com/dev/update-interest
functions:
  get: indorse-backend-dev-get
  createProfile: indorse-backend-dev-createProfile
  updateProfile: indorse-backend-dev-updateProfile
  updateInterest: indorse-backend-dev-updateInterest

Postman Collections

For Localhost: https://www.getpostman.com/collections/d68d6ba1212d8d1c5c05

For Deployed Version: https://www.getpostman.com/collections/4e63dc0d46edea1867f3

Documentation

Docs reside in ./docs folder. You can either host them or view index.html in your browser.

Note: For running the npm run deploy command you need initialise serverless with the proper credentials of user with access to lambda, api_gateway, IAM and cloudfront.

indorse-backend's People

Contributors

vijaykrishnavanshi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.