Git Product home page Git Product logo

ims-backend's Introduction

Inventory Management System APIs

User Management:

  • User registration with name, email, and password.
  • User login with registered email and password.
  • Retrieval of information about the currently logged-in user.
  • Check if a user is logged in or not.
  • User logout functionality.
  • Update user information including name, phone, bio, and photo.
  • Change user password with the requirement of the old password.
  • Forgot password functionality that sends a reset link to the user's registered email.
  • Password reset using the token received from the reset link email.

Product Management:

  • Adding a new product with fields such as name, category, SKU, quantity, price, description, and image.
  • Updating a product's information, allowing all fields or specific ones.
  • Retrieval of all products associated with the logged-in user.
  • Retrieval of detailed information about a specific product.
  • Deletion of a product from the database.

Contacting Admin:

  • Users can contact the system administrator.
  • Users can provide a subject (issue/enquiry topic) and a descriptive message.

Endpoints

Endpoints for user management

This endpoints are used to manage the user for the system. dedicated to user management functionalities.

Endpoints HTTP Method Request Data Structure Remark
api/user/register POST {"name": "user name",
"email": "user email",
"password": "user password"}
Need name, email, and password for registration
api/user/login POST {"email": "registered email",
"password": "password"}
Need registered email and password for login
api/user/getuser GET none Return information about the current logged-in user
api/user/isloggedin GET none Protected route; login is required. Return a Boolean value whether the user is logged in Return a Boolean value whether the user is logged in or not
api/user/logout GET none Logout the user
api/user/update PATCH { name: new name,
phone: new phone,
bio: new bio,
photo: image file}
Update the user information; requires multipart form name field used is "photo". Login required.
api/user/changepassword PATCH {"oldPassword": "old password",
"password": "new password"}
Change login password; old password is required. This route requires login.
api/user/forgotpassword POST {"email": "registered email"} Send an email with a password reset link containing
api/user/resetpassword/{token} PUT {"password": "new password"} Use the link sent by forgotpassword route to reset password. This URL is received in email with token.

Endpoints for product management

These routes are used to manage all the product associated to the registred in user

Endpoints HTTP Method Request Data Structure Remark
api/user/register POST {"name": "user name", "email": "user email", "password": "user password"} Need name, email, and password for registration
api/user/login POST {"email": "registered email", "password": "password"} Need registered email and password for login
api/user/getuser GET none Return information about the current logged-in user
api/user/isloggedin GET none Protected route; login is required. Return a Boolean value whether the user is logged in or not
api/user/logout GET none Logout the user
api/user/update PATCH { name: new name, phone: new phone, bio: new bio, photo: image file } Update the user information; requires multipart form data; name field used is "photo". This route requires login.
api/user/changepassword PATCH {"oldPassword": "old password", "password": "new password"} Change login password; old password is required. This route requires login.
api/user/forgotpassword POST {"email": "registered email"} Send an email with password reset link containing
api/user/resetpassword/{token} PUT {"password": "new password"} Use the link sent by forgot password route to reset password; this URL is received in email with token.

Endpoints for contacting admin

This section covers the API endpoint that facilitates users in contacting the system administrator.

Endpoints HTTP Method Request Data Structure Remark
api/product POST {
name: product name,
category: product category,
sku: product sku,
quantity: quantity,
price: item price,
description: product description,
image: product image
}
All fields are required, name for image input is "image"
api/product/{productId} PATCH {
name: product name,
category: product category,
sku: product sku,
quantity: quantity,
price: item price,
description: product description,
image: product image
}
Update the product information, All the fields at once or individual fields can be updated
api/product GET none Get all the products associated with the logged-in user
api/product/{productId} GET none Get the complete details about the product
api/product/{productId} DELETE None Remove the item from the database

This project is part of the final year project

ims-backend's People

Contributors

abishek0057 avatar

Stargazers

Kritesh Timsina avatar

Watchers

 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.