Skip to content

samir-0711/todos-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todos-backend

todos-backend

Todo Application Backend APIs

A. User APIs

1. sign-up

  • URL

    /api/v1/auth/sign-up

  • Method:

    POST

  • URL Params

    None

  • Data Params

    Required:

    username=[String]

    password=[String]

  • Success Response:

    • Code: 200
      Content: { id : 6074fb9d7e8466001570e7db, username: "samir784", createdAt: "2021-03-19T19:29:33.231Z", updatedAt: "2021-03-19T19:29:33.231Z" }
  • Error Response:

    • Code: 409 Resource Already Exists
      Content: { error : "Username already exist" }

    OR

    • Code: 401 Missing Credentials
      Content: { error : "Username or Password is Missing" }
  • Sample Call:

    axios.post(
    "https://todo-samir.herokuapp.com/api/v1/auth/sign-up",
    {
      "username": "samir784",
      "password": "748547854"
    });

2. sign-in

  • URL

    /api/v1/auth/sign-in

  • Method:

    POST

  • URL Params

    None

  • Data Params

    Required:

    username=[String]

    password=[String]

  • Success Response:

    • Code: 200
      Content: { id : 6074fb9d7e8466001570e7db, username: "samir784", createdAt: "2021-03-19T19:29:33.231Z", updatedAt: "2021-03-19T19:29:33.231Z" }
  • Error Response:

    • Code: 401 Unauthorized
      Content: { error : "Invalid Username or Password!" }

    OR

    • Code: 401 Missing Credentials
      Content: { error : "Username or Password is Missing" }
  • Sample Call:

    axios.post(
    "https://todo-samir.herokuapp.com/api/v1/auth/sign-in
    {
      "username": "samir784",
      "password": "748547854"
    });

todos-frontend

todos-frontend

Basic structure of the project repository 📂

|
|- public             # Any files within this directory will not be processed by Webpack but copied directly to the build folder.
|- src:               # Contains all source code for the React application.
    |
    |- components     # Contains all the components used within the app.
       |- Auth.js     # Responsible for handling SignIn & SignOut.
       |- Todos.js    # Responsible for handling todos.
    |- App.js
    |- index.js

Screenshot

Todo Frontend Repo

image image