TattyFromMelbourne / magic-box

Ministry of Magic Project

Home Page:https://tattyfrommelbourne.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

magic-box

Travis License: GPL v3

Demo

https://tattyfrommelbourne.com

Use the following credentials to log in:

Email: harry@pottermore.com

Password: magic

About

This was originally built as an MVP for a certain government department, here known as the "Ministry of Magic." This web application addresses some problems that the department had in terms of clients not receiving postal correspondence.

Built With

A number of FOSS (Free and Open Source) libraries have been used:-

Installation

1. To run your own version of this web application, install it on a LAMP or LEMP (Linux, nginx, MySQL and PHP) stack. See https://laravel.com/docs/5.6/installation for more detailed installation instructions on how to set up Laravel.

2. Once you have your Laravel environment set up, you will want to clone this repository and then run the composer install (the packages are detailed in composer.lock.)

git clone https://github.com/TattyFromMelbourne/magic-box.git
cd magic-box
composer install

After that you may want to do a composer update.

composer update

*** Note that if you are doing a production build you would want to do the following

composer install --no-dev

3. In the .env file maintain:-

  • database connection credentials
  • API credentials for Twilio
  • API credentials for Mailgun
  • path on the server machine to where the "deconstructed" correspondence will be placed

4. Finally, create the tables in the database by using the usual Laravel migration:-

php artisan migrate

Generate Data

In order to seed the database with some initial data, you will need to run the usual Laravel commands:-

composer dump-autoload
php artisan db:seed

This will:-

  • create a list of all Victorian postcodes and suburbs
  • create a list of correspondence templates
  • create a list of some sample services
    (at this point the services are fictional)
  • assign the services to existing users

Now if you do not have any users in the system yet, you may need to re-run the last step after you have entered or generated some users. The command to do that would be:-

php artisan db:seed --class=UserServicesTableSeeder

To generate new users, go to the following URL
https://<your instance>/database.
This will generate up to 10 users with user addresses (with random postcodes and related suburbs.)
You may change the amount of user to be generated in App/Http/Controllers/GenerateController.php.

The first user generated will be an administrator with the login credentials:-

  • E-mail : test@test.com.au
  • Password: TestPassword
- It is IMPORTANT to immediately change the admin user login details!

Notes on Notifications

To Receive Notification

To receive sample SMS and email notification go to the following URL
https://<your instance>/notification.
The notification will be sent to the logged-in user.

Email Notifications

Laravel has a built-in notifiable trait ( for an explanation of PHP traits see http://php.net/manual/en/language.oop5.traits.php) which was used for email notification. For further reference see https://laravel.com/docs/5.5/notifications.

Twilio API Integration

For Twilio API, we have installed Aloha/Twilio package through Composer. For further reference see https://github.com/aloha/laravel-twilio.

Team

Original Code for Australia Fellowship Team

  • Tatiana Lenz
  • Teresa Villanueva
  • Rachelle Salvadora

Maintainer of this Fork

  • Tatiana Lenz

About

Ministry of Magic Project

https://tattyfrommelbourne.com

License:GNU General Public License v3.0


Languages

Language:PHP 62.8%Language:HTML 26.6%Language:CSS 10.3%Language:Shell 0.2%Language:Vue 0.1%