Key Features • How To Use • Testing • Tech Stack • License
- Select departure and arrival airport
- Airports are retrieved from DB
- Easily swap departure and arrival airports
- Find the cheapest flight, either direct or including up to 1 stopover
- Renders any error from the API
- Fully responsive
- Unit and integration tested
To clone and run this application, you'll need Git installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/oxcened/my-flight
# Go into the repository
$ cd my-flight
# You are now ready to run!
To run this application you will need a web server like Apache and a local MySQL DB. An easy way of accomplishing could be by using XAMPP.
Once you have that ready, follow these steps:
- Prepare DB
- Create a local MySQL DB and import the dump located in
/api/dump.sql
- Set your DB info in
/utils/db_config.php
- Make sure that your DB is up and running
- Create a local MySQL DB and import the dump located in
- Prepare web server
- Place the application files in the htdocs folder or follow your web server procedure to serve the application
- You may have to setup CORS on your web server
- Connect Front-end
- Create
.env.local
in/app/
and write inside of it:VITE_API_BASE_URL={your_web_server_host}/api/
- Create
To run this application, you'll need Node.js (which comes with npm) installed on your computer. From your command line:
# Go into the repository
$ cd my-flight
# Install dependencies
$ npm install
# Run the app
$ npm run dev
Note If you're using Linux Bash for Windows, see this guide or use
node
from the command prompt.
To run unit and integration tests for the Front-end, do the following:
# Go into the app
$ cd my-flight/app
# Run the tests with Jest
$ npm run test
- Front-End
- TypeScript v5
- React v18
- Vite.js v4
- TailwindCSS
- Jest + React Testing Library
- Back-end
- PHP v8.2
- MySQL
This project is MIT licensed.
alenajam.dev · GitHub @oxcened · Twitter @oxcened