Skip to content

michalzaq12/movie-ticket-booking-system

Repository files navigation

movie-tickets

An application for booking tickets at the cinema. Implemented in the microservices architecture, using Docker and docker-compose.

Architecture

How to run

Before you start

  • Install Docker and Docker Compose
  • Set up the connection to database in movie-service/src/config/db.js
  • Set AMQP_URL variable in .env file (you can use a free 'Little Lemur' plan from CloudAMQP)
#start services
docker-compose up -d

#fill db with sample data 
docker exec -it <MOVIE_SERVICE_CONTAINER_NAME> node src/init

After starting services web app is available on http://localhost:80

Features

  • Browsing available movies at cinema

    Details of movies are fetched from external api's OMDb TMDb

  • Buying tickets

    Orders are stored in local database

  • Temporary reservations

    Reservations are implemented by using Socket.io (each movie has own room -> each client subscribe only room/movie event which is actually browsed) and stored in-memory on api-gateway. To improve api scalability on production, reservations should be stored in distributed DB like Redis

  • Sending email with purchased ticket

    Using fake SMTP service Ethereal

Development

Commands

#rebuild containers
docker-compose build

#list all containers
docker-compose ps -all

Useful links

About

An application for booking tickets at the cinema. Implemented in the microservices architecture, using Docker and docker-compose

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published