alexandrabaturina / travel-planner

JavaScript-based SPA than puts together all necessary info about your trip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FEND Capstone Project: Travel Planner

Overview

Travel Planner is the capstone project of Udacity Front End Developer nanodegree program. It requeres to build JavaScript-based SPA than puts together information about your trip.

The goal of the project is to practice with:

  • Setting up Webpack
  • Webpack loaders and plugins
  • Responsive layouts
  • Using APIs and creating requests to external URLs
  • Dynamic DOM manipulation
  • Service workers
  • Jest tests

Features

To plan a trip, a user has to specify destination city, destination country, and start date for their trip.

image

Based on user input, Travel Planner provides the following information:

  • Number of days before the trip.
  • Typical weather for the start date if trip is less than 16 days away and today's weather otherwise.
  • Min and max temperature.
  • The picture of destination city (the most popular picture of the specified destination in Pixabay library).

image

APIs Used

Travel Planner app uses the following APIs:

Getting Started

Prerequisites

  1. Download Node.js from here.
  2. Clone this repo.
  3. cd into project directory.
  4. Install project dependencies.
npm install
  1. Get Geonames username.
  2. Get Weatherbit API key.
  3. Get Pixabay API key.
  4. In the root of the project, create the .env file.
  5. In your env file, specify the credentials you got at steps 5–7.
PIXABAY_API_KEY = <your-pixabay-api-key>
WEATHERBIT_API_KEY = <your-weatherbit-api-key>
GEONAMES_USERNAME = <your-geonames-username>

Running

Test mode

To run the app in test mode, use the following command.

nmp run test

Development mode

To run the app in development mode, use the following command.

npm run build-dev

Production mode

To run the app in production mode, follow the steps below.

  1. Build the dist folder.
npm run build-prod
  1. Start the server.
npm run start
  1. Open localhost:8081 in your browser.

Authors

Alexandra Baturina

About

JavaScript-based SPA than puts together all necessary info about your trip


Languages

Language:JavaScript 73.5%Language:SCSS 19.0%Language:HTML 7.5%