JavaScript |
ExpressJS v4.18.2 |
Mongoose v6.9.1 |
Dotenv |
Git |
npm |
Cloudinary |
NAME | VERSION | LAST UPDATED | LAST UPDATED BY | LICENSE | VULNERABILITIES |
---|---|---|---|---|---|
bcryptjs | v2.4.3 | 03/03/23 | Abdelrahman Shaheen | MIT | N/A |
compression | v1.7.4 | 03/06/23 | Abdelrahman Shaheen | MIT | N/A |
cors | v2.8.5 | 03/06/23 | Abdelrahman Shaheen | MIT | N/A |
express | v4.18.2 | 03/06/23 | Abdelrahman Shaheen | MIT | N/A |
express-validator | v6.14.3 | 03/06/23 | Abdelrahman Shaheen | MIT | N/A |
helmet | v6.0.1 | 03/06/23 | Abdelrahman Shaheen | MIT | N/A |
jsonwebtoken | v9.0.0 | 03/03/23 | Abdelrahman Shaheen | MIT | N/A |
morgan | v1.10.0 | 03/03/23 | Abdelrahman Shaheen | MIT | N/A |
multer | v1.4.5 | 03/03/23 | Abdelrahman Shaheen | MIT | N/A |
nodemailer | v6.9.1 | 03/03/23 | Abdelrahman Shaheen | MIT | N/A |
sharp | v0.31.3 | 03/06/23 | Abdelrahman Shaheen | Apache-2.0 | (High) |
- Authentication & Authorization
- CRUD operations
- Users, Posts, Likes, Followers, Hashs, Comments
- Profile
- Upload photos for cloudinary
- improve images
- Log out if the password is changed
- Permissions (Admin,vendor,user)
- Block Users
- Verify Rest Code on email
- Forget Password
- More to explore!
Clone the project
git clone https://github.com/aashahin/Qenuan-RESTful-API-Social-Media-Node.js.git
Go to the project directory
cd my-project
Install dependencies
npm install
Start the server
npm run dev
To run this project, you will need to add the following environment variables to your config.env file
PORT=5000
NODE_ENV=development
BASE_URL=https://example.com
MONGO_URL=mongodb://localhost:0000/ecommerces
SECRET_KEY='as#ewronh$%@65*-'
EXPIRESIN=90d
HOST_MAIL="smtp.example.com"
PORT_MAIL=465
SECURE_MAIL=true
USER_MAIL="support@example.com"
PASSWORD_MAIL="password"
FROM_MAIL="Shaheen Team <abdelrahman@shaheen.com>"
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
Some endpoints may require authentication for example. To create a create/delete/update, you need to register your API client and obtain an access token.
The endpoints that require authentication expect a bearer token sent in the Authorization header
.
Example:
Authorization: Bearer YOUR TOKEN
POST /api/v1/user/signup
The request body needs to be in JSON format.
POST /api/v1/user/login
Parameter | Type | Description | Required |
---|---|---|---|
authentication |
string |
Your token | no |
email |
string |
Your email | yes |
password |
string |
Your password | yes |
GET /api/v1/user/info
Parameter | Type | Description | Required |
---|---|---|---|
authentication |
string |
Your token | yes |
GET /api/v1/user/:id
Parameter | Type | Description | Required |
---|---|---|---|
authentication |
string |
Your token | yes |