guilherme-m-correa / ioasys-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IOASYS BACKEND CHALLENGE - GUILHERME CORRÊA


Functional Requirements

  • Admin

  • Should be able to create a admin user

  • Should be able to edit a admin user

  • Should be able to delete (logical) a admin user

  • User

  • Should be able to create a user

  • Should be able to edit a user

  • Should be able to delete (logical) a user

  • Authentication

  • Should be able to authenticate a user using JWT

  • Movies

  • Should be able to create a movie (only a admin user can create)

  • Should be able to list movies

  • Should be able to filter movies by director, name, genre or actor

  • Should be able to show movie details and the movie average rating from all users

  • Rating

  • A user should be able to rate a movie by a score between 0 and 4

Non-functional Requirements

  • Express.js
  • PostgresSQL
  • TypeORM

Dependencies

Running

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run cp .env.example .env to copy .env example and setup enviroment variables for the project
  4. Run cp ormconfig.example .ormconfig.jon to copy TypeORM config file and setup the database variables
  5. Run npm run migration:run to create the database
  6. Run npm run seed to seed the database with some data
  7. Run npm run start:dev to start the server

Testing

Run npm run test to run the tests.

Documentation

Postman Collection

Any doubts? Feel free to contact me.

About


Languages

Language:TypeScript 98.4%Language:JavaScript 1.6%Language:Shell 0.0%