Skip to content

🐍 Web application made in PHP with Laravel where you can interact via API with my Snake game which is made in Python

Notifications You must be signed in to change notification settings

maciekiwaniuk/snake-web-app

Repository files navigation

Snake web application

Project of the web application where you can interact via API with Snake game.

  • Application is made in PHP with Laravel in 8.x version.
  • Project uses a login system from the Breeze starter kit which has been modified.
  • Application is responsive, made with the Bootstrap 5.
  • To display tables is used the DataTables plugin.
  • jQuery is used to write JavaScript things.
  • Logged user can set an avatar, change an email, change a password etc. in a user panel.
  • Users can compare each other in a ranking page what means players can compete what gives a lot of fun!
  • Admin is able to use well expanded admin panel which provides a lot of functionalities.
  • Snake mini-game which is available to play on welcome page is made in clear JavaScript.
  • In application has been implemented PWA system, what means app can run in an offline mode (without an internet connection - caches things while first visit).

Commands using Make

Initialize for first time run

make initialize

Run containers

make run

Seed database

make db_seed

Run all tests

make test

Commands without Make

Initialize for first time run

docker-compose up -d
docker-compose exec php composer install
npm install
npm run dev
docker-compose exec php cp .env.example .env
docker-compose exec php php artisan key:generate
docker-compose exec php php artisan storage:link
docker-compose exec php php artisan migrate

For other commands check content of Makefile

Captcha validation

To enable captcha validation you need to set public and private keys in .env file and set CAPTCHA_VALIDATION_ENABLED to true

CAPTCHA_VALIDATION_ENABLED=true

E-mail service

To enable e-mail service and send e-mails properly you need to fill all necessary variables related with prefix MAIL_ in .env and after that set MAIL_SERVICE_ENABLED to true

MAIL_SERVICE_ENABLED=true

You have to also run queue:work command to set up queue system

php artisan queue:work

PWA cache service

In case of any problems with PWA caching, you can easily disable PWA caching system via set PWA_SERVICE_WORKER_ENABLED to false in .env file

PWA_SERVICE_WORKER_ENABLED=false

Application usage

Every account generated by db:seed command has same password except one with administrative permissions

password: test1234 

To log into account with administrative permissions use

email: admin1234@wp.pl

password: admin1234

To log into account with normal permissions use

email: test1234@wp.pl

password: test1234

Application appearance