Git Product home page Git Product logo

travel-app's Introduction

Travel Inspiration App

This project creates an asynchronous, server-client side web app that uses input by the user (city and date) to display an image of the chosen city and information about its country, plus the weather forecast (within the next 16 days). Does that sound interesting? Yes, then go check it out!

Home screen Answer screen
Home screen Blog post screen

Highlights

Are you interested in:

  • Setting up Webpack
  • Sass styles
  • Webpack Loaders and Plugins
  • Creating layouts and page design
  • Service workers
  • Using APIs and creating requests to external urls

Then this is an excellent project to dive into.

Requirements

Start by setting up your project environment.

  1. Download and install Node.
  2. git clone https://github.com/ImmanuelXIV/travel-app
  3. cd travel-app
  4. Run npm install to install all dependencies listed in package.json (e.g., webpack, babel, node-sass, and jest).

Get API Credentials

  • Go to GeoNames.org, Weatherbit.io, and Pixabay.com and create free accounts.
  • Create a file called .env in the root travel-app folder and replace the xxxxxxxxxxxx with your API credentials as shown underneath
GEO_USER=xxxxxxxxxxxx
WEATHERBIT_API_KEY=xxxxxxxxxxxx
PIXABAY_API_KEY=xxxxxxxxxxxx

Run The App

Run the production web app

  • Run npm run build-prod. This should finish without an error.
  • Run npm run start to start the server.
  • Go to http://localhost:9000/ in your browser (e.g., Google Chrome).
  • Enter a city and date (within the next 16 days) into the fields and press the button.
  • The results should be displayed underneath.

Run in development mode

  • Run npm run build-dev. This should open a new tab (http://localhost:8080/) in your browser
  • In order for the app to function, follow the steps above to run the production web app and start the server.
  • Play around with different city and date inputs, though only submit valid input in English language.

Testing The App With Jest

If you want to check out the basic Jest unit tests in the repository, then

  • Go to the root folder in the terminal cd travel-app.
  • Run npm run test in the terminal and inspect the test results.

Extend this Project?

If you are interested, you can

  • Deploying the project e.g., on Netlify or Heroku should be fun.
  • Add an end date and display the length of trip.
  • Allow the user to add multiple destinations on the same trip.
  • Pull in weather data for additional locations.
  • Allow the user to add hotel and/or flight data.
  • Allow multiple places to stay? Multiple flights?
  • Allow the user to remove the trip.
  • Use Local Storage to save the data so that when they close, then revisit the page, their information is still there.
  • Instead of just pulling a single day forecast, pull the forecast for multiple days.
  • Incorporate icons into the forecast.
  • Allow the user to print their trip and/or export it to PDF.
  • Allow the user to add a todo list and/or packing list for their trip.
  • Allow the user to add additional trips (this may take some heavy reworking, but is worth the challenge).
  • Automatically sort additional trips by countdown.
  • Move expired trips to the bottom/have their style change so it’s clear they are expired.

travel-app's People

Contributors

immanuelxiv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.