https://github.com/klejvi-ajdini/stock-api-iterator
Laravel application implementing the Iterator pattern to efficiently manage and process stock data fetched from local JSON files, demonstrating API interaction and data rendering.
https://github.com/klejvi-ajdini/stock-api-iterator
inertia iterator-pattern laravel php vue
Last synced: 3 months ago
JSON representation
Laravel application implementing the Iterator pattern to efficiently manage and process stock data fetched from local JSON files, demonstrating API interaction and data rendering.
- Host: GitHub
- URL: https://github.com/klejvi-ajdini/stock-api-iterator
- Owner: klejvi-ajdini
- License: mit
- Created: 2025-01-16T16:43:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-16T16:45:30.000Z (over 1 year ago)
- Last Synced: 2026-01-02T23:15:12.009Z (6 months ago)
- Topics: inertia, iterator-pattern, laravel, php, vue
- Language: Vue
- Homepage:
- Size: 116 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stock API Iterator
## Description
This Laravel application demonstrates how to use the Iterator pattern to fetch and process paginated stock market data from a simulated API (JSON files in this case). It's designed to handle scenarios where data is retrieved in chunks, and provides an efficient way to iterate over potentially large datasets.
## Setup
1. Clone the repository:
```bash
git clone
cd stock-api-iterator
```
2. Install composer dependencies
```bash
composer install
```
3. Copy `.env.example` to `.env` and add your APP_URL:
```
cp .env.example .env
```
Set the `APP_URL` to `http://localhost` in your `.env` file.
4. Install Sail:
```bash
composer require laravel/sail --dev
php artisan sail:install
```
* Select **0** `pgsql`
* Select **ENTER** to finish installation
5. Start Sail:
```bash
./vendor/bin/sail up -d
```
6. Generate an app key:
```bash
./vendor/bin/sail artisan key:generate
```
7. Run Migrations
```bash
./vendor/bin/sail artisan migrate
```
8. Install Node Packages
```bash
npm install
```
9. Run the development server for the front-end:
```bash
npm run dev
```
10. Access your Application via http://localhost
## Usage
### Access Stock Data
Visit `/stocks/{symbol}` to see stock data for the specified ticker symbol. Example: `/stocks/IBM`.
### Access Quote Data
Visit `/quote/{symbol}` to see quote data for the specified ticker symbol. Example: `/quote/IBM`.