Giter Site home page Giter Site logo

movies-catalog-management-api's Introduction

API-movies-catalog-management

API-movies-catalog-management is a basic back-end project for a typescript and prisma POC

About

This application assists in movie catalog management, allowing the monitoring of movies registration and allowing users the option of adding movies to their lists.

How to run for development

  1. Clone this repository
  2. Install all dependencies
npm i
  1. Create a new PostgreSQL database
  2. Configure the .env file using the .env.example
  3. Run all migrations
npm run dev:migration
  1. Run seed db
npm run dev:seed
  1. Run the back-end in a development environment:
npm run dev

Building and starting for production

npm run build
npm start

Usage

Genres routes:

Post: /genres
BODY: {"name": "genre_name"}
This route creates a new genre.

GET: /genres
This route sends all genres recorded.

GET: /genres/amount
This route sends the amount of appearance of each genre.

DELETE: /genres/:id
This route deletes the genre with the given id.
Movies routes:

POST: /movies
BODY: {
    title: "movie_title",
    poster_picture:"movie_poster_picture"
    description:"movie_description"
    genre_ids:[genre_ids]
}
This route creates a new movie.

GET: /movies
This route sends all movies recorded.

GET: /movies/:id
This route sends the movie with the given id.

GET: /movies/genres/:id
This route sends the movies accordingly with the given genre id.

PATCH: /movies/:id
BODY: { description:"movie_description"}
This route updates the movie description with the given id.

DELETE: /movies/:id
This route deletes the movie with the given id.
Auth routes:

POST: /sign-up
BODY: {
    name : "user_name",
    email:"user_email"
    password:"user_password"
    confirmPassword:"user_password"
}
This route creates a account for the user.

POST: /sign-in
BODY: {
    email:"user_email"
    password:"user_password"
}
This route logs in the user.
Users routes:

POST: /users/movies-list/:movieId
BODY: {}
This route adds the movie with the given id to the user movies list.

GET: /users/movies-list/
This route sends all movies recorded in the user movies list.

PATCH: /users/movies-list/:movieId
BODY: {}
This route updates the watched status to true of the movie with the given id.

DELETE: /users/movies-list/:movieId
This route deletes the movie with the given id from the user movies list.

License

MIT

movies-catalog-management-api's People

Contributors

jvitorfeliciano avatar

Watchers

 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.