Giter Club home page Giter Club logo

devcamper's Introduction

Dev Camper API

A basic API which serves as the backend for a bootcamp. Contains authentication as well as security middleware

The API contains the following schemas:

  • Bootcamp
  • Course
  • User
  • Review

These are some basic backend rules between Schemas

  • 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:
    1. 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.
    2. 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).
    3. 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

All API calls:

GET

  1. Get all bootcamps : /api/v1/bootcamps
  2. Get bootcamps by zipcode & distance : /api/v1/bootcamps/<zipcode>/<radius>
  3. Get single bootcamp : /api/v1/bootcamps/<bootcampId>
  4. Get all courses : /api/v1/courses
  5. Get all courses of a particular bootcamp: /api/v1/<bootcampId>/courses
  6. Get single course : /api/v1/courses/<courseId>
  7. Get all users : /api/v1/users
  8. Get single user : /api/v1/users/<userId>
  9. Get all reviews : /api/v1/reviews
  10. Get all reviews of a bootcamp : /api/v1/reviews/<bootcampId>
  11. Get single review : /api/v1/reviews/<courseId>

POST

Updation still in process

devcamper's People

Watchers

Megh Dedhia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.