DVC

Backend API for the DevCamper application to manage bootcamps, courses, reviwes, users and authentification

Bootcamps 7

Bootcamps CRUD functionality

Description

Fetch all bootcamps from datbase. Includes pagination, filtering, etc.

Description

Add new bootcamp to database. Must be authenticated and must be publisher or admin.

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "name": "TEST 1", "description": "ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX", "website": "https://moderntech.com", "phone": "(222) 222-2222", "email": "enroll@moderntech.com", "address": "220 Pawtucket St, Lowell, MA 01854", "careers": ["Web Development", "UI/UX", "Mobile Development"], "housing": false, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Update single bootcamp in databbase

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{"careers": ["Web Development", "Business"]}
Description

Get bootcamps within a radius of a specific zipcode

Description

Route to upload bootcamp photo

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
Key Value Description
file

Courses 6

Creare, read, update and delete courses

Description

Get all courses in database

Description

Create a course for a specific bootcamp

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "title": "Front End Web Development", "description": "This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue", "weeks": 8, "tuition": 8000, "minimumSkill": "beginner", "scholarhipsAvailable": true }
Description

Update course in database

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "tuition": 13300, "minimumSkill": "advanced" }

Authentication 8

Routes for user authentication including register, login, reset password and etc.

Description

Add user to databse with encrypted password

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "name": "John", "email": "john@gmail.com", "password": "123456", "role": "publisher" }
Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "email": "john@gmail.com", "password": "123456" }
Headers
Key Value Description
Content-Type application/json

JSON Type

Description

Generate password token and send email

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "email": "john@gmail.com" }
Description

Reset user password using token

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "password": "1234567" }
Description

Update logged in user name and email

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "email": "john@gmail.com", "name": "John Smith" }
Description

Update logged in user password, send in the body currentPassword and newPassword

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "currentPassword": "1234567", "newPassword": "123456" }

Users 5

CRUD functionality for users only available to admins

Description

Get all users (admin)

Description

Add user to database (admin)

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "name": "Nate Smith", "email": "nate@gmail.com", "password": "123456" }
Description

Update user in database (admin)

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "role": "publisher" }

Reviews 6

Manage course reviews

Description

Get all reviews from database and populate with bootcamp name and description

Description

Fetch a review from database by id and populate Bootcamp name and description

Description

Insert review for a specific bootcamp

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "title": "Nice", "text": "LLLLLLLLLLLLLLLLLLLLLLLl", "rating": 8 }
Description

Update user review

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{ "rating": 3 }