Skip to content

Spring Boot based backend system that analyzes weather conditions and generates observation suitability scores for astronomical observations.

Notifications You must be signed in to change notification settings

kadak25/astroplanner-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 AstroPlanner – Smart Observatory Weather & Observation Suitability System

AstroPlanner is a Spring Boot–based backend application that analyzes real-time weather conditions and calculates an observation suitability score for astronomical observations.

The system is designed to support observatories and astronomy teams by providing data-driven decisions on whether observation conditions are suitable at a given time and location.

Beyond its functional goal, AstroPlanner is built with a strong emphasis on production readiness, data reliability, and operational supportability.


🚀 Core Functionality

  • Fetches real-time weather data via WeatherAPI
  • Calculates an observation suitability score based on multiple parameters
  • Generates daily average scores and observation decisions
  • Persists observation data in PostgreSQL
  • Visualizes recent measurements via an interactive dashboard
  • Supports city-based weather selection
  • Provides API documentation via Swagger UI

📊 Observation Score Logic

The suitability score is calculated using the following factors:

  • Cloud coverage
  • Humidity
  • Wind speed
  • Temperature deviation from the ideal value (10°C)

Score Interpretation

  • 70+ → Suitable for observation
  • 50–69 → Moderate conditions
  • <50 → Not suitable for observation

This scoring logic is designed to be transparent and easily adjustable based on operational or scientific requirements.


🧠 Production & Support Perspective

AstroPlanner is designed with real-world application support and production operations in mind:

  • External API dependency handling (WeatherAPI availability)
  • Validation and normalization of incoming weather data
  • Structured logging for troubleshooting failed data fetches
  • Deterministic scoring logic for reproducible results
  • Database persistence for historical analysis and incident investigation
  • Clear separation between data fetching, scoring, and presentation layers
  • Environment-based configuration for different runtime setups

These considerations make the system debuggable and maintainable under production conditions where external data sources may fail or return unexpected values.


🧱 Technical Stack

  • Java 17
  • Spring Boot 3
  • Spring Data JPA
  • PostgreSQL
  • Chart.js
  • WeatherAPI
  • Swagger UI

▶️ Running the Application

Start the application:

mvn spring-boot:run

Dashboard

http://localhost:8080/api/weather/dashboard

Swagger UI

http://localhost:8080/swagger-ui/index.html


📌 Project Scope

AstroPlanner demonstrates:

  • Backend system design with external data integration
  • Deterministic business logic implementation
  • Data persistence and visualization
  • Production-aware error handling and observability

👤 Author

Mustafa Kadak
Application / Production Support Engineer (Entry-level)

About

Spring Boot based backend system that analyzes weather conditions and generates observation suitability scores for astronomical observations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages