This Quiz Application is built using Laravel with Inertia.js and React. It enables the administration of quizzes and allows users to take exams. The application differentiates between two types of entities: admins and users.
- Laravel: 11
- PHP: 8.3.6
- MySQL: 8.0.30
- Dashboard: Upon login, the admin is presented with the top 10 highest-scoring users across all exams.
- Management Tools: Admins can manage questionnaires, answers, and user accounts.
- Dashboard: Users are shown their overall standings upon login.
- Exam Access: Users have access to their previously answered questionnaires but can take any exam only once.
Follow these steps to get the application running on your local machine:
-
Clone the repository:
git clone <repository-url>
-
Install PHP dependencies:
composer install
-
Install NPM packages:
npm install
-
Generate application key:
php artisan key:generate
-
Set up database credentials in your
.env
file. -
Run migrations and seed the database:
php artisan migrate --seed
-
Start the Laravel server:
php artisan serve
-
Compile React components and watch for changes:
npm run dev
-
Admin Access:
- http://localhost/admin/login
- Email: admin@test.com
- Password: password
-
User Access:
- http://localhost/login
- Email: Check the users table in your database for user credentials.
- Password: password
-
NOTE: Please migrate and seed laravel11_react_starter_testing database first.
-
Test all
php artisan test
-
File Test
php artisan test tests\Feature\Admin\QuestionnaireTest.php
-
Specific Test
php artisan test tests\Feature\Admin\QuestionnaireTest.php --filter="admin can update questions priority"
- Development Timeline: Completed within two weeks, showcasing the efficiency and capabilities of the Laravel + Inertia + React stack.
This README file provides all the necessary instructions and information to get started with the Laravel Inertia React JS Quiz App. For more information or if you encounter issues, please refer to the official documentation of Laravel, Inertia, and React, or submit an issue in this repository.