The task is to enable a seller to sell online, there will be a common page for all the sellers to come & register themselves
Creating a Sellers Dashboard Backend API where sellers can register and login themselves, create a new store and list their inventories based on the category and subcategory added. It is built using Nodejs, ExpressJs, MongoDB.
Checkout the Website Seller Dashboard Backend API
Backend API Sample Postman Documentation Link
- Sign Up
Seller can able to create His/Her Account if it doesn't exists earlier. Details required to create a new account are email, businessName, password, confirm password.
- Sign In
Seller can able to login to the existing account by entering the details such as email, password.
- Create Store
Seller can able to create a new store by entering details such as GSTIN Number, Store Logo URL, Store Timing.
- Create Category
Seller can able to create a new category in the store by entering detail such as Category Name.
- Create Sub-Category
Seller can able to create a new sub-category in the store based on the category selected by entering detail such as Sub Category Name.
- Create New Inventory
Seller can able to create a new inventory based on the category and subcategory selected. New inventory can be created by entering details such as productName, MRP, SellingPrice, quantity, Product Image URL.
- Displaying list of all inventory
Users can able to see the list of all inventories of the specific seller based on the category and subcategory selected.
-
/api/seller/register
To Register a new seller hit the following URL with a post request:
https://seller-dashboard-backend.onrender.com/api/seller/register -
/api/seller/login
To Login the existing seller hit the following URL with a post request:
https://seller-dashboard-backend.onrender.com/api/seller/login -
/api/seller/store/create/:id
To Create a new store for a specific seller, hit the following URL with a post request:
https://seller-dashboard-backend.onrender.com/api/seller/store/create/:id -
/api/seller/store/add-category/:sellerId/:storeId
To create a new category in the store of the seller, hit the following URL with a post request:
https://seller-dashboard-backend.onrender.com/api/seller/store/add-category/:sellerId/:storeId -
/store/add-inventory/:categoryId/:subCategoryId
To create a new subcategory for a particular category in the store of seller, hit the following URL with a post request:
https://seller-dashboard-backend.onrender.com/api/seller/store/add-inventory/:categoryId/:subCategoryId -
/seller/store/add-inventory/:categoryId/:subCategoryId
To create a new inventory for a particular subcategory, hit the following URL with a post request:
https://seller-dashboard-backend.onrender.com/seller/store/add-inventory/:categoryId/:subCategoryId -
/store/all-inventories/:subCategoryId
To display the list of all inventory based on the category and subcategory selected, hit the following URL with a get request:
https://seller-dashboard-backend.onrender.com/seller/store/all-inventories/:subCategoryId
- Version Control System: Git
- VCS Hosting: GitHub
- Integrated Development Environment: VSCode
For development, you will only need Node.js and a node global package installed in your environement and mongodb for database.
- Node Installtion on Windows
Go on to the official Node.js website and download the installer. Also, be sure to have
.git
available in your PATH,npm
might need it (You can find git). - Other operating System You can find more information about the installation on the official Node.js website and the official NPM website.
If the installation was successful, you should be able to run the following command.
$ node --version
v16.13.0
$ npm --version
8.2.0
If you need to update npm
, you can make it using npm
! Cool right? After running the following command, just open again the command line and be happy.
$ npm install npm -g
-
Open terminal.
-
Change the current working directory to the location where you want the cloned directory.
$ git clone https://github.com/kartiksarwan2017/Seller-Dashboard-Backend
-
Install all the dependencies by running :
npm install
-
Run npm start to run the project at local host, port 8000:
$ npm start
Open a/nice/path/to/a.file
then edit it with your settings. You will need:
- A setting
- one more setting
- Another one more setting