Backend API for the Bootcamp application to manage bootcamps, courses, reviews, users and authentication
Routes for user authentication including register, login, reset pass ect
This route will generate password token and send an email
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "email": "john@gmail.com" }
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Log current user out and clear cookies
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "email": "mary@gmail.com", "password": "123456" }
Add user to DB with encrypted password
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "name": "Petros Trak", "email": "pit.tra@gmail.com", "password": "123456", "role": "publisher" }
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "password": "123456789" }
Update users password
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "currentPassword": "123456", "newPassword": "123456789" }
Update logged in user email and name
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Authorization | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVjOGExZDViMDE5MGIyMTQzNjBkYzAzMSIsImlhdCI6MTYwMTgxMDQwOSwiZXhwIjoxNjAyNjc0NDA5fQ.AJt3jdQGYYMmPQwRsvKq0zWtcV1N-Ty4_i3P5Murgwg |
{ "email": "maria@gmail.com", "name": "maria" }
Bootcamps CRUD functionality
Add new bootcamp to database. Must be authenticated and must be publisher or admin
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Authorization | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNzZkYzZmNzFmMTVlMjNkMmNjM2YxOCIsImlhdCI6MTYwMTYzNjIwOCwiZXhwIjoxNjAyNTAwMjA4fQ.cwFAWQN9e6jTWe7awfu5HCQbZS2_jZveqNhiHOl-0-o |
{ "user": "5c8a1d5b0190b214360dc032", "name": "Test Bootcamp", "description": "Is coding your passion? Codemasters will give you the skills and the tools to become the best developer possible. We specialize in front end and full stack web development", "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 }
Delete bootcamp from database
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Fetch all bootcamps from database. Includes pagination, filtering, etc
Get bootcamps within radius of a specific zipcode
Fetch single bootcamp by Id
Update single bootcamp in database
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "housing": false }
Rout to upload a bootcamp photo
Key | Value | Description |
---|---|---|
file |
CRUD courses
Create a course for a specific bootcamp
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "title": "Back 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 }
Delete course from DB
Get the specific courses for a bootcamp
Get all courses in DB
Key | Value | Description |
---|---|---|
page | 2 | |
limit | 2 |
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "title": "Full Stack Web Development", "description": "In this course you will learn full stack web development, first learning all about the frontend with HTML/CSS/JS/Vue and then the backend with Node.js/Express/MongoDB", "weeks": 12, "tuition": 10000, "minimumSkill": "intermediate", "scholarhipsAvailable": true }
Manage course reviews
Add review for an individual bootcamp providing bootcampId
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "title": "Nice Bootcamp", "text": "I learned a lot", "rating": 8 }
Get all reviews from DB and populate with bootcamp name and description
Fetch the reviews for a specific bootcamp providing the bootcampId
Fetch review by providing an Id
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "title": "Had fun" }
CRUD functionality for users only available to admins
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "name": "Petros Trakadas", "email": "pit.trak@gmail.com", "password": "123456", "role": "user" }
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "name": "Petros Trakadas", "email": "pit.trak@gmail.com", "password": "123456", "role": "user" }
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
{ "name": "Pit Trak", "email": "pit.trak@gmail.com", "password": "123456", "role": "user" }