A powerful weather application built using C++ with TypeScript/Node.js integration to fetch real-time weather data from APIs. The application stores data locally for efficient access and provides comprehensive weather forecasting capabilities.
- 🌡️ Multi-scale forecasts (Hourly/Daily/Weekly)
- 📍 Location-based weather data
- 📊 Detailed metrics including:
- Temperature (avg/min/max)
- Humidity levels
- Wind speed
- Precipitation
- Air Quality Index (AQI)
- 💾 Local data storage (JSON & TXT formats)
- 🔄 Location management system
- 📅 Custom date forecast lookup
| Feature | Preview |
|---|---|
| Location Setting | ![]() |
| Main Menu | ![]() |
| Daily Forecast | ![]() |
| Alternate Location | ![]() |
src/
├── data/
│ ├── weather.json # Raw weather data in JSON format
│ └── weather_data.txt # Parsed data for C++ usage
├── fetchWeather.ts # TypeScript script to fetch & write weather data
└── main.cpp # Main C++ application
package.json # Node.js dependencies
tsconfig.json # TypeScript config
-
TypeScript Fetcher (
fetchWeather.ts):- Connects to weather API
- Saves raw data to
weather.json - Creates processed
weather_data.txtfor C++
-
C++ Application (
main.cpp):- Reads from
weather_data.txt - Provides interactive menu system
- Displays formatted weather data
- Reads from
- Node.js (v14+)
- C++ compiler (GCC, Clang, or MSVC)
- TypeScript (installed via npm)
-
Clone the repository:
git clone https://github.com/deadshotofficial/weather-app-cpp.git cd weather-app-cpp -
Install Node.js dependencies:
npm install
-
Fetch initial weather data:
npx ts-node src/fetchWeather.ts "Delhi, India" weather_data.txt -
Compile and run the C++ application: Compile and run
main.cppusing your preferred C++ compiler. org++ src/main.cpp -o weather_app ./weather_app
Contributions are welcome! Please fork the repository and create a pull request with your improvements.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Feel free to add more features or contribute!
Distributed under the MIT License. See LICENSE for more information.



