iv_ ← All projectsPT ↗
Web studies — APIs and states / Personal frontend study

Clima

Turn a city query into interface state.

HTMLCSSJavaScriptFetch APIJSONWeatherAPI
ENGINEERING / EVIDENCEInspected implementation

Flow summarized from the reviewed implementation. Details and limits are explained below; this visualization is not a production screenshot or proof of measured performance.

01City
02HTTP request
03JSON
04UI update
05feedback
01

Study proposal

Clima is a city-weather lookup page built with HTML, CSS and JavaScript. It explores a complete interaction: receiving a query, requesting data and updating presentation.

Information comes from an external API. This case concerns service consumption and visual experience, not modeling or generating original weather forecasts.

02

Input and requests

Click and Enter events initiate queries. City text is validated and encoded for the URL; fetch performs an asynchronous call and checks the response before JSON parsing.

Code also loads an initial city. These paths connect DOM events with data flow, distinguishing empty input, invalid responses and usable results.

03

Transformation and presentation

Responses distinguish location from current conditions. The interface updates city name, time and weather information, using textContent and time formatting to display values.

Transformation exposes a contract between received JSON and page elements. Provider changes may break that contract; defensive parsing and fixture tests would be useful extensions.

04

Loading and errors

Functions control loading, feedback and content updates. try/catch/finally completes query handling even on failures, preventing indefinite loading states.

Evolution could cancel outdated searches and prevent a slow response from replacing a newer query. The current flow is a simple study without advanced concurrent-request coordination.

05

CSS and configuration surface

CSS includes hover states, transitions and keyframes for entrance, errors and loading. These effects link motion to interaction states with low implementation overhead.

Integration uses client configuration. A public version needs access restrictions and server-side secret handling where necessary; this case reproduces no key values.

06

Skills and evolution

The study demonstrates DOM, events, async/await, HTTP, JSON, failure handling and visual feedback. Analysis inspected code without querying the provider or measuring API performance.

Next steps include protected configuration, cancellation, per-city caching, accessible feedback and parsing tests. The public repository exposes the exercise.

Explore the public repository ↗