Giter VIP home page Giter VIP logo

onkometrorikki's Introduction

Onko metro rikki?

Sponsored PRs Welcome license Build Status All Contributors

Check if the metro in Helsinki area is broken at the moment

What is this?

A really stupid prototype app that shows whether the metro in Helsinki is broken currently.

The information is based on the HSL Disruption info API.

Follow @onkometrorikki for notifications when there are disruptions in the metro.

Try it

Head to onkometrorikki.fi

Development

Install dependencies: yarn

Start the backend and frontend for local development: npm run dev

This command will start both the backend and the frontend locally.

The backend will run in port 4000 by default and the frontend in port 3000. The backend url is defined by the env variable ELM_APP_API_URL as can be seen in the package.json file.

Start only the frontend, using "production" backend: npm run frontend.

Start only the backend: npm start or npm run backend.

Deployments

Deployments are triggered automatically for every commit in master branch.

For manual deployments:

  • Backend is deployed in Heroku: git push heroku master
  • Deploy frontend to now: npm run release

Contributors

If you'd like to contribute, see CONTRIBUTING.md.

Thanks goes to these wonderful people (emoji key):


Olavi Haapala

๐Ÿ’ป ๐Ÿ“– ๐Ÿ› ๐Ÿ‘€ ๐Ÿ“ข

Fotis Papadogeorgopoulos

๐Ÿ’ป ๐ŸŽจ ๐Ÿ‘€ ๐Ÿš‡

paulogdm

๐Ÿš‡

Ossi Hanhinen

๐Ÿ’ป โš ๏ธ

Credits, Thanks, Inspiration

Supporters

This project is sponsored by Futurice's Open Source Sponsorship program

Supported by the Spice Program

onkometrorikki's People

Contributors

dependabot[bot] avatar farskid avatar ohanhi avatar olpeh avatar paulogdm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

onkometrorikki's Issues

Feature Request: Dark Mode

(To anyone else reading: I know Olavi and this a half-joke, and an intent to implement. I wouldn't write this otherwise ๐Ÿ˜… )

Is your feature request related to a problem? Please describe.
Finland is a dark place in the winter, I am a shady person, and the light burns my eyes.
I think a dark mode would be dank. ๐ŸŒ† ๐Ÿ’ฏ ๐Ÿ”ฅ

Describe the solution you'd like
I think you can do this purely with CSS custom properties, and their propagation.
Adding the button in an accessible spot, and in an accessible manner, would also be important.

Describe alternatives you've considered
You could also do this more heavy-handedly with style="..." or with bare CSS classes, but that solution is a bit more brittle, since you have to propagate the context of light/dark mode.

Additional context
I want to implement this! I will send a PR your way if you're ok with it.

Automatic re-fetching of the status from the backend

Is your feature request related to a problem? Please describe.
It's frustrating to always have to refresh the whole page in order to refresh the status.

Describe the solution you'd like
Automatically re-fetch the status from the backend every 1min or so.

TypeError: Cannot read property 'childNodes' of undefined

Describe the bug
Changing the language generates an error in the browser console.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the website.
  2. Click on En language.
  3. Open the browser console

Expected behavior
Should change the language without any error.

Screenshots
Screenshot 2019-05-11 at 10 14 50

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: Google chrome
  • Version: 74.0.3729.131 (Official Build) (64-bit)

I18N โ€“ย add English and Swedish to the UI

Is your feature request related to a problem? Please describe.
Finland is a multilingual country, and Finnish is not the easiest language to understand.

Describe the solution you'd like
An easy way to select the preferred language in the UI. Store the selected language in local storage or cookie for use on later visits. Optionally add different languages as routes in order for direct linking by URL.

Describe alternatives you've considered
Alternatively, just keep the UI in Finnish but display the reasons for interruptions in all 3 languages that the HSL API already provides.

Default locale is not set by the domain

Describe the bug
English and Swedish domains don't default to their corresponding locales.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://isthemetroborked.now.sh/ in incognito mode

Expected behavior
Expected to see content in English.

Desktop (please complete the following information):

  • Browser: Chrome
  • Version 72

Bot(s) don't use I18N

Telegram bot and soon slack bot only support Finnish language at the moment and use some scary assumptions there.

const finnishReason = status.reasons[0][0].text;
reply(`${question} Kyllรค!\n${finnishReason}`, Extra.markup(keyboard));

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.