Giter VIP home page Giter VIP logo

workzone-alerts's Introduction

Workzone Alerts

Institute of Transportation: Workzone Congestion Alerts Module

Setup

  1. Download and install Maven
  2. Download and install MongoDB
  3. Configure application.properties file in resources.
    • Update mongodb settings
    • Provide Twilio account credentials
  4. Modify recipients.json file to provide the recipients mobile numbers.
  5. Update workzonesensors.csv file to provide the work zone sensor locations and the work zone projects. Also update the sensor_camera_2017.csv to provide the work zone sensors and the camera mappings.

Installation

  1. Navigate to project root folder and run the following command

     mvn clean install
    
  2. Go to the target folder and extract the ROOT.war file.

  3. Either deploy the ROOT.war file in a Java Servlet Container or manually run the application using the following command.

    java -jar ROOT.war
    
  4. Once the application successfully started, post the work zone status information to this application. Below explains the REST call structure for posting the work zone statuses.

    Type Value
    HTTP Method: POST
    Request URL: http://<context-url>/workzone/feeds/consume
    Form Data: {
    "workzone": "$workzoneName",
    "device": "$deviceName",
    "avgSpeed": "$avgSpeed",
    "alert": "Must be one of {SLOW,STOP,BLANK}"
    }

5. To access the current bottlenecks (Slow or Stop conditions) in the work zones, use the follwoing feed.
	http://<context-url>/feeds/alertfeed

Code Structure

Package/File Usage
src/main/resources Folder that contains the all configuration files
WorkzoneAlertsApp.java Entry class that will be invoked by the Spring Boot.
com.intrans.reactor.handlers This Package has the handler classes for asynchronous processing.
com.intrans.reactor.workzone.constants Contains the configurations from the resource folder.
com.intrans.reactor.workzone.controller Controller classes for providing the REST APIs.
com.intrans.reactor.workzone.dto DTO classes that stores the SMS Requests and Work zone alert requests.
com.intrans.reactor.workzone.entities MongoDB database document classes.
com.intrans.reactor.workzone.handlers Service handler for preparing the work zone DTOs.
com.intrans.reactor.workzone.repository Sping data repository classes for executing the queries.
com.intrans.reactor.workzone.sms Classes for managing the SMS configurations and handling the SMS requests.
com.intrans.reactor.workzone.sms.process Service class for generating and processing the SMS request objects.
com.intrans.reactor.workzone.sms.providers SMS provider classes.
com.intrans.reactor.workzone.utils Common helper classes.

Build with

Documentation

Java docs folder

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

workzone-alerts's People

Contributors

krishnaj1 avatar jvkrishna 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.