Botcamps Api



This project is a extensive backend API built with Node, Express and MongoDB. The application was made to manage bootcamps, courses, reviews, users and authentication. Project follows the modern practices and conventions in web development, its very modular and scalable, it can be used for different purposes and large applications. For object data modeling (ODM) I have used Mongoose library that provides a rigorous modeling environment for data, enforcing structure as needed while still maintaining the flexibility that makes MongoDB powerful.


List all bootcamps or reviews in the database with implemented pagination, search functionality by specific fields and categories, limit the number of results and filter by fields. Search bootcamps by radius from zip code using a geocoder to get exact location and coordinates from a single address field.

Create new bootcamp by authenticated users only who have the role "publisher" or "admin", only one bootcamp per publisher(admins can create more) and validation of the fields was done via Mongoose. Creating a review for bootcamp is possible only with the role "user" or "admin"(no publishers)

Upload a photo for bootcamp by owner of the bootcamp only, photo will be uploaded to local filesystem. Updating and deleting the bootcamps can be done only by owner. The backend api calculates the average cost of all courses for a bootcamp and calculating the average rating from the reviews for a bootcamp

Authentication is done using JWT that will be sent in a cookie(they expire in 30 days). Password reset functionality, user can request to reset password, a hashed token will be emailed to the users registered email address and will expire after 10 min. Its also possible to update the password and other information. The api has User CRUD that is reserved for admin only and can modify or delete any data.


Link to Git Hub repository


Link to deployed backend api server

Server: bootcamps api