Skip to content

UNC-Libraries/wilson-clue-app

Repository files navigation

Clue

A Laravel / MySQL game management application and player interface for the biannual, live-action Clue game at Wilson Library.

Requirements

Installation

  1. Get a fresh Clue MySQL production database dump from a UNC library sysadmin.
  2. Create an empty MySQL database locally.
$ mysql -u username -p
mysql> create database clue
  1. Import the MySQL dump.
$ mysql -u username clue < clue-sql-file.sql -p
  1. Clone the repo to your local machine ($CLUE_HOME).
$ git clone https://github.com/UNC-Libraries/wilson-clue-app.git
  1. Install Clue dependencies.
$ cd $CLUE_HOME
$ composer update #PHP dependencies
$ npm install
  1. Create a new application key.
$ php artisan key:generate
  1. Get the images from production to your local machine
$ rsync -rv production.server.com:/path/to/deploy/code/* $CLUE_HOME/storage/app/public
  1. Symlink the public storage directory into the public directory
$ ln -nfs $CLUE_HOME/storage/app/public $CLUE_HOME/public/storage

Configuration

  1. Copy $CLUE_HOME/.env.example to $CLUE_HOME/.env.
  2. Edit the DB_* and LDAP_* properties in $CLUE_HOME/.env.
  3. To enable emails, set MAIL_MAILER to smtp 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.

Asset Compilation

  1. Watch for changes to assets in development mode:

    $ cd $CLUE_HOME
    $ npm run watch
  2. Re-compile and minify assets before committing changes:

    $ cd $CLUE_HOME
    $ npm run production

Running

  1. Start the local PHP web server.

    $ cd $CLUE_HOME
    $ php artisan serve

    In your favorite web browser, go to http://localhost:8000/

Note Todos

  • 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