DEV Community

Ayush Kunkulol
Ayush Kunkulol

Posted on

I built a real-time Air Quality Index monitor from scratch β€” AtmoPulse 🌍

Hey everyone!

I'm a fullstack development learner and I just finished building one of my most ambitious projects entirely from scratch β€” no templates, no copied code. I'm really proud of how it turned out and would love to share it with the dev community!

It's called AtmoPulse β€” a real-time Air Quality Index (AQI) monitor for cities worldwide, built with a modern dark UI and interactive map.

πŸ”— Live Link : https://atmopulse.web.app
πŸ”— GitHub : https://github.com/itsAyush5/Project-9-AtmoPulse

What is AtmoPulse ?

Air quality is something most of us ignore until it becomes a problem. I wanted to build something actually useful β€” an app where anyone can search any city and instantly see how clean or polluted the air is, along with a detailed breakdown of what's in it.

✨ Features :

πŸ—ΊοΈ Interactive dark map with glow-effect AQI markers (Leaflet.js)
πŸ” City search with live autocomplete suggestions
πŸ“Š Detailed pollutant panel β€” PM2.5, PM10, O₃, NOβ‚‚, CO, SOβ‚‚ and more
🌀️ Live weather data β€” Temperature, Humidity, Wind, Pressure
πŸ“ˆ Session AQI trend chart with sparkline visualization
πŸ”” Custom AQI alerts with push notification support
πŸ•˜ Search history with quick re-search
πŸ‘€ Google Sign-In + Email/Password authentication (Firebase)
🏭 Multi-source data β€” WAQI + OpenAQ APIs combined
πŸ“± Fully responsive β€” works on mobile and desktop
⚑ Real-time refresh with cooldown timer

πŸ› οΈ Tech Stack

Technology Purpose
React 18 Frontend framework
Vite Build tool
Leaflet.js Interactive map
Firebase Hosting
WAQI + OpenAQ APIs Live AQI data
Google OAuth Authentication

😀 Challenges I Faced :

This is the part nobody talks about but honestly the most valuable part of building a project.

  1. Combining two different APIs
    WAQI and OpenAQ both return AQI data but in completely different formats. Getting them to work together and display consistently on the same map took a lot of trial and error. I had to write a normalization layer to map both responses into a single data structure.

  2. Leaflet.js + React
    Leaflet was originally built for vanilla JS, so integrating it cleanly into a React component lifecycle was tricky. Managing map instance references with useRef and avoiding duplicate map initialization took me a while to figure out.

  3. Firebase Authentication
    Setting up both Google Sign-In and Email/Password auth together, and then protecting certain features (like API key management) behind auth state was more complex than I expected. Learning how Firebase's onAuthStateChanged works and persisting auth state across refreshes was a big lesson.

  4. TypeScript learning curve
    Coming from JavaScript, TypeScript felt frustrating at first β€” especially typing API responses where the shape wasn't always predictable. But it saved me from so many bugs that I would have spent hours debugging otherwise.

πŸ’‘ What I Learned :

How to work with multiple external APIs and normalize their data
Managing complex state in React with TypeScript
Firebase authentication flows and security rules
Integrating map libraries into React properly
Building a fully responsive dark UI from scratch

What's Next ?

I'm planning to add historical AQI data charts and possibly city comparison features. Would love to hear what features you'd find most useful!

Feedback Welcome!

This is one of my biggest projects so far and I'd genuinely appreciate any feedback β€” whether it's about the code structure, TypeScript usage, UI/UX, or anything else. Don't hold back! πŸ™

πŸ”— Live Link : https://atmopulse.web.app
πŸ”— GitHub : https://github.com/itsAyush5/Project-9-AtmoPulse

Top comments (1)

Collapse
 
dev00932 profile image
Yusuke kimura

Thank you for posting this article.

I have over 6 years of experience in software development, but I have not worked on this type of project before. Through this project, I would like to learn more about the combination of Leaflet.js and React.

In your article, you mentioned that you did not use AI tools during development. In my opinion, this approach has both advantages and disadvantages. However, in today's development environment, avoiding AI tools is not always the best approach.

I believe that using AI tools effectively has become an essential part of modern software development. They can help improve productivity, accelerate learning, and assist in solving technical challenges more efficiently.

I appreciate your perspective and would be interested in discussing the technical topics and code implementation in more detail in the future.

Thank you for sharing your experience.