A Vue.js application that displays weather information using the Open Meteo API.
The site is available at: https://lukatavcer.github.io/open_meteo/
The application follows a modular architecture designed for scalability and maintainability:
-
API Layer: Handles communication with external services
httpClient.ts: Base HTTP client for making API requestsweatherService.ts: Weather-related API callslocationService.ts: Location-related API calls
-
Configuration: Centralizes application settings
api.ts: API endpoints and parameters
-
Constants: Application-wide constants
-
Types: TypeScript type definitions
-
Utilities: Helper functions and services
logger.ts: Centralized logging utility
- Add the endpoint to
src/config/api.ts - Create a new service function in the appropriate service file
- Use the
HttpClientfor making API requests
The logging system can be configured in src/main.ts:
import logger, { LogLevel } from "./utils/logger";
logger.configure({
level: import.meta.env.PROD ? LogLevel.ERROR : LogLevel.DEBUG,
prefix: '[Weather App]',
});# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildIcons used from weather-icons, licensed under the MIT License.