The JS files are pre-compiled to avoid installing node_modules and compiling locally.
To compile the JS and CSS assets, run npm install
and npm run dev
.
You can check out a demo of this simple app here: https://personality-test.pacurar.dev/
The backend/admin interface is at https://personality-test.pacurar.dev/backend/.
You can log in using email [email protected]
and password password
- The application requires at least PHP 8.1 to run locally. 8.0 should work but not supported.
- Laravel 8
- Inertia JS
- React
- Tailwind CSS
- Pest PHP for unit testing
cp .env.example .env
composer install
php artisan key:generate
touch database/database.sqlite
php artisan migrate --seed
- Run
php artisan make:filament-user
- Log in with the newly created user in
/backend
path
php artisan serve
- Visit http://localhost:8000
The application uses Pest PHP for Unit Testing.
Seeders are automatically run before each test that interacts with data. The database is refreshed before each test.
Tests are located in tests/Unit
.
To run the tests, type the following command into the terminal:
php artisan test
Example response:
PASS Tests\Unit\EndpointTest
✓ results are returned by the controller
✓ visiting the results page without post method returns a redirect to quiz
PASS Tests\Unit\OutcomeTest
✓ outcome can be introvert
✓ outcome can be extrovert
✓ ties are set to last response result
Tests: 5 passed
Time: 0.17s