- avoid memory hogging /timeout
- Ensure Correct Data is Retured
- Use the Most Optimized Query to Get the Required Data
- Use SOLID Principles and Other Design Patterns
- PHP 7.4
- PostgreSQL 12
- Redis 4-6
- Laravel 8
- Composer
- valet (optional)
- git clone https://goldcoders/watchcrunch.test
- cp .env.example .env
- composer install
- valet start / php artisan serve
- php artisan migrate:fresh --seed
- php artisan queue:work
- make sure your intance of PostgreSQL and Redis is Active
/top-users/{postCount?}
- Query Optimized Endpoint/chunk-top-users/{postCount?}/{chunkCount?}
- Further Optmized Thru Chunks and Cached/queue-top-users/{postCount?}/{chunkCount?}
- Added Queue Jobs on Top of All Optimization
- php artisan test
- the test ensures required keys in the array is returned
- simple test to check if database seeder is seed
- check if the first top post returns correctly the last post title, since laravel can sometimes cant detect it when seeded at the same timestamp. 1 check if top users that posted is the same number as the one seeded