A basic API which serves as the backend for a bootcamp. Contains authentication as well as security middleware
- Bootcamp
- Course
- User
- Review
- One Bootcamp can have n number of Courses.
- One Course can only be associated with one Bootcamp.
- There are three types of users in the model:
- Publisher - has the right to create a bootcamp and multiple courses. They cannot add reviews for their courses in their own bootcamp. They can only modify courses and the bootcamp belonging to them.
- User - has the right to view all bootcamps and courses under it. User also has the right to add 1 review per course. User cannot modify course details in any way (add, update or delete).
- Admin - Has access to all information and can update everything and everything ranging from deleting an entire bootcamp to deleting a review. Admin access can only be granted through the database which in this case is MongoDB.
- Average Rating and Average Cost are updated as and when some change is made to the given bootcamp i.e, adding new course, deleting a course and updating details of the course w.r.t averageCost and averageRating
- Get all bootcamps :
/api/v1/bootcamps
- Get bootcamps by zipcode & distance :
/api/v1/bootcamps/<zipcode>/<radius>
- Get single bootcamp :
/api/v1/bootcamps/<bootcampId>
- Get all courses :
/api/v1/courses
- Get all courses of a particular bootcamp:
/api/v1/<bootcampId>/courses
- Get single course :
/api/v1/courses/<courseId>
- Get all users :
/api/v1/users
- Get single user :
/api/v1/users/<userId>
- Get all reviews :
/api/v1/reviews
- Get all reviews of a bootcamp :
/api/v1/reviews/<bootcampId>
- Get single review :
/api/v1/reviews/<courseId>
Updation still in process