Skip to content

RyanLarge13/Native-Weather

Repository files navigation

🌤️ Expo Weather App

Built with Expo React Native License: MIT TypeScript SQLite Location API


📚 Table of Contents


📱 Features

  • 📍 Auto-detects device location using permissions
  • 🏙️ Supports static city selection from cities.json
  • 🌦️ Shows:
    • Current weather conditions
    • 24-hour hourly forecast
    • 7-day forecast
  • 🎨 Theme support (orange, blue, green)
  • 💾 SQLite-based settings storage (theme, temperature unit, accuracy)
  • 🎞 Animated transitions using Moti

🚀 Tech Stack


🧠 Architecture Overview

The app revolves around the Index screen which:

  • Initializes app state
  • Loads saved settings from SQLite
  • Requests and handles location permissions
  • Loads weather data from local dummy data or (optionally) an API
  • Renders:
    • Current weather (<Today />)
    • Weather details (<TodaysInfo />)
    • Hourly forecast (<Hourly />)
    • Weekly forecast (<Day />)

📂 Project Structure Highlights


.
├── assets/
│ ├── images/icons/ # Weather icons
│ └── cities.json # City coordinates map
├── components/
│ ├── Today.tsx
│ ├── TodaysInfo.tsx
│ ├── Hourly.tsx
│ └── Day.tsx
├── hooks/
│ └── useTabAnimation.ts
├── utils/
│ ├── api.ts
│ ├── dayStringMap.ts
│ ├── weatherCodes.ts
│ └── dummyData.ts
└── index.tsx # Main screen logic


🛠️ Setup & Usage

Prerequisites

  • Node.js
  • Expo CLI

Getting Started

git clone https://github.com/yourusername/weather-app.git
cd weather-app
npm install
npx expo start
  • Ensure your emulator or mobile device has location services enabled
  • The local SQLite database (myApp.db) should contain a Settings table

🧪 Notes

  • Weather data is loaded from utils/dummyData.ts

    You can replace M_FetchWeather() logic to call a real API (like OpenWeatherMap)

  • If location access is denied, the app falls back to manually selected cities


📸 Screenshots

(Add screenshots here if available) For example:

  • Today Screen
  • Weekly Forecast

📝 Future Improvements

  • 🌐 Replace dummy data with real-time API integration
  • 🧭 Fallback handling if location services fail
  • 🛠 Add user-facing Settings screen
  • 🌍 Multi-language (i18n) support

📄 License

This project is licensed under the MIT License.

About

Expo Router and Open Meteo join forces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors