Click: Here
A sleek and modern Weather App built with the following technologies:
- Next.js: For server-side rendering and building a highly performant React application.
- React: The core library for building user interfaces.
- TanStack Query: For efficient data fetching, caching, and state management of API data.
- ShadCN UI: For aesthetically pleasing and reusable UI components.
- Recharts: For interactive and dynamic data visualizations.
- Tailwind CSS: For utility-first and customizable styling.
- TypeScript: For type safety and improved developer experience.
- Real-time Weather Data: Get accurate and up-to-date weather information for any location.
- Dynamic Charts: Visualize weather data trends such as temperature, humidity, and precipitation with Recharts.
- Responsive Design: Optimized for both mobile and desktop screens.
- Dark Mode: Seamless dark mode integration for better accessibility.
- Search Functionality: Find weather details for any city worldwide.
- Caching: Efficient data caching and background updates using TanStack Query.
Ensure you have the following installed:
- Node.js (v16 or higher)
- npm or yarn package manager
-
Clone the repository:
git clone https://github.com/Ashutosh9110/Weather-App.git
-
Navigate to the project directory:
cd Weather-App -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root directory and add the following environment variables:VITE_OPENWEATHER_API_KEY=your_api_key_here
Get your free API from here: https://openweathermap.org/api
Replace
your_api_key_herewith your actual API key from the weather data provider. -
Start the development server:
npm run dev # or yarn dev
Weather-App/
├── public/ # Public assets (e.g., images, icons)
├── src/ # Source code
│ ├── components/ # React components
│ ├── assets/ # Static assets like images or styles
│ ├── hooks/ # Custom React hooks
│ ├── contexts/ # React context providers
│ ├── services/ # API service functions
│ ├── utils/ # Utility functions
│ ├── App.tsx/ # Main App component
│ └── main.tsx/ # Entry point for the application
├── .gitignore # Git ignore file
├── README.md # Project documentation
├── package.json # NPM package configuration
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
├── tailwind.config.js # Tailwind CSS configuration
├── postcss.config.js # PostCSS configuration
└── eslint.config.js # ESLint configuration
npm run dev: Start the development server.npm run build: Build the project for production.npm run start: Start the production server.npm run lint: Run ESLint to lint the codebase.
- Next.js: Server-side rendering and static site generation.
- React: Component-based architecture.
- Tailwind CSS: For styling and responsive design.
- ShadCN UI: For pre-built, customizable UI components.
- Recharts: Data visualization library for creating interactive charts.
- TanStack Query: For managing and caching server-side data.
- Strongly-typed language for improved reliability and developer experience.
-
Fork the repository.
-
Create a new branch for your feature:
git checkout -b feature/your-feature-name
-
Commit your changes:
git commit -m "Add your message here" -
Push to your branch:
git push origin feature/your-feature-name
-
Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Enjoy building with the Weather App! 🌤️