Giter Club home page Giter Club logo

wapp's Introduction

Weather App

Note: when searching; the WeatherAPI doesn't have ALL the cities in the world, and seems to only have major populated ones. Be sure to use a Zip Code if your City doesn't show up.

  1. Quick Start
  2. File Structure
  3. Front-End Architecture
  4. Back-End Architecture
  5. Trade-Offs
  6. Testing
  7. To-Do

๐Ÿš€ Quick Start

Clone the site and change to its directory.

git clone https://github.com/bar0191/wapp
cd wapp
  1. Development

    Install yarn dependencies.

    yarn

    Run develop server.

    yarn develop
  2. Production

    Install yarn dependencies.

    yarn

    Run prod server.

    yarn prod

A quick look at the top-level files and directories.

.
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ public
โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ App.js
โ”‚ย ย  โ”œโ”€โ”€ assets
โ”‚ย ย  โ”œโ”€โ”€ components
โ”‚ย ย  โ”œโ”€โ”€ index.js
โ”‚ย ย  โ”œโ”€โ”€ server
โ”‚ย ย  โ”œโ”€โ”€ styles
โ”‚ย ย  โ””โ”€โ”€ vendor
โ””โ”€โ”€ yarn.lock
  1. /src/assets: This directory contains any site assets like imgs, fonts, icons, etc.

  2. /src/components: This directory contains any stateless/pure reusable component.

  3. /src/styles: This directory contains any site styles (sass/scss).

  4. /src/server: This directory contains back-end server logic (express/micro-services)

  5. /src/vendor: This directory contains third-party scripts, styles, fonts, etc.

Since this project was spun up using Create-React-App, it's purely client side rendered.

Styles

Styles in this project are written in SASS using SCSS syntax. Implementation is handled by node-sass, and webpack. BEM model is used.

Animations/Transitions

All Animations and transitions are done through react-pose and pure SCSS.

Design

I followed I very minimalist design approach. The site was styled mobile first, meaning media queries are done for desktop.

โš™๏ธ Back-End Architecture

This project uses an express back-end to render build in production and is used to consume weather micro-services. Following a model/controller stucture where routes are calling a controller to manage the micro service.

Security/API Auth

Currently the project is using a static (Non-secret) Token to authorize API calls, purely as an example of how one would authorize an API call in Express. I added Helmet just to show how easy it is to add a little extra protection to a nodeJS application.

๐Ÿ‘จโ€๐Ÿ’ป Trade Offs

Due to time constraints, this projects doesn't have much error handling if the user enters a zip or city that doesn't exist. Right now if a city or zip doesn't exists the form just doesn't submit. That isn't ideal for UX in the real world.

Design

Due to time constraints, I only really designed the project with mobile in mind, so there isn't a very unique desktop design or change from the mobile version. Font's and icon sizes are increased. I would have also liked the change to make the search field more interactive, with autofill/autocomplete functionality.

Functionality

Due to time constraints, I didn't get to implement a kind of autofill/auto complete feature on the search bar, where if the user types "San" it would display search results for "San Fran", "San Diego", etc. Right now the search functionality will go to the closest matching value. Not ideal for UX either.

Testing

Unit Testing to come soon hopefully, but right now no unit tests have been created.

  1. Error Handling

  2. Unit Testing

  3. Better desktop design

  4. Fix exit animation on back

  5. Add autofill functionality to search form

  6. implement pre-fetching with autofill functionality on searhc form

wapp's People

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.