DEV Community

Pinak
Pinak

Posted on

How I Built a Weather App with Claude AI

There are already hundreds — probably thousands — of weather apps out there. Most of them try way too hard. They throw every possible chart, radar loop, hourly breakdown, and widget at you, even though you'll never use half of it.

I wanted the opposite.

I just wanted to open the app, take one look, and know right away: Is it actually nice outside? Do I need a jacket? Or am I good to go? That classic morning text everyone sends their group chat — "yo what's it feel like out there? I don't wanna open the door and get hit with reality."

That's the exact feeling I was chasing.

So I built it. Called it TruWeather. And yeah, Claude was basically my co-pilot the whole time.


The Problem Most Weather Apps Ignore

Weather apps love dumping data on you — dew point, barometric pressure, UV index, pollen counts, all that stuff. They act like more numbers = better product.

But that's not how people actually use them. You're half-awake at 7 a.m. just trying to figure out if you need a jacket. Or you're standing in a parking lot wondering if you should wait out the rain. Or you're planning a weekend and just want to know if the park is even worth it.

In those moments you don't need a fancy radar map. You need a straight answer.


What TruWeather Actually Does

One number from 0 to 100. One simple verdict: PERFECT, GREAT, DECENT, MEH, or SKIP IT.

That's the main screen. Clean and done.

But there's more going on behind it than it looks.


How the Nice Score Actually Works

It's not just averaging a bunch of numbers. It pulls live data from three decent forecast models — NOAA, ECMWF, and GFS — then looks at six things that really change how the weather feels:

🌡️ Temperature · 💧 Humidity · 🌫️ Dew Point · 💨 Wind · 🌧️ Rain Chance · ☁️ Cloud Cover

Each factor gets its own score, then they get weighted differently because some things hit harder than others. Like a 78°F day with 90% humidity and zero breeze just sucks. But a 62°F day with low humidity and a light wind? That feels great. The algorithm actually gets that difference.

I also built in confidence levels. When all three models are pretty much in agreement, you see high confidence. When they're fighting (NOAA calling for rain while ECMWF says clear skies), the score gets cautious and the "Why" line explains why.

The part I'm most proud of? It adapts to how you feel weather. There are three quick presets:

Preset What It Means
🌸 Delicate Flower You notice everything
🙂 Normal Human Standard thresholds
💪 Built Different Pretty much nothing bothers you

Plus sliders so you can dial in exactly how sensitive you are to heat, cold, humidity, or wind. Change your settings and the score updates right away.


The Chat Part

You can actually talk to the app. Ask whatever:

"Should I go running at 6?"
"Is tomorrow decent for a barbecue?"
"Any chance my flight out of JFK gets delayed?"

It runs on Claude Haiku with prompt caching. Crazy cheap — about four-tenths of a cent per question. Five bucks gets you around 12,500 questions. I didn't need the big GPT-4 model for this. Haiku is fast, cheap, and does the job really well when you give it the right info.

The prompt feeds it your current conditions, your personal settings, the forecast, and any alerts. So it answers like a friend who actually looked at the weather for you.

I didn't want to just drop people into a blank chat though — that feels intimidating. So I added two things:

  • Smart Quick Ask — three suggested questions that update based on the current weather and time of day.
  • Vibe Selector — categories like Dog Walk, Night Out, Running, Kids Outside, Weekend Plans. Tap one and it gives you a ready question.

UX Details That Actually Helped

The "Why" line under every score ended up being really important. Even on a 92 PERFECT day it might say something like "Low humidity, light breeze, clear skies. Today's the day." People seem to trust the number more when they can see a bit of reasoning.

I also put in a simple "How We Score" page that explains the models and the logic. Most people probably never open it, but just knowing it's there makes everything feel more honest.

Other stuff that stuck:

  • 📅 A clean 7-day forecast with daily scores only (no hourly overload)
  • 👕 A little clothing card that says jacket or no jacket, umbrella or sunglasses
  • 🚨 NOAA severe alerts that completely take over the screen if something bad is coming — safety first
  • 📤 Shareable verdict cards that people actually started posting
  • 👋 A soft onboarding nudge that just suggests setting your preferences if you're new

Dark mode was done properly — no ugly white flash when it loads. First visit gets a short branded splash screen, then it's instant after that.


The Tech (Kept It Stupid Simple)

Frontend     →  React 19 + Vite + Tailwind
Backend      →  Cloudflare Pages Functions (all edge, all serverless)
AI           →  Claude Haiku with prompt caching
Weather      →  Open-Meteo + NOAA + OpenWeatherMap (backup)
Storage      →  Upstash Redis (rate limits + quotas)
Hosting      →  Cloudflare Pages, auto-deploys from GitHub
PWA          →  Installable, works offline, pull-to-refresh
Enter fullscreen mode Exit fullscreen mode

At around 100 users the whole thing costs me like $2–3 a month.

Everything's serverless. No servers to keep alive, no database to manage.


Security (Yes, Even for a Dumb Weather App)

I've been doing this long enough to know you don't skip it.

IP rate limits, session limits on AI questions, weekly free quotas, circuit breakers if costs suddenly spike, proper security headers, API keys never exposed to the frontend, etc.

Even the limit message tries to stay on-brand:

"You're on a roll — 10 questions this week! Ko-fi keeps the lights on."


What Working with Claude Actually Looked Like

I didn't just copy code from it. I used it more like a really smart sounding board.

I rewrote the scoring logic probably a dozen times. I'd describe something like "the score should tank if humidity goes over 85% with no wind" and hash out the weights with Claude, then test weird edge cases like 100°F with zero humidity or 55°F with 30mph gusts.

Same thing with the chat prompt. Early versions sounded way too stiff and corporate. I kept going back and forth until it felt like a chill friend giving you weather advice.

Claude also helped me spot security stuff I might've missed and write all the tiny copy — error messages, limit walls, onboarding nudges, everything.

The whole app came out to about 10,400 lines. I merged 21 pull requests in one brutal weekend session. Most of it got built in 90-minute chunks after the kids were asleep.


The Branding Journey

Went through four different names before landing on TruWeather:

Is It Nice Outside → WeatherHaven → FastWeather → TruWeather

The verdicts started super edgy ("HELL YES" and "NOPE") before I settled on something calmer.

The tagline changed a few times too until it felt right: "weather without the clutter."

It wasn't big pivots. Just slowly making the words match what the app actually was.


The Launch

Dropped it on Product Hunt, X, and Reddit with zero followers and zero budget.

Checked Cloudflare's web analytics the next day and saw 200+ unique visitors had come through. For a solo launch with no audience, no ads, and no influencer shoutouts — that felt pretty good.

People found it because they were already complaining about complicated weather apps and someone linked it in a thread. Just a simple tool that fixed one specific annoyance.


What I Learned

AI doesn't replace your own thinking — it just makes the gap between idea and working product way shorter. You still have to know what you actually want.

The best features are usually the ones you decide not to add. Every time I cut another chart or radar layer, the app got better.

Simplicity only feels good when people can tell you put real thought behind it. That "How We Score" page helps a lot with that.

And honestly? Those quiet late-night hours matter. No big sprint plan. Just showing up consistently in the cracks of real life.


What's Next

I'm gonna keep building more small tools like this — one problem at a time.

If you want to follow along I'm @vibebuilder on X. Everything starts the same way: find the annoyance, fix it, ship it.

👉 Try TruWeather here: truweather.app


Built in the quiet hours, between chores, in the cracks of real life.

Top comments (0)