Coder Social home page Coder Social logo

weather-app's Introduction

weather-app

A simple weather app for demonstrating react-native skills.

Application screenshots

Portrait Mode

clouds theme clear theme

Landscape Mode

clouds theme clear theme

How to run

System requirements

Step 1 - Change .env file

This application uses OpenWeather API to get weather data. You need to register yourself in OpenWeather and put your access token on the enviroment variable WEATHER_API_KEY in the .env file.

Warning: If you do not have an account in OpenWeather and need to register a new account, your access token may have a delay to be accessible.

Step 2 - Starting Metro Server (used by Expo)

Metro Server is the resource responsibly to starts your application on your phone or on a Android/iOS simulator. You can start this server using the command below.

$ yarn start

Step 3.1 - Starting the application on your phone

You can start this application on your phone using the Expo application. Search on your Play Store(Android) or App Store(iOS) and install Expo.

After installing Expo, open your Camera app or a QR code reader on your phone. Read the QR code shown on your PC.

Step 3.2 - Starting the application on an mobile simulator

Firstly, you need to open your Android/iOS simulator. After your Android/iOS simulator is started, you need to start this application interacting with the Expo terminal or Expo Developer Tools on your browser.

Expo terminal interaction example

  1. Start Metro Server
$ yarn start

yarn run v1.22.10
Starting project at /home/rmello/Works/weather-app
Developer tools running on http://localhost:19002
Opening developer tools in the browser...
Starting Metro Bundler

 › Waiting on exp://192.168.0.11:19000
 › Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

 › Press a │ open Android
 › Press w │ open web

 › Press r │ reload app
 › Press m │ toggle menu
 › Press d │ show developer tools
 › shift+d │ toggle auto opening developer tools on startup (enabled)

 › Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.

  1. Press a to open this application on your Android emulator.

Expo Developer Tools interaction example

  1. Start Metro Server
$ yarn start
  1. Press Run on Android device / emulator or Run on iOS simulator button to open this application on your Android/iOS simulator.

how run using expo developer tools example

Used technologies

  • React
  • React-native
  • Expo
  • Styled Components

Applied concepts

  • Multiple pages (although this application has only one page)
  • Locate watcher
  • i18n localization
  • Single responsibility file structure
  • Componentes by reusability

Future changes suggestions

  • Show on the screen another weather data(like humidity, pressure, feels like, wind speed, etc..);
  • Be able to show weather for specific regions and not only for current position;
  • Local weather data persist using AsyncStorage and mobx-persist to show the last weather if the device does not have internet access;

weather-app's People

Contributors

merorafael avatar

Stargazers

 avatar  avatar  avatar

Watchers

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