🌦️ Weather Onchain AI App
📌 About the Project
I was inspired to create a weather application that goes beyond just showing the temperature.
The goal was to answer practical everyday questions like:
- “What should I wear?”
- “Is it a good day to go for a run?”
The Onchain aspect was inspired by the idea of creating a permanent, verifiable public record of environmental data.
While the current version focuses on the frontend, the project is built with the foundation to log weather data immutably on the blockchain.
⚙️ How I Built It
Tech Stack & Features:
- Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+)
- Used TailwindCSS (CDN) for rapid, responsive styling
- Used TailwindCSS (CDN) for rapid, responsive styling
- Dynamic Visuals:
- Custom CSS animations for immersive weather backgrounds
- JavaScript checks conditions (e.g.,
"Rain","Clouds") and applies matching animations
- Custom CSS animations for immersive weather backgrounds
- Real-Time Data (API):
- Integrated OpenWeatherMap API for:
- Fetching live weather data
- Smart city search with autocomplete (optimized via debounce)
- Integrated OpenWeatherMap API for:
- AI Assistant:
- A rule-based engine written in JavaScript
- Uses weather data + predefined logic to generate contextual advice
- A rule-based engine written in JavaScript
- Data Visualization:
- Chart.js bar chart showing frequency of searched weather conditions
- Chart.js bar chart showing frequency of searched weather conditions
- Blockchain Foundation:
- Project includes Ethers.js and a Hardhat environment (contracts, scripts)
- Lays groundwork for future on-chain weather logging
- Project includes Ethers.js and a Hardhat environment (contracts, scripts)
🚧 Challenges I Faced
API Rate Limiting
- City autocomplete made too many API calls
- Solved by adding a debounce function in JavaScript
- City autocomplete made too many API calls
Performant Animations
- Hundreds of CSS raindrops slowed UI
- Optimized animations for smooth rendering
- Hundreds of CSS raindrops slowed UI
AI Logic Complexity
- Needed useful, varied advice
- Built a nested rule structure considering multiple factors
- Needed useful, varied advice
🎓 What I Learned
- Asynchronous JavaScript: Effective use of
async/awaitand promises - Advanced CSS: Pure CSS-based animations + responsive layouts
- API Integration: Handling keys, rate limits, and parsing data structures
- DOM Manipulation: Dynamically updating UI elements without frameworks
- Project Scoping: Balancing ambitious features with practical delivery
- Rule-based AI as a lightweight substitute for backend
- Rule-based AI as a lightweight substitute for backend
Built With
- css
- html
- javascript
- node.js
- python
- tailwind


Log in or sign up for Devpost to join the conversation.