This file contains project guidance for AI assisted development in SkyLuma.
It is not generated by Angular CLI.
SkyLuma is a weather forecast app built with Spring Boot and Angular.
The project is based on an older weather app, but it is not a direct migration. The goal is to build a cleaner and more modern version.
The project uses one repository:
SkyLuma/
backend/ Spring Boot REST API
frontend/ Angular app
Keep the app simple and easy to review.
Prefer small focused PRs instead of large rewrites.
Avoid extra abstractions unless they solve a real problem in the current code.
Use simple names and simple code.
The backend uses:
- Java 21
- Spring Boot
- Maven
- Lombok
- YAML config
- Package root
com.skyluma.weather
Use Lombok where it improves readability.
Do not commit API keys, secrets, tokens, or local environment files.
Use OPENWEATHER_API_KEY for the OpenWeather API key.
Run backend tests with:
cd backend
./mvnw testKeep backend code grouped by feature or provider where it makes sense.
Current main backend areas:
forecast/for the public weather API, DTOs, controller, service, and provider abstractionopenmeteo/for Open Meteo integrationopenweather/for OpenWeather integrationconfig/for application configcommon/for shared API and error handling code
Provider clients, DTOs, mappers, and provider classes should stay under their provider package.
Shared API response DTOs should stay under the forecast package.
SkyLuma currently supports:
- Open Meteo
- OpenWeather
Open Meteo is the default provider because it works without an API key for basic forecast data.
OpenWeather is optional and requires an API key.
The backend can choose a default provider from config.
The frontend can also send a provider for a single weather request.
Provider values should stay stable.
Use enums for provider API values instead of copying raw strings across the backend.
Supported provider values:
openmeteo
openweather
Weather alerts depend on the selected provider.
The current Open Meteo implementation gives forecast data, but it does not give official weather alerts.
OpenWeather can return alerts when the API returns them.
The frontend should not say that there are no alerts when the selected provider does not support alerts. It should show a clear message that alerts are not available from that provider.
Do not add JSON files or global helper classes just to move backend strings out of the code.
Inline backend exception messages are fine when they are used once.
Use private static final only when the same message or value is repeated in the same class.
Do not make frontend behavior depend on backend error message text.
If the frontend needs to react to specific backend errors later, add stable error codes instead of matching message strings.
Keep backend log and exception messages in English.
The frontend uses:
- Angular
- TypeScript
- SCSS
- Angular routing
- Standalone components
Keep feature code grouped under Angular feature areas.
Prefer:
- typed interfaces and models
- services for API calls
- components focused on UI and user interaction
- SCSS files for styling
Run frontend build with:
cd frontend
npm run buildKeep UI text in the frontend.
Do not move frontend labels to the backend.
Do not add translations until we actually need more languages.
If translations are added later, translate frontend labels and client facing error messages in the frontend.
Backend API responses should provide stable data and error codes, not translated UI text.
Run backend and frontend separately.
Backend:
cd backend
./mvnw spring-boot:runFrontend:
cd frontend
npm startBackend runs on:
http://localhost:8080
Frontend runs on:
http://localhost:4200
Angular sends /api requests to the backend during local development.
Run backend tests after backend changes:
cd backend
./mvnw testRun frontend build after frontend changes:
cd frontend
npm run buildFor changes that touch both backend and frontend, run both.
Keep pull requests small and focused.
Good examples:
fix: validate coordinate inputsfeat: show weather providerrefactor: centralize provider optionsdocs: update project documentation
Avoid mixing unrelated backend, frontend, and docs changes unless they are part of the same visible behavior.
When changing the backend API response, update the frontend models and services in the same PR if needed.
Prefer clear names over clever abstractions.
Prefer code that is easy to read and easy to review.