Code Monkey home page Code Monkey logo

fire-marshal's Introduction

"Fire Marshal" Build Status codecov

______ _           ___  ___               _           _
|  ___(_)          |  \/  |              | |         | |
| |_   _ _ __ ___  | .  . | __ _ _ __ ___| |__   __ _| |
|  _| | | '__/ _ \ | |\/| |/ _` | '__/ __| '_ \ / _` | |
| |   | | | |  __/ | |  | | (_| | |  \__ \ | | | (_| | |
\_|   |_|_|  \___| \_|  |_/\__,_|_|  |___/_| |_|\__,_|_|

I'm still looking for better name for the project

๐ŸŒด ๐ŸŒณ ๐Ÿ”ฅ ๐ŸŒณ ๐Ÿก ๐Ÿ”ฅ ๐ŸŒณ ๐ŸŒณ ๐ŸŒณ ๐Ÿƒ ๐Ÿ  ๐ŸŒณ ๐Ÿซ ๐Ÿš™ ๐ŸŒณ ๐Ÿš’ ๐ŸŒณ ๐ŸŒณ ๐ŸŒด

What's new

๐Ÿ“œ changelog

About The project

The main project of NASA Space App Challenge Spot That Fire!

I thought about that kind of project for long and I'm so happy that NASA proposed to implement it. And I hope it would be useful for the others and I'm always open for contribution to it.

The Space App Challenge

NASA:

Build a crowdsourcing tool for citizens to contribute to early detection, verification, tracking, visualization, and notification of wildfires. more

Author

Plans

sorted by priority

  • Make app accessible for developers
    • Provide a brief description of the app or solution goal and design โ€“ what does it do and how
    • Offer the description (a story) of why this app or solution is important and what insights or future capabilities it provides with regard to fighting wildfires
  • Make app mobile friendly
    • web
    • mobile app (react native) #18
  • Track and visualize fire
    • stream of fires near my #4
    • realtime map #5
    • realtime stream #6
  • Report a fire
    • I see a fire (+ few categories of wildness) + location, text message, attach photo #9
    • send tweet with images, message and location about fire #7
    • send fb message (bot) #8
    • share from other sources
  • Notify communities at risk
    • subscribe on fire alarm near your #10
    • give API to subscribe to fire incidents
  • Build mashups
    • merge with NASA data (Leverage NASA state-of-the-art technology, including: near-real-time fire database and satellite image processing APIs accessible through the NASA OpenNEX App Store) #11
    • add information about weather
    • listen twitter, instagram, fb and show related warnings
  • Community/Social
    • create user's profile #12
    • like each other messages #13
    • ask to proof fire alerts if user is near
    • report on message
  • Verify and screen fire reports
    • validate crowd data
  • Gamification
    • scores for successful actions #14
    • badges for reported fires, for saved people and etc
    • could become local "fire marshal" if one is good lifeguard
    • ask about fire activity near you and give rewards on help
  • Analysis and prediction
    • analyze and predict fire based on other data (weather)
  • Other
    • localization #15

Architecture

Containers

Server

Static

Usage

Bump project version

$ ./bin/bump-version.sh

Run lint and tests for all apps

$ ./bin/tests.sh

Contribution / How to help

If you would like to start somewhere there good start point issues

If you can't find anything there you can pick something else.

Steps to contribute

  • choose issue
  • try to understand issue
  • ask questions in comments of chosen issue
  • propose your solution (before implement it) in comments to issue
  • once we agreed about it please clone project, create branch (feature/<feature-id>-<feature-name>), make commits there, push Pull Request (PR) and description there what and how have you solved
  • ask me for review :)
  • thank you for your help!

fire-marshal's People

Contributors

hyzhak avatar sulunemre avatar

Watchers

 avatar  avatar  avatar

fire-marshal's Issues

wss middleware

  • reflect middleware actions to redux stream
  • messages queue
  • reconnect
  • overwritable messages move to #58
    examples:
EVIDENCES.SUBSCRIBE -> EVIDENCES.SUBSCRIBE = EVIDENCES.SUBSCRIBE
EVIDENCES.SUBSCRIBE -> EVIDENCES.SUBSCRIBE -> EVIDENCES.UNSUBSCRIBE = 
    null or EVIDENCES.UNSUBSCRIBE

how to integrate websocket with redux?

We have sources of data in a way of web sockets
And we want to consume this data to Redux state
so our main web app could take new data and reflect it in a right way.
But here comes some questions about pipeline and lifecycle:

  • what is the best way to start and stop web socket module?
    For example when we not using chat we don't need flow of incoming messages
    but we could need this flow in few components. So it could make sense to
    trigger on/off module depends on visible components. the Stateful components
    because stateless component doesn't care much about this state.
    So each stateful component could have PubSubModule.start() and
    PubSubModule.stop().
    Another alternative - unbind PubSub Modules from component but bind on state updat
    it could be current visible page, login/logout user and etc.
    So PubSub Module subscribe on state update, and check whether it should start/stop
  • Update request to server
    For example our app gets updates depends on our location and user's actions,
    and sure when user walks her location could change so we should update query
    of subscribed data.
    There are few alternatives:
  1. call PubSubModule.update(new_params) directly from component
  2. subscribe on Redux state change and update when we need it.
    But we should remember previous request and send "diff" only --
    in case of new data.

Challenges

  • optimize Redux state subscription. We still can have problem because
    we can't subscribe for specific option. But should react on ant tiny piece update.
    Partly Solution: use libs like reselect
    which store intermediate state tree result so we won't need to go deep
    and extract everything
    we have few alternatives here, to how could we get state for requests:

Architecture

  • Should it be middleware?
  • Is it another form of UI component?

Websocket as Middleware

it seems middleware is the best way to integrate websockets.

So lets consider Options

realtime stream of fire alerts

user could see new fire message without any actions from they side

client

  • have 2 lists (fetched, stream playlist)
    because we can fetch a lot of items and in different orders. Even in realtime. But playlist should reflect what actually we show to user.
    #62
  • conservative update (show big button that we have N updates) and show updates one click #61
  • realtime update load right away #63
  • (?) propose realtime update when user stick to the top of page #63 (the same)

setup travis CI

  • integrate with concov
  • travis-ci test for server, static and wss

2 redux states for fetched entities and shown entities

  • fetched fire evidences (update from wss and fetched directly)
  • shown entities (sort, subset of fetched entities)

because we can fetch a lot of items and in different orders. Even in realtime. But playlist should reflect what actually we show to user.

image lazy loading

  • spinner
  • estimation of image colors
  • grey/color frame if we don't have estimation
  • cancel when image disappear

scheme realtime stream of incoming events

Motivation

we would have few sources of incoming data: nasa images, twitter, instagram, fb and etc.
each source will be consume by some isolated consumer (container) which would process source data and pull result to the queue (stream)

SOURCE -> CONSUMER -> STREAM -> DB -> APP -> CLIENT

So here I'd like to implement scheme of this async stream.
For the moment source of events would be "random fake event generator"

Pipeline

  • SOURCE -> CONSUMER Fake event producer
  • CONSUMER -> STREAM Setup Kafka
  • STREAM -> DB Write Kafka stream to MongoDB
  • DB -> APP โ“ Could we subscribe to updates from MongoDB?
  • APP -> CLIENT โ“ Could we use WebSockets and scale in the same time? #50

Architecture

overwritable messages for ws middleware

extension of #56

examples:
1)

EVIDENCES.SUBSCRIBE -> EVIDENCES.SUBSCRIBE = EVIDENCES.SUBSCRIBE
EVIDENCES.SUBSCRIBE -> EVIDENCES.SUBSCRIBE -> EVIDENCES.UNSUBSCRIBE = 
    null or EVIDENCES.UNSUBSCRIBE

infinity stream

load more data and append to the current stream (from the end)

more details in PR

Plan Mobile App

  • could it be React Native? Pros and cons
  • can we reuse already existing app
  • app architecture design

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.