Storm Reporter is a multi-container application that visualizes and manages storm data. It consists of multiple services including a producer, API, and frontend, each serving a specific role in processing, storing, and displaying storm data.
- Overview
- Architecture
- Services
- Setup and Installation
- Usage
- Endpoints
- Frontend Features
- Contributing
- License
This application is designed to:
- Fetch storm data from an external source (e.g., NOAA storm reports).
- Process and publish the data using Kafka.
- Store and retrieve data in/from MongoDB.
- Visualize storm data on a Google Maps-based interface.
The application uses Docker containers to manage services:
- Producer: Fetches storm data, processes it, and publishes it to Kafka.
- API: Serves storm data stored in MongoDB and interacts with other services.
- Frontend: Displays storm data on a Google Map, allowing users to filter by date.
- Producer fetches storm reports and publishes them to Kafka.
- The API consumes Kafka messages and stores them in MongoDB.
- Frontend fetches data from the API to display on a map.
Fetches storm data from external sources (e.g., NOAA), processes it, and publishes it to Kafka.
Exposes endpoints to query storm data stored in MongoDB. It also consumes Kafka messages and writes them to the database.
A React-based web application that displays storm data on a Google Map with filtering capabilities.
- Docker
- Docker Compose
- Node.js (for local frontend development)
- Make (optional, for Makefile commands)
-
Clone the Repository
git clone https://github.com/yourusername/storm-reporter.git cd storm-reporter
-
Build and Run Containers
sudo make compose build sudo make compose up
-
Access the Application
- Frontend: http://localhost:8081
- API: http://localhost:8080
Numerous makefile commands are available to manage the services.
sudo make help
- View Storm Data: Navigate to the frontend service and select a date to view storm reports for that day.
- Interact with Map: Click on markers to see details about each storm.
- Get Storm Data: Query /messages?date= to retrieve storm reports for a specific day.
-
Fetch Storm Data: The producer fetches storm data from an external source (e.g., NOAA) and publishes it to Kafka. Trigger manually with:
sudo make force-publish
-
Generate Dummy Data: You may generate fake storms for today with:
sudo make generate-storms
Access MongoDB data directly using:
bash sudo make mongo-connect
Fetch storm reports for a given date.
- Query Parameters:
date
(optional): Unix timestamp for the day to query. Defaults to the current day.
- Response:
200
: JSON array of storm reports.404
: No data found.400
: Invalid date parameter.500
: Internal server error.
This project is licensed under the MIT License.