Git Product home page Git Product logo

movies-rental-api's Introduction

Movie Rental API

The homework for this week consists of the creation of a small movie rental API(it'll be continued on the next week)

  1. Follow best REST API practices
  2. Use the Design patterns you think can improve your code readability or will improve your code stability
  3. Try to avoid anti-patterns
  4. PostgreSQL will be the DB to use
  5. You should provide a DB dump to test your API, along with a Postman collection to allow us to test your API on our local
  6. When doing the Unit/Integration test, make sure to follow the best API Testing practices. 10 Decide, whether or not, to use the same DB for your unit tests, or use a mocking library.
  7. Extra points are optional, as always. Work on them if you finish earlier!

Base requirements

  • API should allow CRUD operations on movies (add, remove, update, create movies)
  • API should allow CRUD operations on users (add, remove, update, create users)
  • Each movie should have a list of tags related to them
  • Each movie should have a title, description, a poster, stock, a link to its trailer, sale price, likes and availability
  • API should have one admin by default
  • If a user is admin or not should be handled by its Role. A user must have one Role (admin or client)
  • A client can rent a movie, return it or buy it.
  • Users should be able to get a list of movies (sorted alphabetically)
  • Add unit/integration tests (coverage must be 65% min)

Security requirements

  • Any person (logged in or not) can view a list of available movies
  • Any person can see a movie's details
  • Only admins can add/modify/remove movies
  • Only logged in users can buy/rent a movie
  • Logging/logout should be done using JWT
  • Only admins should be able to add/remove tags

Extra points

  • Send an email when a user rent/buy a movie with important information!
  • Allow an admin to change a user's role (from client to admin and viceversa)

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.