Coder Social home page Coder Social logo

weather-app's Introduction

Weather App

This is a simple weather app that allows you to check current weather for your current location or any other city.

Table of contents

Description

This project is a simple weather app that allows you to check current weather for your current location or any other city. It was created to practice using software engineering principles and to learn how to use API's.

It includes a database for storing user information and a login system.

The database contains two tables: users and cities. The users table stores user information and the favourite locations of each user.

A light and dark mode is available according to the selected location's sunrise and sunset times.

Technologies

Project is created with: HTML/CSS Bootstrap JavaScript PHP XAMPP MySQL

API's used

  • Open Meteo - used to get weather data as well as search for cities
  • IP info - used to get user's current location
  • Big Data Cloud - used for reverse geocoding to get city and country names from latitude and longitude
  • Geonames - used to get timezone information from latitude and longitude

Setup

To run this project:

  • Install XAMPP
  • Clone this repository into the htdocs folder in XAMPP
  • Start Apache and MySQL in XAMPP
  • Create a database called weatherforecast in phpMyAdmin
  • Use the DDL.sql file to create the tables
  • Use the DML.sql file to insert some data into the tables

The database should now be set up and you should be able to run the project.

Unit Testing

To run the unit tests:

  • Install PHPUnit
  • Navigate to the tests folder in the project
  • Create a database called test using the DDL.sql file
  • Run the following command:
php vendor/bin/phpunit tests --display-warnings

image

Demo Pictures

image

Night Mode

image

Day Mode

Additional screenshots can be found in the demo/screenshots folder.

Demo Video

Contributors

weather-app's People

Contributors

nadatelwazane 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.