DevCamperAPI

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

Bootcamps 9

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Devworks Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "ModernTech Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Query
KeyValueDescription
selectname,description,housing
sort-name

Courses 6

Courses CRUD functionality

Headers
KeyValueDescription
Content-Typeapplication/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
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Authentication 9

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

Description

Add user to database with encrypted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "John Doe", "email": "john@gmail.com", "password": "123456", "role": "publisher" }
Description

Add user to database with encrypted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "john@gmail.com", "password": "123456" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": {"$gt": ""}, "password": "123456" }
Description

Log out current user and clear cookie

Description

Get login user via token, if cookies available there is no need to jwt token, we can use No Auth.

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "john@gmail.com" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

JSON Type

Body
{ "email": "john@gmail.com", "name": "John Due" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Users (Admin) 5

CRUD functionality for users only available to admin

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Nanya Zazsche", "email": "nanya@gmail.com", "password": "123456" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Clem Zazsche", "email": "clem@gmail.com", "password": "123456" }

Reviews 6

Manage course reviews

Description

Fetch all reviews from database

Description

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

Description

Create a new review for a spesific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Nice bootcamp", "text": "I learned a lot of good stuff", "rating": 8 }
Description

Update review from database for only own user or admin

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Amazimng bootcamp", "text": "I learned a lot of ", "rating": "5" }