Skip to content

AtmosphericX is a custom-built hosted project designed to fetch weather-related data from the National Weather Service (NWS) API. It is primarily used to provide weather information to users, whether they are individuals looking for local weather conditions or developers integrating weather data into their applications.

License

Notifications You must be signed in to change notification settings

K3YOMI/AtmosphericX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

🌩️ Project AtmosphericX 🌪️

AtmosphericX is a web application that uses the National Weather Service API to provide near real-time weather alerts and outlooks. The application can be used by storm chasers, emergency management, or the general public to stay informed about severe weather or special alerts. Please note that this application is still in development and may not be fully functional. Also please note that information provided by this application should not be used as the sole source of information for severe weather events. Always refer to the National Weather Service for the most accurate and up-to-date information or your NOAA Weather Radio. I do not claim responsibility for any damages that may occur as a result of using this application.

Documentation written by @k3yomi

GitHub Repo stars GitHub forks GitHub issues GitHub pull requests

⛈️ Table of Contents

🌪️ Support Features

  • Support up to ≈130 unique alerts
    • Tornado Alerts (Watches/Radar Indicated/Confirmed/PDS/Emergencies)
    • Severe Thunderstorm Alerts (Watches/Considerable/Destructive)
    • Flash Floods (Watches/Warnings/Emergencies)
    • Special Marine Warnings
    • Snow Squall Warnings
    • Much much more (Customizable)
  • Full dashboard
  • Portable (Supports audio and active warnings)
  • Mobile Phone Audio Support
    • Requires at least once interaction
  • Discord.js / Discord Bot support (Latest warning)

🌧️ Install Guide

To install Project AtmosphericX, you will need a few requirements. NodeJS / NPM and Git (optional) If you are not wanting to install git, you can also clone the repository by downloading it as a ZIP. If you do not know how to install any of the requirements, feel free to refer to their documentation.

🌪 Cloning the project with Git

once finished install git, clone the project with the command below (terminal/command prompt)

git clone https://github.com/k3yomi/AtmosphericX

After cloning, navigate to the AtmosphericX directory. Inside, you'll find another directory titled Project AtmosphericX. This holds the main project itself. For better ease of access, feel free to drop the Project AtmosphericX directory into somewhere you'll remember.

🌩️ Configuration

Configurating AtmosphericX is quite simple, the env holds all the configurations and warnings to whitelist as well as the discord bot support configuration. Here is a general template below of the configuration and what each configuration does.

DO NOT COPY THE CONFIG AS THIS IS NOT A WORKING CONFIG

# Environment Configuration
VERSION=4.0.0 # Hold the version (do not touch)

# HOST NAME AND ACCESS
HOSTNAME=0.0.0.0 # Your local network address (LAN) (ipconfig) (keep for local)
PORT=3000 # Port you would like to host on your device
API_ACCESS=[*] # Which IP's are allowed to access (* = wildcard/all)

# GENERAL INFORMATION
YOUR_LOCATION=COUNTY_NAME, ST # Your county, state (abbreviated) - will be used to give you alerts in the dashboard for alerts in your area
USER_AGENT=AtmosphericX-4.0 # Custom UserAgent to the national weather service

# QUERY CONFIGURATION
ACTIVE_ONLY=false # Active only alerts
REFRESH_RATE=30 # How often your server queries the NWS API (execute every 30 seconds, provided the seconds component of the current system time)
QUERY_RATE=10 # How often your cleint queries the server API (execute every 10 seconds, provided the seconds component of the current system time)
OUTBREAK_ONLY=true # (true = only looks for major_alerts) (false = targets all_alerts)
MAJOR_ALERTS=[]
ALL_ALERTS=[]

# ALERT CONFIGURATION
BEEP_ONLY=false # Forces only the beeping notification on unless in the states in excluded events. (Doesn't affect custom alerts)
ALLOW_UPDATES=true	# Choose to allow event updates to push through.
EXCLUDED_EVENTS=[] # Formatted Events Here. Please check format.js for the event names. (Ex. Tornado Emergency)




# DISCORD BOT CONFIGURATION (OPTIONAL)
ENABLE_DISCORD_BOT=false # Enable the discord bot functionality
DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN # Discord bot token
DISCORD_UPDATE_CHANNEL=YOUR_DISCORD_CHANNEL_ID # Channel ID
DISCORD_BOT_REFRESH_RATE=10 # How often your server queries the NWS API (Based on your system clock)

⛈️ Post Configuration

Once you have configured your env file. You are now ready to install dependencies in AtmosphericX! To simply install, you will need to run the command down below.

npm install

After completing the install process, you can now run AtmosphericX!

node index.js

If you encounter an error regarding a missing dependency, you have two options to resolve it. You can manually run npm install for the specified dependency.

npm install {package_name}

🌧️ Dashboard Setup

To access the dashboard, which can be found at {ip}:{port} (e.g., http://192.168.1.92:3000), you will need to login. If you are unable to see the dashboard, ensure that the NodeJS web server is up and running. Additionally, verify that your IP address has been granted API access. If required, confirm that the wildcard (*) has been applied to API_ACCESS to allow access from all addresses.

Username: root
Password: root

Ensuring the security of your webserver is of importance. It's vital to promptly change this default password. To do so, simply navigate back to the login screen and select the "Change password?" option. It's worth noting that access to AtmosphericX's API and streaming functionalities remains open to all users, even those without login credentials, unless specific address configurations have been applied to the API_ACCESS setting in the environment file.

🌧️ Account Creation

If a user wants to register a new username and password, the host must activate the account via the users.json file. Below is an example of how the users.json file might be structured. To activate an account, simply switch false to true on the account you would like to activate.

{
    "username": "root",
    "hash": "SBNJTRN+FjG7owHVrKtue7eqdM4RhdRWVl71HXN2d7I=",
    "activated": true
  },
  {
    "username": "test",
    "hash": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=",
    "activated": false
}

🌪️ API / Endpoints

Dashboards and Overlays

Dashboard: {ip}:{port} (ex. http://192.168.1.92:3000)

Stream Overlay: {ip}:{port}/stream/stream (ex. http://192.168.1.92:3000/stream/stream

Stream Portable: {ip}:{port}/stream/portable (ex. http://192.168.1.92:3000/stream/portable)

Stream Warnings: {ip}:{port}/stream/warnings (ex. http://192.168.1.92:3000/stream/warnings)

Backend Endpoints

All Alerts: {ip}:{port}/api/alerts (ex. http://192.168.1.92:3000/api/alerts)

Manual Alerts: {ip}:{port}/api/active_manual (ex. http://192.168.1.92:3000/api/active_manual)

Active Warnings: {ip}:{port}/api/active_warnings (ex. http://192.168.1.92:3000/api/active_warnings)

Active Watches: {ip}:{port}/api/active_watches (ex. http://192.168.1.92:3000/api/active_watches)

🌩️ Credits

This project was made possible by the following people. Please make sure to check them out and support them! <3

k3yomi (Project Maintainer)

About

AtmosphericX is a custom-built hosted project designed to fetch weather-related data from the National Weather Service (NWS) API. It is primarily used to provide weather information to users, whether they are individuals looking for local weather conditions or developers integrating weather data into their applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published