https://github.com/usulpro/netherlands-weather
https://github.com/usulpro/netherlands-weather
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/usulpro/netherlands-weather
- Owner: usulpro
- License: mit
- Created: 2018-12-07T10:02:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-16T20:13:07.000Z (over 7 years ago)
- Last Synced: 2026-02-11T22:44:06.102Z (5 months ago)
- Language: HTML
- Homepage: https://usulpro-weather.herokuapp.com/
- Size: 1.77 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# netherlands-weather
Live Demo:
https://usulpro-weather.herokuapp.com/
Storybook:
https://usulpro.github.io/netherlands-weather/
## Features & Details
- React SPA with SSR
- Client and Server routing with Reach Router
- Human-readable URLs
- Responsive design
- GraphQL API (Graphcool BaaS) for data storage
- Apollo client for fetching and caching weather data from API endpoint
- Client and Server router based data fetching (*)
- Google map with custom appearance and clustered markers
- Text search through cities
- Date and city selection. Interactive map markers.
- Script to convert JSON data to NDF in order upload to BaaS (`scripts/ndf.js`)
- Deployable Graphcool Service (`API/README.md`)
- Deployable to Heroku NodeJs application
- Continuous delivery to Heroku from Gitbub (master branch)
- Storybook for developing and UI testing (https://usulpro.github.io/netherlands-weather/)
- Test coverage with Jest https://usulpro-weather.herokuapp.com/coverage/lcov-report/index.html
(*) how to test:
1) Select a city from the list - weather data for this city will be fetched from your browser
2) Refresh the page - server will render the page fulfilled with data
## How to launch locally
You'll need Heroku CLI:
https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up
```shell
git clone https://github.com/UsulPro/netherlands-weather.git
cd netherlands-weather
yarn
yarn dev
```
After building process is finished, open your browser on http://localhost:3000
## How to develop
- `yarn storybook` to develop UI
- `yarn dev` to develop server and SSR
- `yarn test` to watch tests
## How to deploy
### API
- `yarn convert` to prepare data in NDF
Then you should be logged in to Graphcool Service (`graphcool login --token "YOUR_TOKEN"`)
- `yarn deploy:api` to deploy GraphQL schema to BaaS
- `yarn upload` to upload data to BaaS (Careful! It'll reset DB as well)
### APP
Just `git push` master branch to Github, CD will start automatically.
### Storybook
Storybook will be deployed to Github-Pages
```
yarn deploy:storybook
```
## Credits
Oleg Proskurin 2018
email: pro@usul.su