Skip to content

IFRCGo/WhatNow

This branch is 353 commits ahead of, 6 commits behind master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

576e22d · Mar 26, 2025
Feb 13, 2025
Oct 16, 2024
Mar 26, 2025
Oct 16, 2024
Mar 26, 2025
Mar 26, 2025
Dec 27, 2024
Mar 14, 2025
Mar 26, 2025
Mar 26, 2025
Mar 26, 2025
Mar 26, 2025
Oct 16, 2024
Mar 26, 2025
Oct 16, 2024
Mar 14, 2025
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Dec 30, 2024
Oct 16, 2024
Nov 5, 2024
Oct 16, 2024
Oct 16, 2024
Nov 6, 2024
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Feb 28, 2025
Mar 26, 2025
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Feb 3, 2025
Mar 26, 2025
Feb 28, 2025
Feb 28, 2025
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Oct 16, 2024
Feb 25, 2025

Repository files navigation

Laravel-Vue-Bootstrap Project

WhatNow

WhatNow is a web application built with Laravel 5.8 and Vue.js, designed to provide a disaster preparedness guide. This document includes steps to install and configure the project in your development environment.

Prerequisites

Ensure the following tools are installed on your system:

  • PHP (version 7.4):
    php -v
  • Composer (dependency manager for PHP):
    composer --version
  • Node.js (recommended version 12 or higher):
    node -v
  • npm (Node.js package manager):
    npm -v
  • MySQL (version 5.7 or higher):
    mysql --version

Project Installation

  1. Clone the Repository

    git clone https://github.com/YourUsername/WhatNow.git
    cd WhatNow
  2. Install PHP Dependencies

    composer install
  3. Install JavaScript Dependencies

    npm install
  4. Set Up Environment

    • Copy the .env example file and configure it as your environment file:
      cp .env.example .env
    • Generate an application key for Laravel:
      php artisan key:generate
  5. Database Configuration

    • Create a MySQL database named homestead.
    • Open the .env file 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
    
  6. 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
  7. Compile Frontend Assets

    • For development:
      npm run hot
    • For production:
      npm run production
  8. Start the Development Server

    php artisan serve

Development Commands

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

Documentation

API Endpoints Documentation

The API endpoints documentation can be found at the /endpoints route.

Troubleshooting

  1. Verify Dependencies: Ensure all dependencies are properly installed.
  2. Environment File: Check that the .env file is correctly set up.
  3. Dependency Conflicts: If issues arise, run composer update and npm install to resolve them.
  4. Database Connection: Verify that the database credentials in the .env file are correct.
  5. Migrations: If migrations fail, check the database connection and run php artisan migrate:refresh.
  6. Frontend Assets: If assets are not compiling, run npm run production or npm run hot to recompile them.
  7. Development Server: If the server fails to start, check the port and run php artisan serve again.

Testing

Run tests using phpunit. (Note: Tests may require review and adjustments to function properly.)

./vendor/bin/phpunit

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages