# About the test
> In this document I will describe what tools I've used and why.
> I will also describe steps to run the application frontend and backend.
## Tools
### Frontend: Gatsby
Gatsby is a React.js framework for Static Web Sites generation. I used gatsby for the following reasons:
- [x] It is light-weight and very minimalistic
- [x] It allows to generate a static web site from react application.
- [x] It's great for SEO
### Backend: Laravel Lumen
I used Lumen for the following reasons:
- [x] It is light-weight and very minimalistic
- [x] It has an awesome way to manage the database via migrations, seeders and eloquent models.
## Run locally
### Database: MySQL
Create the database and user
DB_DATABASE=photographer
DB_USERNAME=photographer
DB_PASSWORD=photographer
### Backend: Laravel Lumen
```
cd backend
cp .env.example .env
composer install
php artisan migrate:fresh --seed
php -S localhost:8000 -t public
```
The app will start on http://localhost:8000/
The `--seed` option will automatically import the test data into the database.
To run test on backend run `./vendor/phpunit/phpunit/phpunit` from the backend folder in the terminal.
> Note: running tests will clear the database. you have to re-run the command `php artisan migrate:fresh --seed` after your tests.
### Frontend: Gatsby
```
cd frontend
yarn install
yarn develop
```
The app will start on http://localhost:3000/
To run test on frontend run `yarn test` from the frontend folder in the terminal.