Giter VIP home page Giter VIP logo

creaflix's Introduction

Creaflix

Creaflix is an API for an online movie watching platform submitted as a case study for Crea.

Prerequisites

Ensure you have the following installed on your machine:

  • Node.js: v20.13.1
  • Yarn: v1.22.22

Installation

$ yarn install

Running the app

Before running the app locally, make sure you have a .env file in the root of the project. You can refer to .env.example for the example format.

You should also have a PostgreSQL server running and available to be connected with provided credentials in the environment.

# development
$ yarn run start

# watch mode
$ yarn run start:dev

Unit Tests

$ yarn run test

E2E Tests

E2E tests require a PostgreSQL instance up and running. You can use following command to start one (requires Docker):

$ docker-compose up -d

Then you can run e2e tests with following command

$ yarn run test:e2e

After running the tests, you can stop the DB container with following command:

$ docker-compose down

I'm sure there's a better way of doing this but due to time constraints, this is the best I could do :) Currently, only user module is e2e tested.

Modules

  • User Module: For login and registration.
  • Movie Module: For CRUD operations on movies.
  • Ticket Module: For booking tickets.
  • Watch Module: For watching movies and viewing watch history.

License

This project is MIT licensed.

Developer Notes

Currently, MANAGER role is implemented as a superset of CUSTOMER role so managers are able to book tickets, watch movies etc. This could be refactored to only let customers perform these operations.

Time slots are hardcoded to take values between 0 and 6. 0 stands for 10.00-12.00, 1 stands for 12.00-14.00 and so on.

creaflix's People

Contributors

erenerisken 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.