Skip to content

GuilhermeLessa/insurance-company

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

# Running backend containers

       On /api directory, run these commands on CLI:

              docker compose build
              docker compose up
              docker exec insurance-php composer install
              docker exec insurance-php php artisan migrate
              docker exec insurance-php php artisan db:seed



# Running frontend container

       On /web directory, run these commands on CLI:

              docker compose build
              docker compose up



# Ready to go

       That's all you need to access the application on browser: http://localhost:5173.
       User to login and test (or create a new user account):

              email:        [email protected]
              password:     12345678



# Reeinstall if its necessary

       If something gets wrong you must clean all to try reinstall:

              docker compose down
              docker volume rm api_insurance-volume



# Running automated tests

       Take a look on test coverage results in /test-coverage-result/index.html.

       To run all tests again, after build up the backend containers, run this command on CLI:

              docker exec insurance-php php artisan test
              
              or 
              
              docker exec insurance-php php artisan test --coverage-html=test-coverage-result
       
       Know that tests will erase all database, to recover state just run seeds again:

              docker exec insurance-php php artisan db:seed



# Resources

       You can see some screenshots on /resources folder if you don't want run all of it just to check the application working on. 

       If you are curious about the requirements of the job test, theres a code challenge description on /resources folder.

       Theres a complete postman collection on /resources folder that you can import to try backend api.

































































--------------------------------------------------------

# Useful instructions

       Steps to install laravel sanctum:

              docker exec insurance-php composer create-project laravel/laravel .

              docker exec insurance-php php artisan install:api

              docker exec insurance-php composer update

              docker exec insurance-php php artisan migrate

              docker exec insurance-php php artisan db:seed