A web app that scores any property's flood and wildfire risk using real climate data APIs and AI-generated explanations.
IRVINEHACKS-PROJECT/
βββ backend/
β βββ main.py β Nivedha (Melissa) + Sristi (FEMA/CalFire)
β βββ risk_scorer.py β You β scoring formula
β βββ ai_service.py β Cathryn β Gemini AI
β βββ .env β API keys β YOU MUST CREATE THIS (not in repo)
β βββ requirements.txt
βββ frontend/
β βββ index.html
β βββ style.css
β βββ app.js
βββ .gitignore
| Person | File | Task |
|---|---|---|
| You | risk_scorer.py |
Converts raw zone data into 0-100 risk scores |
| Nivedha | main.py β geocode() |
Melissa API β address to lat/lng |
| Sristi | main.py β get_flood_zone() + get_calfire_zone() |
FEMA + CalFire API calls |
| Cathryn | ai_service.py |
Gemini AI β explanation, probabilities, recommendations |
git clone https://github.com/your-org/your-repo.git
cd your-repocd backend
python -m venv venvActivate it:
- Mac/Linux:
source venv/bin/activate - Windows:
venv\Scripts\activate
pip install -r requirements.txtInside /backend, create a file called .env:
MELISSA_KEY=get_this_from_team
GEMINI_KEY=get_your_own_free_key
π Gemini key (Cathryn): get it free at https://aistudio.google.com β "Get API Key"
π Melissa key: get it from your teammate, everyone shares one
uvicorn main:app --reloadTest at http://localhost:8000 β should see {"message": "ClimateCheck API is running!"}
http://localhost:8000/risk?address=123 Main St, Irvine CA
Just open frontend/index.html directly in your browser. No extra server needed.
You (risk_scorer.py):
python risk_scorer.py
# should print {"flood": 90, "fire": 90, "overall": 90}Cathryn (ai_service.py):
python ai_service.py
# should print a JSON with explanation, recommendations, probabilitiesNivedha + Sristi (main.py functions):
Run the server and hit the /risk endpoint in your browser.
Work on your own branch β never commit directly to main:
git checkout -b feature/your-name-task
# do your work...
git add .
git commit -m "describe what you did"
git push origin feature/your-name-task
# open a Pull Request on GitHub to merge into main- Never commit
.envβ share keys over Discord/text - Always activate venv before running anything:
source venv/bin/activate - Backend runs on port 8000, frontend is just a static HTML file
- If you get a CORS error, make sure the backend server is running first