A complete, production-ready, subscription-based AI weather application for iOS and Android with intelligent weather insights powered by OpenAI.
- β Current temperature & conditions
- β Today's hourly forecast (24 hours)
- β 7-day daily forecast
- β Sunrise / sunset times
- β Basic wind & precipitation
- β Location auto-detect
- β Light/Dark mode
-
π© Advanced Forecasting
- 16-day weather forecast
- Minute-level rain prediction
- Severe weather alerts
- Storm tracking
-
π§ AI Weather Intelligence
- "What should I wear today?" outfit recommendations
- Travel weather risk analysis
- Outdoor activity recommendations with best times
- Health insights (heat stress, pollen risk, air quality impact)
- AI daily weather summary in natural language
-
π¬ Environment & Health
- Air Quality Index (AQI) with detailed breakdown
- UV exposure risk analysis
- Pollution component breakdown (PM2.5, PM10, NOβ, Oβ, etc.)
- Weather impact on asthma/allergies
-
π§³ Lifestyle & Planning
- Best time to go outside
- Best time to exercise
- Farming/weather advisory (rainfall, humidity)
- Marine & beach weather (coastal locations)
clima-ai/
βββ backend/ # Backend services
β βββ api/ # FastAPI main service
β β βββ app/
β β β βββ models/ # SQLAlchemy models
β β β βββ routers/ # API endpoints
β β β βββ services/ # Business logic
β β β βββ schemas/ # Pydantic schemas
β β βββ Dockerfile
β β βββ requirements.txt
β βββ payment-service/ # Node.js payment webhooks
β β βββ src/
β β β βββ routes/ # Apple & Google webhooks
β β β βββ index.js
β β βββ Dockerfile
β β βββ package.json
β βββ docker-compose.yml # Full stack orchestration
β βββ init.sql # Database schema
βββ android/ # Android Jetpack Compose app
βββ ios/ # iOS SwiftUI app
βββ docs/ # Documentation
-
Backend:
- Docker & Docker Compose
- Python 3.11+
- Node.js 18+
- PostgreSQL 15+
- Redis 7+
-
Mobile:
- iOS: Xcode 15+, Swift 5.9+
- Android: Android Studio, Kotlin 1.9+
-
API Keys:
- OpenAI API key (for AI insights)
- Apple Developer Account (for iOS)
- Google Play Developer Account (for Android)
- Clone the repository:
git clone <repository-url>
cd clima-ai/backend- Configure environment:
cd api
cp .env.example .env
# Edit .env with your OpenAI API key and other settings- Start all services:
cd ..
docker-compose up -d- Verify services:
# API health check
curl http://localhost:8000/health
# Payment service health check
curl http://localhost:3000/health- Access API documentation:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- Navigate to iOS project:
cd ios- Open in Xcode:
open ClimaAI.xcodeproj- Configure:
- Update
Bundle Identifierin project settings - Configure StoreKit products in App Store Connect
- Update product IDs in
SubscriptionManager.swift - Add required capabilities: Location, In-App Purchase
- Run on simulator or device
- Navigate to Android project:
cd android- Open in Android Studio:
studio .- Configure:
- Update
applicationIdinbuild.gradle - Configure Google Play Billing products
- Update product IDs in billing configuration
- Add required permissions in
AndroidManifest.xml
- Run on emulator or device
# Database
DATABASE_URL=postgresql+asyncpg://climaai:password@postgres:5432/climaai
# Redis
REDIS_URL=redis://redis:6379/0
# OpenAI
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4-turbo-preview
# JWT
JWT_SECRET=your-super-secret-key-min-32-chars
# App IDs
APPLE_BUNDLE_ID=com.climaai.app
GOOGLE_PACKAGE_NAME=com.climaai.appUpdate the following in Xcode:
- Bundle Identifier:
com.yourcompany.climaai - Team: Your Apple Developer Team
- Product IDs:
- Monthly:
com.yourcompany.climaai.monthly - Annual:
com.yourcompany.climaai.annual
- Monthly:
Update in build.gradle:
applicationId "com.yourcompany.climaai"Update product IDs in billing configuration to match Google Play Console.
GET /weather/current- Current weatherGET /weather/hourly- Hourly forecastGET /weather/daily- Daily forecastGET /weather/air-quality- Air quality data
GET /ai/insights- Complete AI insightsGET /ai/summary- Daily summaryGET /ai/outfit- Outfit recommendationGET /ai/activities- Activity suggestionsGET /ai/health- Health insights
POST /users/register- Register new userPOST /users/login- LoginGET /users/me- Get current userPUT /users/me- Update user
GET /subscriptions/status- Check subscriptionPOST /subscriptions/trial- Start 7-day trialPOST /subscriptions/activate- Activate subscriptionGET /subscriptions/plans- Get available plans
- Native SwiftUI interface
- StoreKit 2 integration
- CoreLocation for geolocation
- Offline caching
- Background weather updates
- Push notifications support
- Dark mode support
- Accessibility (VoiceOver, Dynamic Type)
- Material 3 design
- Google Play Billing Library 5
- FusedLocationProvider
- Room database for caching
- WorkManager for background updates
- Firebase Cloud Messaging
- Dark theme support
- TalkBack accessibility
cd backend/api
pytest tests/ -vcd ios
xcodebuild test -scheme ClimaAI -destination 'platform=iOS Simulator,name=iPhone 15'cd android
./gradlew test
./gradlew connectedAndroidTestDocker Compose (Production):
docker-compose -f docker-compose.prod.yml up -dIndividual Services:
# API
cd backend/api
docker build -t climaai-api .
docker run -p 8000:8000 --env-file .env climaai-api
# Payment Service
cd backend/payment-service
docker build -t climaai-payment .
docker run -p 3000:3000 --env-file .env climaai-paymentCloud Deployment:
- AWS: ECS/Fargate, RDS PostgreSQL, ElastiCache Redis
- Google Cloud: Cloud Run, Cloud SQL, Memorystore
- Azure: Container Apps, Azure Database, Azure Cache
-
Archive the app:
- Product β Archive in Xcode
-
Upload to App Store Connect:
- Distribute App β App Store Connect
-
Configure in App Store Connect:
- App metadata
- Screenshots
- Privacy information
- In-App Purchase products
-
Submit for review
- Generate signed APK/AAB:
cd android
./gradlew bundleRelease-
Upload to Google Play Console:
- Production track or Internal testing
-
Configure:
- Store listing
- Content rating
- Pricing & distribution
- In-app products
-
Submit for review
users
βββ id (UUID, PK)
βββ email (VARCHAR, UNIQUE)
βββ password_hash (VARCHAR)
βββ full_name (VARCHAR)
βββ preferences (JSONB)
βββ timestamps
subscriptions
βββ id (UUID, PK)
βββ user_id (UUID, FK)
βββ platform (VARCHAR)
βββ plan (VARCHAR)
βββ status (VARCHAR)
βββ trial_dates
βββ subscription_dates
βββ platform_specific_ids- JWT-based authentication
- Bcrypt password hashing
- HTTPS only in production
- Receipt validation (Apple & Google)
- Rate limiting
- SQL injection prevention (SQLAlchemy)
- XSS protection
- CORS configuration
- Request latency
- Error rates
- Cache hit rates
- API usage by endpoint
- User acquisition
- Subscription conversion
- Feature usage
- Crash reports
Recommended Tools:
- Backend: Prometheus + Grafana, Sentry
- Mobile: Firebase Analytics, Crashlytics
- Monthly Premium: $4.99/month
- Annual Premium: $39.99/year (33% savings)
- Free Trial: 7 days
- Apple: 30% for first year, 15% after
- Google: 15% for subscriptions
Proprietary - All rights reserved
This is a production application. For contributions, please contact the development team.
- Email: support@climaai.com
- Website: https://climaai.com
- Documentation: https://docs.climaai.com
- β Complete weather data integration (Open-Meteo)
- β AI-powered insights (OpenAI GPT-4)
- β Subscription management (Apple & Google)
- β iOS & Android apps
- β 7-day free trial
- β Offline caching
- β Background updates
- Weather widgets
- Apple Watch support
- Android Wear OS support
- Multi-location support
- Weather alerts push notifications
- Historical weather data
- Weather radar overlay
- Share weather snapshots
- Voice assistant integration
- Weather-based automations
- Hyperlocal forecasting
- AR weather visualization
- Community weather reports
- Advanced AI with GPT-5
- Gamification features
- Weather Data: Open-Meteo API
- AI: OpenAI GPT-4
- Icons: SF Symbols (iOS), Material Icons (Android)
- Backend: FastAPI, Express.js
- Mobile: SwiftUI, Jetpack Compose
Built with β€οΈ by the ClimaAI Team
