This project is a test subject for Wefox interview.
This project achieves these goals:
- Full backend editorial platform (based on NOVA) with login for Admin to manipulate resources.
- Well documented (SWAGGER) APIs with authentications with CRUD functionality.
- Automated installation with bash commands in a Docker container.
- Well organazied code with Laravel Pint.
- Stable code with Larastan.
- php@8.1
- Postgres 14.5
- Clone the project with:
git clone https://github.com/pedramkat/wefox.git
- Go to the root directory of the wefox project
cd wefox
- Lunch the deploy command
bash docker/init-docker.sh
Add this configuration to your file .vscode/lunch.json if you are using xdebug:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9200,
"pathMappings": {
"/var/www/html/wefox": "${workspaceRoot}"
}
}
]
}
Now the platform is up and running see the Usage section below.
Backend login: http://0.0.0.0:8077
Admin login: Email: admin@wefox.com Password: admin
http://0.0.0.0:8077/api/documentation
Important: To check the API with swagger after receiving a login token from the /api/login section, insert it to the Authorize section. Green button on top right. (ex. Bearer 6|yiaRHtOKorrGkmREN1sFYcAc3OUKwypijISPT9w612e62d47
)
Lunch Docker bash
docker exec -it php81_wefox bash
Lunch Docker psql
Befor testing create wefox_test database:
Connect to database and create db:
docker exec -it postgres_wefox psql -U wefox
create database wefox_test;
Lunch the test
php artisan test --env=testing
Lunch the phpstan
./vendor/bin/phpstan analyse
Lunch the php cs fixer test
./vendor/bin/pint --test
The Laravel framework is open-sourced software licensed under the MIT license.