Skip to content

Pranav-Karra-3301/FloridaSOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

55 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HackPSU Logo

HackPSU Fall 2024

πŸ‘‘ Overall 1st Place Winner πŸ‘‘

(Submitted As) Hurricane Warning Dashboard

Next.js React TypeScript Tailwind CSS

πŸ“‹ Table of Contents

  1. Introduction
  2. Repository Structure
  3. Key Components
  4. Data Sources
  5. Customization
  6. Setup and Deployment
  7. Using as a Template

🌟 Introduction

This repository contains a comprehensive Hurricane Warning Dashboard, designed to provide real-time information and resources during hurricane emergencies. Built with Next.js and utilizing various data sources, this dashboard offers a centralized platform for emergency information, news updates, and local resource mapping.

This project serves as a powerful template that can be quickly adapted and deployed, enabling the creation of an all-in-one emergency dashboard capable of serving millions of people within minutes of a crisis.

🚧 Repository Structure

/
β”œβ”€β”€ website/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ fonts/
β”‚   β”‚   β”œβ”€β”€ globals.css
β”‚   β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ Data/
β”‚   β”‚   β”œβ”€β”€ Site/
β”‚   β”‚   β”œβ”€β”€ evac_alerts.py
β”‚   β”‚   β”œβ”€β”€ evac_alerts.txt
β”‚   β”‚   β”œβ”€β”€ food_pantries.json
β”‚   β”‚   β”œβ”€β”€ gas_stations_hillsborough.json
β”‚   β”‚   β”œβ”€β”€ hillsborough_timeline.json
β”‚   β”‚   β”œβ”€β”€ hospitals_hillsborough.json
β”‚   β”‚   β”œβ”€β”€ hotels_hillsborough.json
β”‚   β”‚   β”œβ”€β”€ news.py
β”‚   β”‚   β”œβ”€β”€ power_outages.json
β”‚   β”‚   β”œβ”€β”€ shelters_with_google_maps.json
β”‚   β”‚   β”œβ”€β”€ summaries.json
β”‚   β”‚   └── tampa.json
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── [various image and asset files]
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ next.config.mjs
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ postcss.config.js
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ tailwind.config.ts
β”‚   └── tsconfig.json
└── README.md

🧩 Key Components

  1. Main Dashboard (page.tsx)

    • Location: website/app/page.tsx
    • Description: The core component rendering the entire dashboard interface.
    • Key sections:
      • Hurricane category and wind speed indicators
      • Emergency information box
      • News summary and latest updates
      • Hurricane tracking maps
      • Power outages information
      • Available services (hotels, gas stations, shelters, etc.)
      • Resources and emergency preparedness checklist
  2. Data Fetching and Processing

    • Location: website/Data/
    • Key files:
      • evac_alerts.py: Fetches evacuation alerts from FEMA API
      • news.py: Retrieves and processes news articles
      • Site/PowerOutages.py: Scrapes power outage data
      • Site/FindHospitals.py: Gathers hospital information
  3. Styling

    • Location: website/app/globals.css
    • Description: Contains global styles and custom animations
  4. Layout and Metadata

    • Location: website/app/layout.tsx
    • Description: Defines the overall layout and metadata for the application

πŸ“Š Data Sources

The dashboard utilizes various JSON files to populate its content:

  1. gas_stations_hillsborough.json: Gas station locations
  2. hotels_hillsborough.json: Hotel information
  3. shelters_with_google_maps.json: Shelter locations with Google Maps links
  4. food_pantries.json: Food pantry information
  5. hospitals_hillsborough.json: Hospital data
  6. power_outages.json: Current power outage statistics
  7. tampa.json and summaries.json: News articles and summaries

These files are located in the website/Data/ directory and are loaded dynamically by the application.

🎨 Customization

To customize the dashboard for a different location or disaster type:

  1. Update the JSON files in the website/Data/ directory with relevant information.
  2. Modify the page.tsx file to reflect the new disaster type and location-specific details.
  3. Adjust the styling in globals.css if needed.
  4. Update images and assets in the public/ directory.

πŸš€ Setup and Deployment

  1. Clone the repository
  2. Navigate to the website/ directory
  3. Install dependencies: npm install
  4. Run the development server: npm run dev
  5. Build for production: npm run build
  6. Deploy the out/ directory to your preferred hosting platform

πŸ”„ Using as a Template

This repository can be easily forked and customized for any disaster or emergency situation:

  1. Fork the repository to your GitHub account.
  2. Clone your forked repository locally.
  3. Update the JSON files in website/Data/ with information relevant to your specific emergency or location.
  4. Modify the page.tsx file to reflect the new disaster type and location-specific details. Key areas to update include:
    • Title and description (lines 58-61)
    • Emergency information (lines 14-32)
    • Hurricane tracking section (if applicable, lines 207-242)
    • Available services section (lines 334-503)
  5. Update images in the public/ directory with relevant maps and visuals.
  6. Customize the styling in globals.css if desired.
  7. Update the README.md file with information about your specific implementation.
  8. Deploy your customized dashboard following the setup instructions above.

By following these steps, you can have a fully functional emergency dashboard up and running in minutes, tailored to your specific needs and location.

This template provides a solid foundation for creating emergency information hubs quickly and efficiently, allowing for rapid deployment during critical situations.

About

HackPSU 2024 πŸ‘‘ Overall 1st Place Winner πŸ‘‘

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors