intervle
# Intervle
*Intervle* is my own attempt at creating a basic web-based "daily" puzzle/quiz-type game. The game itself involves re-arranging a list of events into chronological order.
This repository contains the base engine with which the game may be run. Actual data is not provided in this repository, though there is a CSV import tool available. There is no demo currently available.
## Setting up the Development Environment
Intervle was developed with Laravel Sail. As such you will require;
* Docker
* Docker Compose
* composer
to use this project.
### 1. Clone the repository
```shell
git clone https://github.com/LukePJ25/intervle.git
cd intervle
```
### 2. Create a copy of `.env`
```shell
cp .env.example .env
```
Adjust any settings within this file, such as port numbers or db names.
### 3. Start Sail Environment and generate App key
Run `composer install` in the project root to install project dependencies. You should then be able to start up the sail environment by using;
```shell
./vendor/bin/sail up -d
```
Then, generate an application key with `./vendor/bin/sail artisan key:generate`.
### 4. Run Migrations
You can now run migrations to intialise the `events` table;
```shell
./vendor/bin/sail artisan migrate:fresh
```
The project also includes some extremely basic Event seeders for testing purposes, which you can run by using;
```shell
./vendor/bin/sail artisan db:seed
```
or
```shell
./vendor/bin/sail artisan migrate:fresh --seed
```
Finally, install node packages and start up the Vite environment for a demo by running
```shell
./vendor/bin/sail npm install
./vendor/bin/sail npm run dev
```
At this point, you should be able to visit http://localhost/easy/today to demo the game. You may wish to use example data for a slightly more enjoyable demonstration, which can be read about below.
## Event Data Import
I haven't included any datasets containing event information in this repository, though I have included a tool which allows you to import a simple CSV file containing event data.
You can run the tool by using the following command;
```shell
./vendor/bin/sail artisan events:import <yourEventsFile>.csv
```
The CSV file must contain just two columns, one named `date` and another named `description`, and date values must be in the format `YYYY-MM-DD`. An example has been included at the root of the project, `events.csv.example`.