The solution consists of a backend API built with Ruby on Rails and a frontend user interface built with React. The API fetches flight departure and delay data from the data providers, processes it, and delivers the information via differet endpoints. The frontend provides a user-friendly interface to browse the flights information.
- Ensure you have Ruby, Bundler, and PostgreSQL installed on your machine.
- Navigate to the
backend
directory. - Install the required gems:
bundle install
- Set up the database:
rails db:create db:migrate db:seed
- Start the Rails server:
rails server
The backend server will start at http:https://localhost:3000
.
The frontend is a React application that allows users to browse the flight information provided by the backend API. It uses Tailwind CSS components to provide a modern and responsive user interface.
- Ensure you have Node.js and Yarn installed on your machine.
- Navigate to the
frontend
directory. - Install the required packages:
yarn install
- Start the React development server:
yarn start
The frontend server will start at http:https://localhost:3000
.
- Ensure you have Docker and Docker Compose installed on your machine.
- Navigate to the project root directory.
- Run the following command to start both services:
docker-compose up --build
The backend includes tests to ensure the API is functioning correctly. To run the tests, navigate to the backend
directory and execute the following command:
rails test