ameenshahh / DeskDay-React-Design

DeskDay-React-Design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assignment

Desk Day Assignment Task

Tools Used

1. NodeJS
2. ExpressJS
3. JWT (authentication)
4. MondoDB(database)
5. Mongoose (ODM)
6. Bcrypt(hashing password)
7. ReactJS
8. Material UI

Installation of react-task

Install my-project with npm

  
  git clone https://github.com/ameenshahh/DeskDay-React-Design.git
  cd react-task
  npm install 
  npm start

Server starts on PORT 3000

Index route is localhost:3000

Installation of node-task

  
  git clone https://github.com/ameenshahh/DeskDay-React-Design.git
  cd nodejs-task
  npm install 
  npm run dev

Server starts on PORT 4000

Index route is localhost:4000

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT - Port number

DATABASE_URL - Mongodb connection url string

SECRET_KEY - secret for jwt token

API Reference

Sign up

  POST /signup

  Test Input :
  {
    "email":"test@gmail.com",
    "password":"test"
  }

Sign in

  POST /signIn

  Test Input :
  {
    "email":"test@gmail.com",
    "password":"test"
  }

Adding vendor

  POST /vendor/add
   test input : 
   {
     "vendorName":"Reliance",
     "vendorEmail":"info@reliance.com"
   }

Add invoice

  POST /invoice/add
  test input : 
  {
    "invoiceName":"Invoice 1",
    "invoiceAmount":1000,
    "vendor":"655b81674de1e111a9b519c8"
  }

Invoice payment

  POST /invoice/payment
  test input : 
  {
    "invoiceId":"655c257170eead6aa25c50eb",
    "amount":500
  }

  try submitting different amounts to see different edge cases

Authors

About

DeskDay-React-Design


Languages

Language:JavaScript 92.5%Language:HTML 7.4%Language:CSS 0.1%