Code Monkey home page Code Monkey logo

hodlers's Introduction

Project

Hodlers

Stack Used

  • NodeJS
  • DynamoDB (Database)
  • SendGrid (Sending Emails)
  • node-schedule (Running Cron Job)
  • AWS S3 Bucket (To Store Image)

API's Details

URL : localhost:3009/create/auction
Method : POST
payload : form-data => because it contains item image also
1st param is a file
2nd param is

auctionData : 
{
  "endTime": 1549055317000,
  "itemDesc": "This is a super bus",
  "itemName": "bus",
  "startAmount": "45000",
  "startTime": 1556719117000
}

Note: auctionData's above all fields are mandatory.
Need to put start-time and end-time in form of EPOCH 13 digit => https://www.epochconverter.com/
Functionality : It submit item for Auction, Contains all Fields Validation.



URL : localhost:3009/create/user
Method : POST
payload:

{
	"email":"[email protected]",
	"name":"yogendra incred",
	"password":"12345611"
}

Functionality : It create authenticated user who can do bidding for items , Contains all Fields Validation.



URL : localhost:3009/login
Method : POST
payload:

{
	"email":"[email protected]",
	"password":"12345611"
}

Functionality : User can login so that he/she can do bidding . Contains All Fields Validation
In Response, JWT_TOKEN will be received for that user which can be used in other route if that user wants
to perform any actions , like checking his/her all bids
Resposne :

{
    "status": "true",
    "info": "Successfully Loged In",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InlvZ2VuZHJhLnNheGVuYUBpbmNyZWQuY29tIiwiaWF0IjoxNTU2ODEwNTkwfQ.wwWXpCgxp6oa9Z75iDpwd-Wq_D018qqBIRf8amyz4W4"
}


URL : localhost:3009/submit/bid
Method : POST
Header : apiKey : JWT_TOKEN_OF_LOGEDIN_USER
payload :

{
	"amount":"75000",
	"itemId":"1556805300070"
}

Functionality : Logged In user can submit bid for item with passed itemId in payload, Contains All Field Validation



URL : localhost:3009/view/bid
Method : GET
Header : apiKey : JWT_TOKEN_OF_LOGEDIN_USER
Functionality : Get All bid details of the Logged In User



URL : localhost:3009/fetch/all/item
Method : GET
Functionality : Get ALL item in Auction



URL : localhost:3009/fetch/item/:itemId
example : localhost:3009/fetch/item/1556801886187
Method : GET
Functionality : Full Item details for the passed itemId
If the item is already auctioned it gives the details of buyer and the amount
If the item is currently in auction, it list the highest bid amount



URL : localhost:3009/logout
Method : DELETE
Header : apiKey : JWT_TOKEN_OF_LOGEDIN_USER
Functionality : Log out the LogedIn User



Runing a task to automatically finding the winner of each auction when it hits the endTime.
Sending an email to all users who bid for the item with details of the winner and final
amount.

Detailed Documentation

https://documenter.getpostman.com/view/2416522/SWEB2G2w?version=latest

Author

Yogendra Saxena

hodlers's People

Contributors

yogain123 avatar

Stargazers

 avatar  avatar

Watchers

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