A Laravel / MySQL game management application and player interface for the biannual, live-action Clue game at Wilson Library.
- MySQL
- PHP 7.3
- Composer
- npm
- Capistrano (for deployment)
- Ruby (for Capistrano)
- Get a fresh Clue MySQL production database dump from a UNC library sysadmin.
- Create an empty MySQL database locally.
$ mysql -u username -p
mysql> create database clue
- Import the MySQL dump.
$ mysql -u username clue < clue-sql-file.sql -p
- Clone the repo to your local machine ($CLUE_HOME).
$ git clone https://github.com/UNC-Libraries/wilson-clue-app.git
- Install Clue dependencies.
$ cd $CLUE_HOME
$ composer update #PHP dependencies
$ npm install
- Create a new application key.
$ php artisan key:generate
- Get the images from production to your local machine
$ rsync -rv production.server.com:/path/to/deploy/code/* $CLUE_HOME/storage/app/public
- Symlink the public storage directory into the public directory
$ ln -nfs $CLUE_HOME/storage/app/public $CLUE_HOME/public/storage
- Copy
$CLUE_HOME/.env.example
to$CLUE_HOME/.env
. - Edit the DB_* and LDAP_* properties in
$CLUE_HOME/.env
. - To enable emails, set
MAIL_MAILER
tosmtp
in$CLUE_HOME/.env
.
The DB_* properties will be determined by you, the developer, based on your database configuration.
The LDAP_* properties you should get from a UNC sysadmin or from the production .env
file.
-
Watch for changes to assets in development mode:
$ cd $CLUE_HOME $ npm run watch
-
Re-compile and minify assets before committing changes:
$ cd $CLUE_HOME $ npm run production
-
Start the local PHP web server.
$ cd $CLUE_HOME $ php artisan serve
In your favorite web browser, go to http://localhost:8000/
- The breadcrumbs rely on an abandoned package, davejamesmiller/laravel-breadcrumbs. Updating breadcrumbs to use, diglactic/laravel-breadcrumbs, also requires an update to at least bootstrap 4.
- Laraval-mix has been removed as the default assets manager in favor of vite.
For additional information about the application's structure and use, see the Wiki