cThings Front-end Interview Task Instructions-1
cThings Front-end Interview Task Instructions-1
The aim of this front-end interview task is to create a simple single-page weather web application
using HTML, CSS and JavaScript. The web application will consist of a single web page that allows a
user to search for a city and return the current weather and temperature. This is a design and UX/UI
focused task so the interface should look good, provide a good user interface/experience as well as
being fully functional. The web application should work in the latest version of all cross-platform
modern web browsers (Firefox, Google Chrome).
Included with this task are weather icons (Designed by Freepik). You can use your own if preferred.
2. Task
2.1. DESIGN THE USER INTERFACE
Version 1.0 1
cThings Front-end Interview Task
The web application should retrieve weather data from a web API – the Open Weather API
(https://openweathermap.org) is recommended although other free APIs are available. You will need
to register and generate an API key to make requests.
• The API key can take between 10 minutes and 2 hours to be activated (if you get a 401 error
it probably hasn’t been activated yet)
• The basic API call for the Open Weather API looks like this (other endpoints are available):
• A list of weather conditions and icons for the Open Weather API can be found here:
https://openweathermap.org/weather-conditions
• The temperature returned by the Open Weather API is in Kelvin (you’ll need to convert it to
degrees Celsius)
The Open Weather API returns sunrise and sunset as Cambridge, UK SEARCH
unix timestamps. Using the Moment JS library
(https://momentjs.com/) – or an alternative if preferred –
compare the sunrise/sunset time to the current time to 15ºC
display the time until sunrise/sunset below the weather
and temperature (figure 2.3.1). This could be as simple as
sunset in 4 hours
“sunrise in 4 hours” or “sunset at 16:54”. Display sunrise if
night-time; display sunset if day-time. Figure 2.3.1
Cambridge, UK SEARCH
Change the background image, fade the background or
switch the theme of the page depending on whether it is
day-time or night-time in the city currently searched.
15ºC
sunrise in 4 hours
Figure 2.4.1
Version 1.0 2