A web-based crisis management simulator where users make critical decisions during a cyberattack on national infrastructure. The application tracks key metrics like public trust, available resources, social impact, and crisis progression.
This project is built with:
- Backend: Laravel (API)
- Frontend: Vue.js
- Database: SQLite
- Interactive crisis scenario with multiple chapters
- Decision-based gameplay with real-time consequence tracking
- Key metric monitoring (public trust, resources, social impact, and crisis level)
- Multiple possible endings based on player decisions
- Progress saving
- Responsive design for mobile and desktop
- User authentication
- Public Trust (0-100%): Represents population's confidence in your leadership
- Available Resources (0+): Represents remaining crisis management resources
- Social Impact (0-100%): Represents the severity of societal disruption
- Crisis Progress (0-100%): Represents how far the crisis has progressed (lower is better)
GET /v1/chapters
- Get all chaptersGET /v1/chapters/first
- Get the first chapter (entry point)GET /v1/chapters/endings
- Get all possible ending chaptersGET /v1/chapters/{id}
- Get a specific chapterGET /v1/chapters/{chapterId}/choices
- Get all choices for a chapter
GET /v1/choices/{id}
- Get a specific choiceGET /v1/choices/{choiceId}/impacts
- Get all impacts for a choiceGET /v1/choices/{choiceId}/next-chapter
- Get the next chapter for a choice
GET /v1/progress
- Get the current user's progressPATCH /v1/progress/update
- Update progress based on a choicePATCH /v1/progress/reset
- Reset the user's progress
GET /v1/admin/users/{userId}/progress
- Get a specific user's progress
- PHP 8.1 or higher
- Composer
- Node.js and npm
- SQLite
-
Clone the repository:
git clone https://github.com/d-vale/Simulation-center.git cd Simulation-center
-
Install PHP dependencies:
composer install
-
Install JavaScript dependencies:
npm install
-
Create a copy of the
.env.example
file:cp .env.example .env
-
Generate an application key:
php artisan key:generate
-
Create the SQLite database:
touch database/database.sqlite
-
Configure the
.env
file to use SQLite:DB_CONNECTION=sqlite # Comment out or remove the other DB_ variables
-
Run migrations and seeders:
php artisan migrate --seed
-
Build frontend assets:
npm run build
-
Start the development server:
composer run dev
-
Access the application at
http://localhost:8000
Two test accounts are created by default when running the seeders:
- Email: admin@example.com
- Password: password
- Email: user@example.com
- Password: password
Use these credentials to test the application without needing to register new accounts.
This project is licensed under the MIT License.