Welcome to the Weather App! This project is a modern weather application that dynamically fetches and displays real-time weather data. Built using cutting-edge web technologies, it showcases advanced styling, animations, and optimization techniques, making it an excellent example of a well-rounded front-end project.
This app provides users with:
- Real-time weather updates.
- A clean and responsive user interface.
- Advanced interactivity with seamless animations.
The project is designed with a focus on scalability, performance, and clean code principles such as SOLID and Object-Oriented Programming (OOP).
- Dynamic Weather Rendering: Fetches real-time weather data from APIs and updates the UI dynamically.
- Search Functionality: Allows users to search for weather updates by city.
- Custom CSS Variables: All colors, shadows, and styles are controlled using CSS variables for easy theme management.
- Responsive Design: Fully optimized for all screen sizes, from mobile devices to desktops.
- Backdrops and Blur Effects: Uses
backdrop-filter
for modern UI aesthetics.
- Custom Cursor: A fixed-position cursor enhances the UX.
- Progress Bar Animation: A unique progress bar with smooth animation using CSS
@keyframes
to indicate loading states. - GSAP Animations: Advanced animations for UI elements, making the app feel more dynamic and engaging.
- Error Handling: Friendly error messages for invalid inputs or failed data fetching.
- Utility Methods: Includes modular and reusable JavaScript utility methods for fetching data and manipulating the DOM.
- Text Shadows: Subtle text-shadow effects are applied for a clean yet impactful typography experience.
- Responsive Utility Classes: Custom media queries ensure smooth scaling and responsiveness.
- Accessibility Features: Text sizes, color contrasts, and focus states are optimized for readability and usability.
- Environmental Variables: Securely manage API keys using
.env
.
- Vite: Ultra-fast bundling and hot module replacement (HMR).
- HTML5, CSS3, JavaScript (ES6+).
- SOLID Principles: Code is modular and adheres to the Single Responsibility and Open-Closed principles, making it scalable and maintainable.
- Object-Oriented Programming (OOP): Key parts of the app, like data fetching and rendering, are encapsulated into objects and classes.
- Variables:
:root
color definitions.:root { --color-white: #ffffff; --color-background: #0f0f0f; --color-midPink: #ad1d45; --color-sunOrange: #fd702d; --color-limeGreen: #2c6e49; }
- Text Shadows: Subtle yet impactful typography.
- Backdrop Filter: Blurred elements create depth in the UI.
- Keyframe Animations:
@keyframes progress { from { width: 100%; } to { width: 0; } }
- GSAP: Smooth animations for enhanced interactivity.
- GitHub: Version control and collaboration.
- Vite Deploy: Ready-to-deploy build system.
- GitHub Pages: App hosted for easy access.
- OpenWeather API: Real-time weather data.
- dotenv: Secure environment variable management.
Color Name | Hex Code | Usage |
---|---|---|
White | #ffffff |
Primary text color. |
Background | #0f0f0f |
Main background color. |
Weather BG | #021526 |
Weather container background. |
Lime Green | #2c6e49 |
Buttons and active states. |
Mid Pink | #ad1d45 |
Error messages and highlights. |
Sun Orange | #fd702d |
Subtitles and accents. |
Sun Yellow | #fba834 |
Highlights and icons. |
- Node.js (v16 or higher)
- npm (v7 or higher)
- Clone the repository:
git clone https://github.com/yourusername/weather-app.git
- Navigate to the project directory:
cd weather-app
- Install dependencies:
npm install
- Create a
.env
file for your API keys:Example:touch .env
VITE_API_KEY=your_openweather_api_key
npm run dev
npm run build
- Dynamic Rendering: Efficiently updating the DOM based on API responses.
- Reusable Code: Utility methods and modular components improve maintainability.
- Performance Optimization: Leveraging Vite and lazy-loading assets.
- Modern CSS Features: Utilizing
backdrop-filter
and custom properties for sleek design. - Accessibility: Focus on color contrast, readable font sizes, and responsive layouts.
This Weather App project is a perfect showcase of technical expertise and creative design principles, making it an excellent addition to any portfolio.