DevCamper LOCAL

Backend API for the DevCamper application to manage bootcamps, courses, reviews, users and authentication

Authentication 8

Authentication routes

Description

Register a user

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "name": "Test Publisher", "email": "test5@test.com", "password": "testing", "role": "publisher" }
Description

Login a user

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "email": "test2@test.com", "password": "testing" }
Description

Get the currently logged in user

Headers
KeyValueDescription
Content-Typeapplication/json
Description

Forgot Password function to set resetPasswordToken and resetTokenExpire

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "email": "test6@test.com" }
Description

Resets the users password

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "password": "12345678" }
Description

Update name and email

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "email": "test6@test.com", "name": "Test Update" }
Description

Allow a user to update password

Body
{ "currentPassword": "12345678", "newPassword": "87654321" }

Bootcamps 7

Bootcamps CRUD functionality

Description

Fetch all bootcamps from database, includes pagination, filtering, etc.

Description

Add new bootcamp to database, must be authenticated and must be Publisher or Admin role

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Test Bootcamp 3", "description": "Test Bootcamp 2 for test purproses", "website": "https://devcentral.com", "phone": "(444) 444-4444", "email": "enroll@devcentral.com", "address": "45 Upper College Rd Kingston RI 02881", "careers": [ "Mobile Development", "Web Development", "Data Science", "Business" ], "housing": false, "jobAssistance": true, "jobGuarantee": true, "acceptGi": true }
Description

Save changes to a bootcamp, must be authenticated as Publisher or Admin

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "careers": [ "Web Development", "UI/UX" ] }
Description

Upload a photo for bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
KeyValueDescription
file
Description

Delete a bootcamp, must be authenticated as Publisher or Admin

Courses 6

CRUD for Courses

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "title": "Front End Web Development 3", "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": 4999, "minimumSkill": "beginner", "scholarhipsAvailable": true }
Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "tuition": 13000, "minimumSkill": "advanced" }
Headers
KeyValueDescription
Content-Typeapplication/json

Reviews 6

Reviews for bootcamps

Description

Get All Reviews

Headers
KeyValueDescription
Content-Typeapplication/json
Description

Get a single review

Headers
KeyValueDescription
Content-Typeapplication/json
Description

Create a review

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "title": "Mediocre bootcamp", "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque", "rating": "8" }
Description

Update a review (either user or admin)

Description

Delete review

Headers
KeyValueDescription
Content-Typeapplication/json

Users 5

CRUD functionality for Admin users

Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "name": "Test Publisher2", "email": "test6@test.com", "password": "testing", "role": "publisher" }
Headers
KeyValueDescription
Content-Typeapplication/json
Body
{ "name": "Test Publisher" }