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

Overview

Snake web application

Project of the web application where you can interact via API with Snake game which is available to download on it.

  • 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 a offline mode (without an internet connection - caches things while first visit).

Installation

To successfully install and test application you need to have installed composer, npm, PHP with version >= 7.3 and database environment (for example XAMPP - localhost).

Open folder where you want to have project files, open console and then clone the repository

git clone https://github.com/maciekiwaniuk/snake-web-app

Change folder in console to created folder with project files

cd snake-web-app

Install all the dependencies using composer

composer install

Run npm install command

npm install

Run npm run dev command to compile js files

npm run dev

Copy the example env file and make the required configuration changes in the .env file

copy .env.example .env

Generate a new application key

php artisan key:generate

Create the symbolic link between storage and public folders

php artisan storage:link

Run the database migrations (Set the database connection in .env before migrating)

php artisan migrate

Start the local development server

php artisan serve

You can now access the server at http://localhost:8000 or http://127.0.0.1:8000

To fill database with data use db:seed command which will create users accounts with randomly generated game data etc.

php artisan db:seed

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

Redis service

Redis is necessary for example to count total visits on the application. To enable redis service you need to fill all crucial variables related with prefix REDIS_ in .env and after that set REDIS_CONFIGURED to true

REDIS_CONFIGURED=true

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

Testing

To test if application is running properly, you can use implemented tests

php artisan test

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: [email protected]

password: admin1234

To log into account with normal permissions use

email: [email protected]

password: test1234

Application appearance

You might also like...
Load head metadata from a manifest file which can be shared with a SPA project

Laravel Head Manifest Installation Step 1: Add Laravel Head Manifest to your laravel project composer require critiq/laravel-head-manifest Step 2: Add

🚀 API for ticketing system application made in laravel 🚀
🚀 API for ticketing system application made in laravel 🚀

Ticket System Api Description: It is a basic system in which an employee logs in, can create, update and delete tickets, can create an employee, and t

API Blueprint Renderer for Laravel, customizable via Blade templates
API Blueprint Renderer for Laravel, customizable via Blade templates

API Blueprint Renderer for Laravel This Laravel package Blueprint Docs renders your API Blueprint. It comes with a standard theme that you can customi

Foreman is a Laravel scaffolding application that automates common tasks you typically perform with each new Laravel app you create
Foreman is a Laravel scaffolding application that automates common tasks you typically perform with each new Laravel app you create

Foreman is a Laravel scaffolding application that automates common tasks you typically perform with each new Laravel app you create. The directives you want Forman to perform are outlined in a JSON based template file.

An easy way to get vendor and package data from Packagist via API calls
An easy way to get vendor and package data from Packagist via API calls

Laravel Packagist Laravel Packagist (LaravelPackagist) is a package for Laravel 5 to interact with the packagist api quickly and easily. Table of cont

Aliyun oss filesystem storage adapter for laravel 5. You can use Aliyun OSS just like laravel Storage as usual

Aliyun oss filesystem storage adapter for laravel 5. You can use Aliyun OSS just like laravel Storage as usual

A Laravel 8 Project Implement with GraphQL With Sanctum APIs Authentications Which utilized in Any Frontend or Any Mobile Application Programs.

A Laravel 8 Project Implement with GraphQL With Sanctum APIs Authentications Which utilized in Any Frontend or Any Mobile Application Programs.

If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin
If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

hirwa-products-plugin If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

Electrik is a full-featured, open-source, starter-kit to help you build you your SaaS application.
Electrik is a full-featured, open-source, starter-kit to help you build you your SaaS application.

Electrik Electrik is a full-featured and open-source stater-kit for for your next SaaS application. It's built on top of Laravel, Livewire, neerajsoha

Owner
Maciek Iwaniuk
Programming enthusiast
Maciek Iwaniuk
Laravel API wrapper to interact fluently with your Janus Media Server

Laravel API wrapper to interact fluently with your Janus Media Server. Core server interactions, as well as the video room plugin included.

Richard  Tippin 11 Aug 21, 2022
Migrator is a GUI migration manager for Laravel which you can create, manage and delete your migration.

Migrator Migrator is a GUI migration manager for Laravel which you can create, manage and delete your migration. Installation: To install Migrator you

Reza Amini 457 Jan 8, 2023
an opensourced roblox group finder writen in python 100% free and virus-free

Roblox-Group-Finder an opensourced roblox group finder writen in python 100% free and virus-free note : if you don't want install python or just use w

mollomm1 1 Nov 11, 2021
A site which you can apply jobs or search for employees with cool functionalities..

About App An App which you can apply jobs or search for employees with cool functionalities. Some Pics of App Click Image to Zoom in Sign In & Up Empl

Fatih Canbolat 1 Jan 7, 2022
Easily interact and control your feature flags from Filament

Easily interact and control your feature flags from Filament

Ryan Chandler 32 Nov 29, 2022
Interact with posts, terms & users in a OOP way

Installation composer require tombroucke/wp-models Interacting with models Create a new class for your custom post type namespace Otomaties\Events\Mod

null 2 Jul 14, 2022
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.

Chat Create a Chat application for your multiple Models Table of Contents Click to expand Introduction Installation Usage Adding the ability to partic

Tinashe Musonza 931 Dec 24, 2022
Blacksmith is a code generation tool which automates the creation of common files that you'd typically create for each entity in your application.

Blacksmith is a code generation tool which automates the creation of common files that you'd typically create for each entity in your application.

Indatus 197 Dec 30, 2022
Collection of classes you can use to standardize data formats in your Laravel application.

Laravel Formatters This package is a collection of classes you can use to standardize data formats in your Laravel application. It uses the Service Co

Michael Rubel 88 Dec 23, 2022
LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

Tyler Arbon 437 Nov 17, 2022