This isn't just a weather app; it's a statement piece for modern frontend development. By leveraging Glassmorphism, the interface floats above dynamic backgrounds with a frosted-glass aesthetic, changing moods based on real-time weather data.
Performance Metric: Powered by a robust React + TypeScript architecture, ensuring type safety, maintainability, and a lightning-fast user experience (60 FPS).
| Feature | Description |
|---|---|
| ๐จ Adaptive UI Engine | The interface is alive. It shifts color palettes seamlesslyโwarm amber for sunny days, cool slate for storms, and deep indigo for clear nights. |
| โก Intelligent Caching | Built with TanStack Query, the app caches weather data for 5 minutes. reduces API costs and provides instant data retrieval. |
| ๐ง Context Awareness | Auto-Location detects preferences, while History Memory remembers your last visited cities using persistent Local Storage. |
| ๐ Zero Layout Shift | Custom Skeleton Loaders mimic the final UI perfectly, preventing jarring layout jumps while data fetches. |
A clean, modular structure designed for scalability.
WEATHER-APP/
โโโ ๐ public/ # Favicons, Manifest, OG Images
โโโ ๐ src/
โ โโโ ๐ components/ # ๐งฉ Reusable UI Blocks
โ โ โโโ CityCard.tsx
โ โ โโโ CityHeader.tsx
โ โ โโโ CitySkeleton.tsx
โ โ โโโ ExtendedForecast.tsx
โ โ โโโ Footer.tsx
โ โ โโโ HourlyForecast.tsx
โ โ โโโ MainWeatherCard.tsx
โ โ โโโ SearchBar.tsx
โ โ โโโ SkeletonCard.tsx
โ โ โโโ StatsDisplay.tsx
โ โโโ ๐ extra/ # ๐ ๏ธ Utilities & API
โ โ โโโ Api.ts # OpenWeatherMap Endpoints
โ โ โโโ weatherUtils.ts # Gradient generators & Logic
โ โโโ ๐ images/ # ๐ผ๏ธ Static Assets
โ โ โโโ home-bg.jpg
โ โ โโโ profile.jpg
โ โโโ ๐ pages/ # ๐ Application Views
โ โ โโโ Home.tsx # Dashboard & Search
โ โ โโโ City.tsx # Detailed Analytics
โ โโโ App.tsx # Root Component
โ โโโ index.tsx # Entry Point & Providers
โโโ .env # Secrets
โโโ tailwind.config.js # Design System
Building this project was a deep dive into advanced React patterns.
- Hook Mastery: Deep implementation of
useMemoanduseCallbackfor referential stability. - Type Safety: Moving beyond
anywith strict interfaces (WeatherData,ForecastData). - CSS Alchemy: Pushing Tailwind to limits with arbitrary values and backdrop filters.
- CI/CD Ops: Automated deployment pipelines with Vercel.
Ready to run this on your machine?
1. Clone the Repository
git clone [https://github.com/chamikathereal/WEATHER-APP.git](https://github.com/chamikathereal/WEATHER-APP.git)
cd WEATHER-APP
2. Install Dependencies
yarn install
3. Configure Environment
Create a .env file in the root directory:
REACT_APP_WEATHER_API_KEY=your_openweather_api_key
4. Ignite the Server
yarn start
Undergraduate Software Engineer | Sri Lanka
"Code is poetry, and I'm just trying to make it rhyme." ๐
Last Updated: Saturday, July 05, 2025, 10:48 AM +0530
Built with โค๏ธ and โ by Chamika Gayashan. Star this repo if you found it useful! โญ

