Skip to main content

Command Palette

Search for a command to run...

Decoding My Weather App Solution: From Basic UI to Advanced Features

Journey from a Simple UI to a Complete Animated Weather App Experience

Updated
6 min read
Decoding My Weather App Solution: From Basic UI to Advanced Features

Building projects isn’t just about shipping the final product. It’s about the journey: the small iterations, the late-night bug fixes, the “aha!” moments when a feature finally clicks. For the Frontend Mentor Weather App Challenge, I wanted to document not only what I built but how I got there.

This article is a detailed breakdown of my process — how I started with a simple UI and gradually evolved it into a polished, feature-rich, and animated weather application.


1. Starting Simple: The Basic UI

Every project starts with a skeleton. For me, it was about translating the provided design mockups into a functional UI.

  • Tools I chose: React + Vite for speed, TailwindCSS for utility-first styling.

  • Why: I wanted a stack that would let me focus more on the logic and polish, not fighting with CSS boilerplate.

I built a basic search bar at the top and a container for displaying the city name, temperature, and a simple icon. Nothing fancy yet — just enough to validate that my components were structured well.

It was at this stage I realized the importance of modular components. I made separate components for things like WeatherCard, WeatherDashboard. This decision saved me a ton of time later on when features started piling up.


2. Bringing Weather Data to Life

Once the UI skeleton was ready, I moved to functionality. I integrated the Open-Meteo API, which doesn’t require an API key and provides generous endpoints for weather data.

Steps I took:

  1. Added a search function that uses geocoding to find latitude and longitude from a city name.

  2. Called the Open-Meteo API with those coordinates to get current, daily, and hourly weather data.

  3. Stored the results in React state and passed them down to child components.

This was the “aha” stage — when I first typed “New York” and saw a real temperature displayed, I felt like the project was alive.


3. UI Optimization and Responsive Design

With functionality in place, I shifted focus back to design. The challenge required the app to look great on all screen sizes, so I embraced mobile-first development using ShadnCn.

What I optimized:

  • Flexbox and Grid: Used Tailwind’s responsive utilities to align content differently on mobile vs desktop.

  • Scrollable hourly forecast: I wanted the hourly cards to scroll smoothly on smaller devices without affecting the whole page.

  • Consistent spacing and colors: Tailwind made it easy to stick to a palette (neutral grays for cards, vibrant accents for interactive states).

The goal here wasn’t just responsiveness — it was clarity. Weather data can get overwhelming, so I made sure each section (current weather, hourly forecast, weekly forecast) felt distinct but consistent using available components from the library.


4. Animating with GSAP: Adding Personality

Static UI can feel flat, so I wanted to bring in some motion. This is where GSAP came in.

I added a 5-second animated intro text and animates them onto the screen. This immediately gave the app personality and made it stand out from standard weather dashboards.

Why GSAP?

  • It’s more powerful and flexible than CSS animations.

  • It gave the app a “delight factor” that users remember.

This step turned the app from “functional” to “engaging.”


5. New Features: Going Beyond the Challenge

The original challenge requirements were solid, but I wanted to push further. Here’s what I added:

⭐ Favorites System

  • Users can mark a city as a favorite.

  • Favorites are stored in local storage, so they persist across sessions.

  • Easy toggle with a star icon — gold when active, gray when not.

➕ Compare Locations

  • Users can add multiple cities to a comparison list.

  • A React Toast pops up when you add a city:
    “Added London to comparison. Select another city too!”

  • Only unique cities are allowed (with error toasts for duplicates).

  • The bottom of the UI displays cities side-by-side for comparison.

📱 Progressive Web App (PWA) Support

  • Installed as an app on mobile devices.

  • Feels native with offline caching and app icons.

🎨 Toaster & UI Enhancements

  • Toast notifications styled with Tailwind: dark background, white text, rounded edges.

  • Scrollbar hidden within cards (not across the entire layout) for a clean look.

Each of these features made the app feel complete. Instead of just checking the weather, users could now interact with it, customize their view, and make it part of their workflow.


6. Challenges I Faced

Every project comes with bumps in the road. Here are the key ones:

  • Managing API Data Structures: Open-Meteo returns arrays of weather codes, temperatures, etc. Aligning hourly forecasts with daily dates required careful mapping.

  • Scroll Behavior: Making scrollbars visible only inside card containers (without affecting the page) took trial and error with Tailwind classes and custom utilities.


7. What I Learned

This project reinforced several lessons:

  • Start small: Don’t try to build everything at once. Begin with a working skeleton, then iterate.

  • Utility-first CSS scales: Tailwind helped me maintain design consistency while moving quickly.

  • Animations matter: Even subtle animations can make an app feel more professional.

  • Error handling is UX: Providing clear feedback (like toasts for duplicates) enhances user trust.

  • Push yourself beyond requirements: Adding features like favorites and compare lists showed me how to extend real-world apps.


8. Looking Back & Ahead

If I could restart this project, I’d:

  • Refactor some components to reduce prop drilling (maybe introduce Zustand or Redux for state).

  • Add accessibility audits (ARIA labels, better keyboard navigation).

  • Improve testing coverage with React Testing Library.

For future development, I’d love to add:

  • Weather backgrounds that change dynamically (e.g., rainy animations, sunny gradients).

  • Voice search for hands-free weather queries.

  • Air quality index and more advanced metrics.


9. Conclusion

The Weather App started as a straightforward UI challenge, but it became so much more. By layering functionality, refining design, and adding personal touches like animations and PWA capabilities, I created an app that I’m truly proud of.

More importantly, I walked away with deeper skills in:

  • API integration

  • Responsive design

  • UI/UX polish

  • Animations and delight

  • Extending projects beyond specs

If you’re working on a project like this, my advice is simple: embrace iteration. Start with the basics, make it work, then make it shine.

And most of all — enjoy the process. Because the best part of building is not just the app itself, but the growth that happens along the way.


✍️ Thanks for reading! If you’d like to see the live demo and code:


More from this blog

A

Aakib'z Studio

122 posts

I share practical insights on powerful development frameworks, focusing on Next.js for modern web apps and Flutter for efficient cross-platform mobile app development.