Giter VIP home page Giter VIP logo

weather-forecast's Introduction

WeatherForecast

๐Ÿ‘‹ Hi, Iโ€™m @syrenly and welcome to weather-forecast repo! It's a Demo application for weather forecasts and it was generated with Angular CLI, maintained to version 18.

Implementations

  • Angular 18 and standalone components only;
  • folders organized mainly in a "folder-by-type" way;
  • a router exposes 2 main components: HomeComponent and ForecastComponent; guard, resolver and animations implemented;
  • the folder ui-components contains the less architectural components, designed to show or search data;
  • theme.scss hosts the 2 themes (light and dark), that can be switched using the SwitchThemeComponent from ui-components; the component is always available on the upper right corner of the view;
  • HomeComponent is an entry point where search cities;
  • ForecastComponent is the core of the application, where data are displayed using charts, tabs and list;
  • Switch for themes and the license key are managed with injection tokens;

Main external dependencies

  • Angular Material for theme and UI Kit;
  • ChartJS for charts;

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Last code coverage

Run npm run test:coverage to get stats about the code coverage. Current:

=============================== Coverage summary ===============================
Statements   : 95.36% ( 288/302 )
Branches     : 82.5% ( 66/80 )
Functions    : 89.88% ( 80/89 )
Lines        : 96.5% ( 276/286 )
================================================================================

Lint

Run ng lint to run the Angular lint.

Run npm run eslint to run the ES lint.

Run npm run eslint:fix to run the ES lint and apply fixes.

Docker

Install docker in your machine. From the root folder of this application, run

docker build . -t weather-forecast and docker run -p 4200:80 weather-forecast.

Navigate to http://localhost:4200/.

With this mode, the application will be built in production. Remember to update the license key for the OpenWeather API here with a full working one.

Attributions

The project depends on Open Weather Map, which provides an API with free license. The license is limited to small number of requests and few methods.

To change the license key, replace it here for development or here for production.

TODO List

Explore the TODO List to know what's next.

Branches

  • ng-17: implementation with Angular 17;
  • assignment-04-2024: the first implementation of the application. Updates are not planned.

weather-forecast's People

Contributors

syrenly avatar

Stargazers

 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.