Giter Site home page Giter Site logo

ptim4x / moviegame Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 675 KB

Movie Game - Symfony 5.4 / React 18.2

License: MIT License

Shell 3.42% PHP 71.00% Dockerfile 3.76% JavaScript 20.27% SCSS 0.04% Twig 0.84% Makefile 0.69%
docker javascript php symfony es6 php81 react skills-assessment symfony54 ddd redis

moviegame's Introduction

MovieGame Project

A cinematographic culture test game.

Purpose

Assess knowledge and practical application of JavaScript ES6 and PHP 8.1 programming languages and architectures with moderns frameworks such as Symfony 5.4 LTS and React 18.2.

Requirement

The compose V2 command is a docker sub command.
Basically, you can run Compose V2 using docker compose, instead of docker-compose.

Get started

  1. Run git clone [email protected]:ptim4x/MovieGame.git to download this project.
  2. Run cd MovieGame to change current directory.

Next steps with make

  1. Run make install.prod to build fresh Docker images and build front prod assets.
  2. Run make run to start the Docker containers.
  3. Run make game.data setsize=100 to fetch TMDB API and generate 100 game question set.
  4. Open https://localhost:4443 in your favorite web browser, accept the auto-generated TLS certificate and enjoy playing.
  5. Run make clean to stop and remove the Docker containers.

Next steps without make

  1. Run docker compose build --no-cache to build fresh images.
  2. Run docker compose -f docker-compose.builder.yml run --rm install to install node packages.
  3. Run docker compose -f docker-compose.builder.yml run --rm build to build front assets.
  4. Run HTTP_PORT=8000 HTTPS_PORT=4443 docker compose up -d to start the Docker containers.
  5. Run docker compose exec php php bin/console app:data:load 100 --themoviedb to fetch TMDB API and generate 100 game question set.
  6. Open https://localhost:4443 in your favorite web browser, accept the auto-generated TLS certificate and enjoy playing.
  7. Run docker compose down --remove-orphans to stop and remove the Docker containers.

Game play

Rules

Within a given time (60 seconds), the game has several rounds with an actor and a movie poster for each.
The player must say if the actor played in the film presented or not.
The game ends at the end of the allotted time or at the first error, and gives the score to the user.
He has the possibility of replaying to try to beat his best score.

Keyboard shortcut

  • Play button : Space or Enter
  • Answer buttons : Left arrow = Yes / Right arrow = No

Utils

  • PostgreSql Database : available on port 54321 in dev environement
  • Run docker-compose exec database psql -U meatloaf -d game -c "TRUNCATE TABLE question; TRUNCATE TABLE answer CASCADE; TRUNCATE TABLE answer CASCADE; TRUNCATE TABLE movie CASCADE;" to truncate all tables.

ChangeLog

  • v0.1 : First working version.

  • v0.2 : Improve react-ivity beetween rounds by preloading images.

  • v0.3 (in progress) : Add Redis storage implementation in replacement of doctrine, 3 ways redis support will be implemented :

      1. Predis client service=done
      2. Symfony cache contracts=in progress
      3. PSR6=in progress
    

Credits

Made with love and sleepless nights by Maxime Brignon

moviegame's People

Contributors

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