Devcamper Node API Project

Backend API practice using Devcamper Udemy course from Brad Tradversy

Authentication 7

Auth for registration and login

Description

Generates password token and send email reset password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

JSON Type

Body
{ "email": "doeit@gmail.com", "password": "johndoe" }
Description

Clears auth token when user logs out

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "doeit@gmail.com", "password": "johndoe" }
Description

Log user in validating email, password, and auth token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "test@gmail.com", "password": "12345678" }
Description

Adds a user with encrpted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "test user", "phone": "(444) 444-4444", "email": "test@gmail.com", "password": "12345678", "role": "publisher" }
Description

Update logged in user password, update curernt and new password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "currentPassword":"$2a$10$ukGi1GErhksn6jpveUYRHeQYG/1nuzpowAXFtgDiAxCCp1pBl.xmq", "newPassword": "12345678" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email":"mary@gmail.com", "name": "John Yo" }

Bootcamps 7

Bootcamps endpoint CRUD methods

Description

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "ModernTech Bootcamp", "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

Delete bootcamp from database

Description

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

Description

Update single bootcamp by ID in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "careers": [ "Mobile Development", "Web Development" ], "housing": true }
Description

Route to upload photo

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "careers": [ "Mobile Development", "Web Development" ], "housing": true }

Courses 6

Create, read, update and delete courses

Description

Create course based on BootcampId

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

Remove course from database by id

Body
{ "weeks": "8", "tuition": 13500, "minimumSkill": "advanced" }
Description

Get a course based its ID from a selection of bootcamps

Description

Update course by id

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "weeks": "8", "tuition": 13500, "minimumSkill": "advanced" }

Reviews 6

Description

User can add a single review to a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Web Development", "text": "This course will teach you how to build high quality web applications with technologies like React, Node.js, PHP & Laravel", "rating": 7 }
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

Update review in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Had fun" }

Users 5

CRUD funtionality only for admins

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Peter Parker", "email": "peterparker@gmail.com", "password": "12345678" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Peter Pan" }