Skip to content

Lipppitt/groupia-flight-booking-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Groupia Flight Booking App

Overview

The Groupia Flight Booking App is a comprehensive flight booking system that includes both backend and frontend components. This guide will help you set up and run both parts of the application.

Prerequisites

  • PHP: Required for the backend.
  • Composer: For PHP package management.
  • Node.js and npm: For the frontend.

Setup Instructions

1. Clone the Repository

Start by cloning the repository to your local machine:

git clone 'https://github.com/Lipppitt/groupia-flight-booking-app'

2. Set Up the Backend

Navigate to the Backend Directory

cd backend

Install PHP Dependencies

composer install

Run Database Migrations

php artisan migrate

Update the .env File

Add the following lines to your .env file:

APP_URL=http://localhost:8000
FRONTEND_URL=http://localhost:5173
SANCTUM_STATEFUL_DOMAINS=localhost:8000,localhost:5173,localhost,localhost:8000,127.0.0.1:5173,127.0.0.1:8000

Generate Application Key

php artisan key:generate

Import Flight Data

Pull flight data from the API:

php artisan app:import-flight-data

3. Set Up the Frontend

Go Back to the Root Directory

cd ..

Navigate to the Frontend Directory

cd frontend

Install Node.js Dependencies

npm install

Update the .env File

Add the following lines to your .env file:

VITE_BASE_URL=http://localhost:8000
VITE_API_URL=http://localhost:8000/api/v1/

Run the Development Server

Start the development server:

npm run dev

Additional Notes

  • Make sure that your backend server (e.g., PHP server) is running on http://localhost:8000.
  • Ensure that your frontend server (e.g., Vite server) is running on http://localhost:5173.

Troubleshooting

  • Backend Issues: If you encounter problems with migrations or key generation, verify your database connection settings in the .env file.
  • Frontend Issues: For problems with the frontend, confirm that the development server is running and that your .env configuration matches the backend settings.

Contributing

Contributions are welcome! If you have suggestions, bug reports, or improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published