/cybersec-quiz

A platform where users can take quizzes on various cybersecurity topics, see their scores, and track their progress over time. (Laravel Livewire)

Primary LanguagePHPApache License 2.0Apache-2.0

CyberSec Quiz Platform

The CyberSec Quiz Platform is a web application built with Laravel and Livewire. It allows administrators to manage quizzes, questions, and categories, and users to take quizzes and view their results.

Features

  • Admin Dashboard
    • Manage Quizzes
    • Manage Questions
    • Manage Categories
  • User Dashboard
    • Take Quizzes
    • View Quiz Results
  • Authentication and Authorization
  • Responsive Design

Prerequisites

  • PHP >= 8.2
  • Composer
  • Node.js & NPM
  • Docker (for Laravel Sail)

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/cybersec-quiz-platform.git
    cd cybersec-quiz-platform
  2. Install dependencies:

    composer install
    npm install
  3. Set up environment variables:

cp .env.example .env
  1. Generate application key:
php artisan key:generate
  1. Run migrations and seed the database:
php artisan migrate --seed
  1. Compile assets:
npm run dev
  1. Start the development server:
./vendor/bin/sail up
  1. Access the application:

Open your browser and navigate to http://localhost to view the application.

Directory Structure

cybersec-quiz-platform
├── app
│   ├── Http
│   │   ├── Controllers
│   │   ├── Livewire
│   │   │   ├── Admin
│   │   │   │   ├── QuizComponent.php
│   │   │   │   ├── QuestionComponent.php
│   │   │   │   ├── CategoryComponent.php
│   │   │   │   ├── DashboardComponent.php
│   │   │   ├── QuizTakingComponent.php
│   │   │   ├── UserDashboardComponent.php
│   ├── Models
│   │   ├── Quiz.php
│   │   ├── Question.php
│   │   ├── Category.php
│   │   ├── Result.php
├── database
│   ├── factories
│   │   ├── CategoryFactory.php
│   │   ├── QuizFactory.php
│   │   ├── QuestionFactory.php
│   ├── migrations
│   │   ├── create_quizzes_table.php
│   │   ├── create_questions_table.php
│   │   ├── create_categories_table.php
│   │   ├── create_results_table.php
│   ├── seeders
│   │   ├── DatabaseSeeder.php
├── resources
│   ├── views
│   │   ├── layouts
│   │   │   ├── app.blade.php
│   │   │   ├── admin.blade.php
│   │   ├── livewire
│   │   │   ├── admin
│   │   │   │   ├── quiz-component.blade.php
│   │   │   │   ├── create-quiz.blade.php
│   │   │   │   ├── question-component.blade.php
│   │   │   │   ├── create-question.blade.php
│   │   │   │   ├── category-component.blade.php
│   │   │   │   ├── create-category.blade.php
│   │   │   │   ├── dashboard-component.blade.php
│   │   │   ├── quiz-taking-component.blade.php
│   │   │   ├── user-dashboard-component.blade.php
│   │   ├── dashboard.blade.php
├── routes
│   ├── web.php
├── .env
├── .env.example
├── composer.json
├── package.json
├── tailwind.config.js
└── vite.config.js

Usage

Admin

User

  • Register or log in to the application.
  • Take quizzes and view your results on the user dashboard.

License

This project is licensed under the Apache 2.0 License