The application is an API based laravel application; it integrates Infobip API for communication (sending and verifying phone numbers and sending SMS to verified numbers when invited to a game round). Users on the application register then verify phone numbers, create tournaments, and invite other users to the tournament.
To execute this, you need to have the followings done on your local machine
-
Install Composer
-
Clone this repository
-
Run
composer install
to pull the required dependencies. -
Proceed to create an environment variable file from the .env.example where you establish a database connection also add Infobip integration variables to the .env file.
i . API_KEY=6c****-0f444b16-1c97-4577ii. URL_BASE_PATH=https://***.api.infobip.com
iii. API_KEY_PREFIX=App
iv. FROM=SeriviceSMS
v. SIGNUP_PHONE_NUMBER=*********
-
Migrate all database tables with
php artisan migrate
command in the terminal.
All API endpoints are published Here and exported to the repository "Infobip.postman_collection.json".
A test class is provided to test features like sending verification pins to provided numbers, creating tournaments, and inviting users to the tournament (send SMS and mail notification). Use the php artisan test to run the test.
The application uses i.) Laravel 8 ii.) Jwt library for authentication iii) Infobip API for communication.
Laravel creates the application scaffold whilst the JSON web token library generates access token and authorization (middleware) purposes. Infobip API allows for phone number verification and sending SMS within the application.