This is a Laravel showcase project. The app aggregates real-time stock price data from the Alpha Vantage API and provides comprehensive reporting functionalities for analyzing stock trends.
!WARNING: Installation was tested only on macOS and based on the information from the official doc.
The application is using Laravel Sail for containerisation, so I assume you have Docker installed.
-
Clone the project
git clone git@github.com:iggyster/laravel-stock-price-aggregator.git
-
Install composer packages:
docker run --rm \ -u "$(id -u):$(id -g)" \ -v "$(pwd):/var/www/html" \ -w /var/www/html \ laravelsail/php83-composer:latest \ composer install --ignore-platform-reqs
-
Copy
.env.example
into.env
cp .env.example .env
-
Register an Alpha Vantage API Key and set in your
.env
file:ALPHA_VANTAGE_API_KEY=
-
Run sail (this step may take few minutes).
./vendor/bin/sail up -d
-
Run migrations.
./vendor/bin/sail artisan migrate
To test implementation follow this steps:
-
Add ImportStocks job to the queue
./vendor/bin/sail artisan schedule:test
-
Run the queue worker
./vendor/bin/sail artisan queue:work --once
-
Go to the latest endpoint to see latest stocks.