WhatNow is a web application being migrated to Laravel 13 and Vue.js, designed to provide a disaster preparedness guide. This document includes steps to install and configure the project in your development environment.
The Laravel 13 dependency lock and runtime validation are still pending. See Laravel 13 migration for the current status, validation commands and release requirements.
Ensure the following tools are installed on your system:
- PHP (version 8.4; Laravel requires at least 8.3):
php -v
- Composer (dependency manager for PHP):
composer --version
- Node.js (version 22):
node -v
- npm (Node.js package manager):
npm -v
- MySQL (version 8.0 or higher):
mysql --version
-
Clone the Repository
git clone https://github.com/YourUsername/WhatNow.git cd WhatNow -
Install PHP Dependencies
composer install
-
Install JavaScript Dependencies
npm install
-
Set Up Environment
- Copy the
.envexample file and configure it as your environment file:cp .env.example .env
- Generate an application key for Laravel:
php artisan key:generate
- Copy the
-
Database Configuration
- Create a MySQL database named
homestead. - Open the
.envfile and update your database credentials:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=homestead DB_USERNAME=your_username DB_PASSWORD=your_password - Create a MySQL database named
-
Run Database Migrations
php artisan migrate
Optional: If you would like to populate the database with initial sample data, you can run the database seeder command:
php artisan db:seed
-
Compile Frontend Assets
- For development:
npm run hot
- For production:
npm run production
- For development:
-
Start the Development Server
php artisan serve
| Command | Description |
|---|---|
php artisan serve |
Starts the local development server |
npm run hot |
Compiles assets and hot-reloads changes |
npm run production |
Compiles assets for production |
php artisan migrate |
Runs database migrations |
php artisan db:seed |
Seeds the database with sample data |
php artisan make:model |
Creates a new Eloquent model |
php artisan make:controller |
Creates a new controller |
The API endpoints documentation can be found at the /endpoints route.
- Verify Dependencies: Ensure all dependencies are properly installed.
- Environment File: Check that the
.envfile is correctly set up. - Dependency Conflicts: If issues arise, run
composer updateandnpm installto resolve them. - Database Connection: Verify that the database credentials in the
.envfile are correct. - Migrations: If migrations fail, check the database connection and run
php artisan migrate:status. - Frontend Assets: If assets are not compiling, run
npm run productionornpm run hotto recompile them. - Development Server: If the server fails to start, check the port and run
php artisan serveagain.
Run the PHPUnit 12 suite with PHP 8.4 after resolving the migration lockfile:
composer test