Skip to content

LikeNmuFF/Weather-Forecast-Basilan

Repository files navigation

WeatherForcastBasilan

Developer-facing notes for the Philippine Weather Forecast System.

Purpose

This project is a JavaFX desktop application for weather monitoring, alert logging, weather history, charts, backup import/export, and simple user management.

For the full system documentation, see:

Stack

  • Java 21
  • JavaFX 21
  • Maven
  • SQLite
  • OkHttp
  • Gson
  • OpenWeatherMap API

Main Entry Point

  • Main class: com.basilanweather.Main
  • Startup flow:
    1. Splash screen
    2. Login/Register
    3. Main dashboard

Important Files

  • src/main/java/com/basilanweather/Main.java
  • src/main/java/com/basilanweather/MainDashboard.java
  • src/main/java/com/basilanweather/WeatherApp.java
  • src/main/java/com/basilanweather/DatabaseManager.java
  • src/main/java/com/basilanweather/ExportPanel.java
  • src/main/java/com/basilanweather/LogPanel.java
  • build-exe.ps1
  • fix-exe-launcher.ps1

Build Commands

Compile only:

mvn compile

Rebuild jar:

mvn package

Build the Windows executable app image:

powershell -ExecutionPolicy Bypass -File ".\build-exe.ps1"

Generated executable:

  • dist/BasilanWeather/BasilanWeather.exe

Developer Notes

  • The local database file is basilan_weather.db.
  • A default admin account is seeded automatically:
    • Username: admin
    • Password: admin123
  • Weather logs and alerts are stored locally in SQLite.
  • Export/import backup currently supports the CSV formats generated by this app.
  • The logs page includes history search by barangay, municipality, condition, and timestamp.
  • The app image build uses jpackage plus fix-exe-launcher.ps1 to patch JavaFX launcher settings.

Maintenance Notes

  • If the executable fails after a packaging change, rerun:
powershell -ExecutionPolicy Bypass -File ".\fix-exe-launcher.ps1"
  • If you add new JavaFX modules, update both:

    • pom.xml
    • fix-exe-launcher.ps1
  • If you rename the packaged app, also verify:

    • build-exe.ps1
    • fix-exe-launcher.ps1
  • If the weather API changes, update:

    • WeatherService.java
    • WeatherData.java

Important Warning For Developers

  • The OpenWeatherMap API key is currently hardcoded in WeatherService.java.
  • For production or public submission, move it to configuration or environment variables.
  • Do not commit sensitive replacement keys to a public repository.

If Someone Asks Questions About The Project

Use this order:

  1. Read this README.md first.
  2. Read docs/APP_DOCUMENTATION.md.
  3. Read docs/USER_MANUAL.md for user-facing operation steps.
  4. Read docs/EVALUATOR_QA.md for likely panel or evaluator questions.
  5. Check the relevant Java class in src/main/java/com/basilanweather/.
  6. Rebuild using build-exe.ps1 if the question is about packaging or the .exe.

Suggested Future Improvements

  • Move the API key out of source code
  • Add duplicate protection on backup import
  • Add delete/edit actions for users and logs
  • Add automated tests
  • Move the database file to a user app-data directory for packaged builds

Releases

No releases published

Packages

 
 
 

Contributors