- MongoDB:
- Register on mongodb.com and create Shared Claster.
- Create a user for database (userName & password)
- IP Access List - add 0.0.0.0
- Click "Connect" button and select "Connetct your application"
- Copy claster info from connection string. By default - "claster0.xxxxxx"
git clone {repository URL}
cd back-manager-app
- open src/index.ts. In mongoose.connect method replace ${} by userName, Password and ClasterInfo from Prerequisites
Run commands
git switch source
heroku create --region eu
heroku git:remote -a <YOUR_APP_NAME>
git push heroku source:master
-
Swagger Docs
(/api-docs
route) -
Auth
(auth/
route)POST /signup
- new user registrationPOST /signin
- user authorization
-
User
(users/
route)GET /
- get all usersGET /:userId
- get the user by id (ex. “/users/123”)PUT /:userId
- update userDELETE /:userId
- delete user
-
Board
(/boards
route)GET /
- get all boardsGET /:boardId
- get the board by idPOST /
- create boardPUT /:boardId
- update boardDELETE /:boardId
- delete board
-
Boards
(/boardsSet
route)GET /
- Get Boards by list of boardIdGET /:userId
- Get Boards where user is owner or one of invited
-
Column
(boards/:boardId/columns
route)GET /
- get all columnsGET /:columnsId
- get the column by idPOST /:columnsId
- create columnPUT /:columnsId
- update columnDELETE /:columnsId
- delete column
-
Columns
(/columnsSet
route)GET /
- Get Columns by list of columnId or in Boards where user is owner or one of invitedPATCH /
- Change oreder of list of columnsPOST /
- Create set of Columns
-
Task
(boards/:boardId/columns/:columnsId/tasks
route)GET /
- get all tasksGET /:taskId
- get the task by idPOST /
- create taskPUT /:taskId
- update taskDELETE /:taskId
- delete task
Tasks
(/tasksSet
route)GET /
- Get Tasks by list of taskId or in Boards where user is owner or one of invited, or by search requestPATCH /
- Change oreder and column of list of tasksGET /:boardId
- Get Tasks in selected Board
File
(file/
route)GET /
- Get Files by list of taskId or in Boards where user is owner or one of invited, or by TaskIdPOST /
- upload filemultipart/form-data
GET /:boardId
- Get files by BoardIdDELETE /:fileId
- delete file
Point
(points/
route)GET /
- Get Points by list of pointId or in Boards where user is owner or one of invitedPOST /
- Create a new pointGET /:taskId
- Get Points by TaskIdPACTH /:pointId
- Change title and donePACTH /
- Change done filed in set of pointsDELETE /:pointId
- delete point
- events: "users", "boards", "columns", "tasks", "files", "points" Listen events on backend deploy main route (soket = io('https://xxx.herokuapp.com'))
- socket payload:
{
action: 'add' | 'update' | 'delete' // Тип изменения в базе
users: string[] // Список id юзеров, которые имеют доступ к данным об обновлении чего-то в базе(Например, при изменении колонки здесь будет список из владельца доски и приглашенных на нее пользователей)
ids: string[] // Список id созданных/измененных/удаленных записей в базе
guid: string // Уникальный код запроса (Присваивается в хэддере Guid запроса на бэкенд)
notify: boolean // Нужно ли уведомлять текущего пользователя об изменениях в базе
initUser: string // id пользователя, инициировавшего изменения в базе (Присваивается в хэддере initUser запроса на бэкенд)
}