This is a repository for a data entry application to track a sport team's stats, built with Laravel and Vue.
- Import and export of crucial club data, including teams, players and rounds.
- Fully featured Admin Dashboard
Users (coaches) can register and joinTeamss and manage saidTeam'sRound(match) data.- Each
Userhas a role- eithercoachoradmin. - An
adminUserhas complete control over coaches,Teams,Players andRounds and is also considered a coach. - An
adminUsercan import mass data and export crucial club data. - A coach may leave a
Team, but may not delete it. - An
adminUsermay not delete aTeamwhile it contains players. - A
Playermay not be deleted if it has played in aRound(match). - For more insight into the models and their relations, read the comments in
App\Player,App\Round,App\TeamandApp\User. - The coach FAQ will provide insight into some of the naming conventions used throughout the app (i.e. rounds, temporary players):
views/faq.blade.php
If you would like to install this project, treat it as you would any other Laravel application:
- Clone the repo.
- Install dependencies:
composer install(also,npm install, if you need). - Configure environment variables-
.env(see below). - Generate application key:
php artisan key:generate. - Run Laravel migrations:
php artisan migrate.
Make sure you configure these environment variables:
APP_URL: the url of the application. This variable is used for linking to the application in emails.APP_NAME: the human readable name of the application. This variable is used for refering to the application via emails and the welcome page. It is also used in the navbar as the application branding.S3_KEY,S3_SECRET,S3_REGION,S3_BUCKET_NAMEandS3_FILES_BUCKET_URL: the conncetion to Amazon S3 variables. These values are used for the ecosystem button file uploading facility built in to the application.MAIL_FROM_ADDRESSandMAIL_FROM_NAME: the 'from' email address and name. This is used for sending out emails.ADMIN_SUPPORT_EMAIL_ADDRESS: the email address of admin, whom you wish users to contact for administrative purposes (support).COPY_NAME: the copyright name in the footer.COPY_URL: the copyright link in the footer.
Further steps:
- Set the
QUEUE_DRIVERenvironment variable todatabase. - Set the
APP_ENVenvironment variable toproductionwhen the app is on a live sever, to force HTTPS connections on all routes. - Run
php artisan queue:workto allow jobs, queued mail and event broadcasting to function.
There are a few commands for use with this application:
- When the 'to-be' Administrator registers for an account, it is necessary to execute the
alter:rolecommand via command line, after they have registered, passing in the id of theUserand the role (i.e.admin). Eg.php artisan alter:role 1 admin. - To remind coaches that they have not fullfilled their duties (haven't filled in round data by the end of the day specified by either the
default_dateinroundsordateinround_team), you can setup a Cron job to run daily (at an appropriate time, by which a round will have been completed by i.e. 5pm), executing this commandphp artisan send:roundReminder. - The local storage of excel spreadsheets will have to be cleaned every now and then. To do so, execute the following command
php artisan clear:imports. - The local storage of compiled blade views can be cleaned, if you wish. To do so, execute the following command
php artisan clear:compViews.
Please do not use the associated legal views, if they still exist in this repository (terms.blade.php and privacy.blade.php). Use at your own peril.
Also, do not use the images included in public/img.