Loading repository data…
Loading repository data…
saddamarbaa / repository
An open-source RESTful API developed using NodeJS, Express, MongoDB and TypeScript that helps you to integrate User Authentication, E-commerce management and Social Media Post Management in your application with Filter, pagination, Sort and Search API
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Free Open source REST API built with | Nodejs + Express + Mongodb ⚡️ Made with developer experience first Prettier + VSCode setup.
- C.R.U.D, Filter, Paginate, Sort and Search API
GET https://saddam-rest-api.herokuapp.com/api/v1/products
| Parameter | Type | Description |
|---|---|---|
limit | number | default= 100 |
category | string | default= All Products |
page | number | default= 1 |
search | string | search string |
sortBy | string | default= createdAt |
OrderBy | string | default= desc |
GET https://saddam-rest-api.herokuapp.com/api/v1/products?page=1&limit=99&sortBy=createdAt&OrderBy=desc&filterBy=category&category=Sports
GET https://saddam-rest-api.herokuapp.com/api/v1/products?page=2&limit=99&sortBy=createdAt&OrderBy=desc&filterBy=category&category=Jewelery
GET https://saddam-rest-api.herokuapp.com/api/v1/products?page=2&limit=99&sortBy=createdAt&OrderBy=desc&filterBy=category&category=Books&search=nodejs
GET https://saddam-rest-api.herokuapp.com/api/v1/products/${id}
| Parameter | Type | Description |
|---|---|---|
id | string | Required. Id of product to fetch |
POST https://saddam-rest-api.herokuapp.com/api/v1/admin/products
| Parameter | Type | Description |
|---|---|---|
name | string | Required. product name |
price | number | Required. product price |
description | string | Required. product description |
productImage | img | Required. product Image |
category | string | Required. product category |
count | number | Optional. default value = 1 |
stock | string | Optional. default value = 'in stock - order soon' |
PATCH https://saddam-rest-api.herokuapp.com/api/v1/admin/products/${id}
| Parameter | Type | Description |
|---|---|---|
id | string | Required. Id of product to update |
token | string | Required. JWT token pass in headers |
DELETE https://saddam-rest-api.herokuapp.com/api/v1/admin/products/${id}
| Parameter | Type | Description |
|---|---|---|
id | string | Required. Id of product to delete |
token | string | Required. JWT token pass in headers |
POST https://saddam-rest-api.herokuapp.com/api/v1/auth/signup
| Parameter | Type | Description |
|---|---|---|
firstName | string | Required. |
lastName | string | Required. |
familyName | string | Optional. |
email | string | Required. |
password | string | Required. |
confirmPassword | string | Required. |
gender | string | Optional. |
dateOfBirth | string | Optional. |
acceptTerms | boolean | Required. |
mobileNumber | number | Optional. |
nationality | string | Optional. |
favoriteAnimal | string | Optional. |
address | string | Optional. |
bio | string | Optional. |
jobTitle | string | Optional. |
After signup you will receive email to verify your account
POST https://saddam-rest-api.herokuapp.com/api/v1/auth/login
| Parameter | Type | Description |
|---|---|---|
email | string | Required. |
password | string | Required. |
POST https://saddam-rest-api.herokuapp.com/api/v1/auth/verify-email`,
| Parameter | Type | Description |
|---|---|---|
userId | string | Required. |
token | string | Required. |
To run this project, you will need to add the following environment variables to your .env file (check environment.config.js file for more examples)
MONGODB_CONNECTION_STRING
TOKEN_SECRET
WEBSITE_URL
API_VERSION ="v1"
JWT_EXPIRE_TIME
SEND_GRID_API_KEY
ADMIN_SEND_GRID_EMAIL
ADMIN_ROLE
ADMIN_EMAIL
NODE_ENV = 'development'
CLIENT_URL
ACCESS_TOKEN_SECRET_KEY
REFRESH_TOKEN_SECRET_KEY
ACCESS_TOKEN_KEY_EXPIRE_TIME
REFRESH_TOKEN_KEY_EXPIRE_TIME
Contributions are always welcome!
To deploy this project on Heroku Flow the Flowing documentation Deploying Node.js Apps on Heroku
For support, email saddamarbaas@gmail.com.
If you have any feedback, please reach out to me at saddamarbaas@gmail.com
Twitter https://twitter.com/ArbaaSaddam/
Linkedin. https://www.linkedin.com/in/saddamarbaa/
Instagram https://www.instagram.com/saddam.dev/
Clone the project
https://github.com/saddamarbaa/node-express-rest-api
Go to the project directory
cd node-express-rest-api
Install dependencies
yarn install
# or
npm install
Start the server
node app.js
or
nodemon app.js
Project is: in progress I'm working on it in my free time























