server side of partneran
- express
- passport
- jsonwebtoken
- jwt-decode
- express-jwt
- morgan
- nodemailer
- body-parser
- cors
- passport-local
- passport-local-sequelize
- sequelize
- pg
- mocha
- chai
- dotenv
- chai-http
- multer
npm run test:integration
npm run test:e2e
userId: DataTypes.INTEGER,
email: DataTypes.STRING,
myhash: DataTypes.STRING(1024),
mysalt: DataTypes.STRING,
photo_URL: DataTypes.STRING,
short_bio: DataTypes.STRING,
verify: DataTypes.BOOLEAN
roleId: DataTypes.INTEGER,
roles: DataTypes.STRING,
userId: DataTypes.INTEGER(FK),
ideaId: DataTypes.INTEGER(FK)
ideaId: DataTypes.INTEGER,
title: DataTypes.STRING,
description: DataTypes.TEXT,
status: DataTypes.STRING,
image: DataTypes.STRING,
video: DataTypes.STRING,
userId: DataTypes.INTEGER(FK),
categoryId: DataTypes.INTEGER(FK)
voteId: DataTypes.INTEGER,
votes: DataTypes.INTEGER,
userId: DataTypes.INTEGER(FK),
ideaId: DataTypes.INTEGER(FK)
commentId: DataTypes.INTEGER,
content: DataTypes.STRING,
userId: DataTypes.INTEGER(FK),
ideaId: DataTypes.INTEGER(FK)
reportId: DataTypes.INTEGER,
reason: DataTypes.STRING,
status: DataTypes.BOOLEAN,
userId: DataTypes.INTEGER(FK),
ideaId: DataTypes.INTEGER(FK)
categoryId: DataTypes.INTEGER,
name: DataTypes.STRING
notificationId: DataTypes.INTEGER,
message: DataTypes.STRING,
status: DataTypes.BOOLEAN,
userId: DataTypes.INTEGER(FK),
ideaId: DataTypes.INTEGER(FK)
user_notif_id: DataTypes.INTEGER,
userId: DataTypes.INTEGER(FK),
notificationId: DataTypes.INTEGER(FK)
list_approve_id: DataTypes.INTEGER,
status: DataTypes.BOOLEAN,
userId: DataTypes.INTEGER(FK),
ideaId: DataTypes.INTEGER(FK)
Default development port and host : http://localhost:3000/
Routes | HTTP | Description |
---|---|---|
/api/seeders | POST | seeders dummy data |
Routes | HTTP | Description |
---|---|---|
/api/users/:id | GET | get a user |
/api/users/:id | PUT | edit a user |
/api/users/:id | DELETE | delete a user |
/api/users/forgot | POST | forgot password, user submit their email |
/api/users/password | POST | new password, user submit their new password |
Routes | HTTP | Description |
---|---|---|
/api/auth/login | POST | login a user |
/api/auth/signup | POST | process signup a user |
Routes | HTTP | Description |
---|---|---|
/api/auth/verification/:token | GET | process email verification new registered user & login when user click link in their email |
/api/auth/verification/forgot/:token | GET | show form new password email verification & login when users click link in their email |
Routes | HTTP | Description |
---|---|---|
/api/ideas | POST | process new idea |
/api/ideas/:slug | GET | show an idea with it's comments |
/api/ideas/ | GET | show all ideas with it's comments |
/api/ideas/:ideaid | PUT | edit an idea |
/api/ideas/:ideaid | DELETE | delete an idea |
Routes | HTTP | Description |
---|---|---|
/api/ideas/:ideaid/comments/ | POST | process new comment |
/api/ideas/:ideaid/comments/:commentid | PUT | edit a comment |
/api/ideas/:ideaid/comments/:commentid | DELETE | delete a comment |
Routes | HTTP | Description |
---|---|---|
/api/ideas/:ideaid/votes/ | POST | add 1 vote |
/api/ideas/:ideaid/votes/ | GET | show vote's total count base on each idea |
/api/ideas/:ideaid/votes/:voteid | DELETE | remove 1 vote |
Routes | HTTP | Description |
---|---|---|
/api/ideas/:ideaid/reports/ | POST | add 1 report |
/api/ideas/:ideaid/reports/ | GET | show all reports |
/api/ideas/:ideaid/reports/:reportid | DELETE | remove 1 report |
Routes | HTTP | Description |
---|---|---|
/api/notif/ | POST | process new notification |
/api/notif/:notifid | PUT | process mark notification as done |
/api/notif/:notifid | DELETE | delete one notification |
Routes | HTTP | Description |
---|---|---|
/api/categories/ | GET | show all categories |
Routes | HTTP | Description |
---|---|---|
/api/list_approves/ | POST | one user want to join idea's conversation, status mark as false |
/api/list_approves/:list_approve_id | PUT | initiator accept user who want to join idea's conversation, status mark as true |
/api/list_approves/ | GET | get all list_approves by user who post idea |
/api/list_approves/:list_approve_id | DELETE | delete a list_approves |