-
Fixed Docker image naming in CI/CD pipeline
- Removed hardcoded image name from
pom.xmlSpring Boot plugin configuration - Pipeline now properly overrides image name with
-Dspring-boot.build-image.imageNameparameter - Image will be correctly named as
ghcr.io/projekt-construct-x/wetter-appinstead ofinfo.eecc/weather - Fixes Docker registry push failures due to name mismatch
- Removed hardcoded image name from
-
Added GitHub Actions CI/CD pipeline
- Created
.github/workflows/build-and-push.ymlfor automated testing and Docker image building - Test job: Runs
mvn clean installon all commits (push to main/develop, PRs to main) - Build-push job: Only runs on push to main branch after tests pass
- Builds Docker image using Spring Boot buildpacks
- Pushes images to GitHub Container Registry (ghcr.io) with two tags:
- Commit SHA for unique identification
latesttag for main branch releases
- Includes Maven dependency caching for faster builds
- Created
-
Fixed Docker image build configuration
- Removed invalid buildpack reference (
gcr.io/paketo-buildpacks/java) from Maven Spring Boot plugin - Now uses default Paketo buildpacks for reliable container image creation
- Successfully builds Docker image
info.eecc/weather:0.0.1-SNAPSHOT
- Removed invalid buildpack reference (
-
Comprehensive unit test suite with mocked API responses
- Added Mockito dependency for API mocking
- Created
WeatherServiceTestwith mocked RestTemplate for unit testing external API calls - Created
WeatherControllerTestwith MockMvc for testing REST endpoints with mocked service layer - Created
GlobalExceptionHandlerTestfor testing error handling scenarios - Tests cover success scenarios, error conditions, validation failures, and API errors
-
Initial comprehensive notes documentation
- Created
.cursor/notes/directory with complete project documentation - Added
index.mdwith project overview and navigation - Added
architecture.mdwith technology stack and design patterns - Added
api_design.mdwith REST endpoint specifications and OpenAPI details - Added
external_services.mdwith Open-Meteo API integration documentation - Added
data_structures.mdwith DTO mapping and validation details - Added
error_handling.mdwith exception handling strategy - Added
configuration.mdwith deployment and build configuration
- Created
-
Core weather API functionality
- REST endpoint
/api/weather/currentfor weather data retrieval - Support for weather queries by geographic coordinates (latitude/longitude)
- Support for weather queries by city name with automatic geocoding
- Integration with Open-Meteo Weather API for current weather data
- Integration with Open-Meteo Geocoding API for city-to-coordinates conversion
- REST endpoint
-
API features
- Comprehensive input validation with coordinate range checking
- Mutual exclusion validation (coordinates OR city, not both)
- OpenAPI/Swagger documentation with interactive UI
- Detailed error responses with appropriate HTTP status codes
- Weather code translation to human-readable descriptions
-
Technical implementation
- Spring Boot 3.5.5 with Java 24
- Lombok for reduced boilerplate code
- Global exception handling with
@RestControllerAdvice - RESTTemplate for external API communication
- Bean validation for request parameters
- Docker support with Cloud Native Buildpacks
-
Data structures
CurrentWeatherDtowith comprehensive weather informationWeatherResponsefor Open-Meteo API mappingGeocodingResponsefor location lookup- WMO weather code mapping to descriptions
-
Configuration and monitoring
- Spring Actuator with health, info, and metrics endpoints
- Structured YAML configuration
- Production-ready Docker image configuration
- Comprehensive test script for API validation
-
Documentation
- OpenAPI 3.0 specification with examples
- Swagger UI for interactive API testing
- Error response documentation with examples
- Test script (
test-api.sh) for API validation