A system for controlling advertisements on multiple screens by multiple authorized clients. This project is based on laravel framework.
- An administrator can set/update/remove clients' permissions for controlling advertisements on the available screens.
- An authorized client can add an advertisement to a selected list of screens that he is authorized to publish on. The advertisement is defined by an image, and duration for each screen to be displayed on.
- An authorized client can update/remove an advertisement that he published.
- For each action (Adding/Updating/Removing an advertisement) an event is sent to the screen to make the process runs in real-time.
- An API is available for screen devices to interact with, and only authenticated screens can have access to the API.
- Open terminal, and change directory to were you cloned the project
cd <PROJECT_NAME>
(example:cd advertisements_system
). - Install composer dependencies (You should have Composer installed).
composer install
. - Copy
.env
filecp .env.example .env
. - Generate an app encryption key
php artisan key:generate
. - Create an empty database using the database tools you prefer.
- Configure
.env
file to allow Laravel to connect to the database you created (DB_HOST
,DB_PORT
,DB_DATABASE
,DB_USERNAME
andDB_PASSWORD
. - Configure
.env
file to setBROADCAST_DRIVER
(for example: create an app using Pusher. thenBROADCAST_DRIVER=pusher
and setPUSHER_APP_ID
,PUSHER_APP_KEY
,PUSHER_APP_SECRET
andPUSHER_APP_CLUSTER
values in.env
file to the values provided by pusher app you created. - Migrate the database
php artisan migrate
. - Create the encryption keys needed to generate secure access tokens
php artisan passport:install
. - Seed the database with some accounts for testing
php artisan db:seed --class=InitSeed
. This will create the following accounts (All accounts have the same password123456789
):
- Administrator account (admin@system.com).
- Publisher (client) accounts:
- Devices (screens):
- Device 1
- Device 2
- Device 3
- Run the server
php artisan serve
.