{"id":28873206,"url":"https://github.com/arssite/weatherapp-pm-accelerator","last_synced_at":"2026-04-20T03:34:17.111Z","repository":{"id":297202495,"uuid":"995983792","full_name":"arssite/WeatherApp-PM-Accelerator","owner":"arssite","description":"This repository contains the submission for the AI Engineer Intern – AI/ML/Gen AI Application Technical Assessment for Product Manager Accelerator (PMA). It includes both Tech Assessment 1 (Basic Weather App) and Tech Assessment 2 (Advanced CRUD + APIs) components.","archived":false,"fork":false,"pushed_at":"2025-06-04T16:36:03.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T05:18:37.437Z","etag":null,"topics":["fastapi","html-css-javascript","javascript","python3","react-vite","vercel-deployment"],"latest_commit_sha":null,"homepage":"https://weather-app-pm-accelerator-eight.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arssite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T09:35:44.000Z","updated_at":"2025-06-26T02:49:03.000Z","dependencies_parsed_at":"2025-06-04T17:03:15.510Z","dependency_job_id":"7a5f5d1d-5f79-4a55-9923-46a8786bd32a","html_url":"https://github.com/arssite/WeatherApp-PM-Accelerator","commit_stats":null,"previous_names":["arssite/weatherapp-pm-accelerator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arssite/WeatherApp-PM-Accelerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FWeatherApp-PM-Accelerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FWeatherApp-PM-Accelerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FWeatherApp-PM-Accelerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FWeatherApp-PM-Accelerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arssite","download_url":"https://codeload.github.com/arssite/WeatherApp-PM-Accelerator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arssite%2FWeatherApp-PM-Accelerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32031617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","html-css-javascript","javascript","python3","react-vite","vercel-deployment"],"created_at":"2025-06-20T15:14:06.882Z","updated_at":"2026-04-20T03:34:17.097Z","avatar_url":"https://github.com/arssite.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather App - PM Accelerator Technical Assessment\n\n\u003e **Created by:** Anmol Ratan Srivastava  \n\u003e **Portfolio:** [arssiteportfolio.netlify.app](https://arssiteportfolio.netlify.app/)  \n\u003e **LinkedIn:** [linkedin.com/in/anmol-r-srivastava](https://www.linkedin.com/in/anmol-r-srivastava/)  \n\u003e **GitHub:** [github.com/arssite](https://github.com/arssite) \u003cbr\u003e\n\u003e **Video Link** [Drive Link](https://drive.google.com/file/d/1POOvOL9gWYv1KbknsR_FMuYsKSqJ1lvf/view?usp=sharing)\n\nA full-stack weather application built for the PM Accelerator AI Engineer Intern position, featuring real-time weather data, CRUD operations, and database persistence.\n\n## 🌟 Features\n\n### Tech Assessment 1 (Completed)\n- ✅ **Location Input Flexibility**: Supports city names, zip codes, GPS coordinates, and landmarks\n- ✅ **Real-time Weather Data**: Fetches current weather from OpenWeatherMap API\n- ✅ **5-day Forecast**: Extended weather predictions\n- ✅ **Responsive Design**: Clean, user-friendly interface\n- ✅ **Weather Icons \u0026 Visualization**: Intuitive weather display\n\n### Tech Assessment 2 (Completed)\n- ✅ **CRUD Operations**: Full Create, Read, Update, Delete functionality\n- ✅ **Database Persistence**: Supabase PostgreSQL integration\n- ✅ **Date Range Validation**: Input validation for date ranges\n- ✅ **Location Validation**: Fuzzy matching and location verification\n- ✅ **Error Handling**: Comprehensive error management\n- ✅ **Data Export**: JSON format support (extensible to XML, CSV, PDF)\n\n## 🛠️ Technology Stack\n\n### Backend\n- **FastAPI** - Modern Python web framework\n- **Supabase** - PostgreSQL database with real-time features\n- **OpenWeatherMap API** - Weather data provider\n- **Pydantic** - Data validation\n- **HTTPX** - Async HTTP client \u003cbr\u003e\n![image](https://github.com/user-attachments/assets/aff892b8-e738-4c85-92e7-ffa6e397fc7d)\n![Screenshot 2025-06-04 210909](https://github.com/user-attachments/assets/bba748aa-e3b0-4a82-ae15-2501a4549237)\n\n### Frontend\n- **React** - Component-based UI library\n- **Vite** - Fast build tool and dev server\n- **CSS3** - Responsive styling\n- **Fetch API** - HTTP requests\n\n### Database\n- **PostgreSQL** (via Supabase) - Relational database\n- **Real-time subscriptions** - Live data updates\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Python 3.8+\n- Node.js 16+\n- OpenWeatherMap API Key\n- Supabase Account\n\n### Backend Setup\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/arssite/WeatherApp-PM-Accelerator.git\n   cd WeatherApp-PM-Accelerator/backend\n   ```\n\n2. **Install Python dependencies**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Environment Configuration**\n   Create a `.env` file in the backend directory:\n   ```env\n   SUPABASE_URL=your_supabase_project_url\n   SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key\n   OPENWEATHER_API_KEY=your_openweathermap_api_key\n   ```\n\n4. **Database Setup**\n   Create the following table in your Supabase dashboard:\n   ```sql\n   CREATE TABLE weather_requests (\n     id UUID DEFAULT gen_random_uuid() PRIMARY KEY,\n     location TEXT NOT NULL,\n     lat FLOAT,\n     lon FLOAT,\n     start_date DATE NOT NULL,\n     end_date DATE NOT NULL,\n     weather_data JSONB,\n     created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n   );\n   ```\n\n5. **Start the backend server**\n   ```bash\n   uvicorn main:app --reload --host 0.0.0.0 --port 8000\n   ```\n\n### Frontend Setup\n\n1. **Navigate to frontend directory**\n   ```bash\n   cd ../frontend\n   ```\n\n2. **Install Node.js dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Start the development server**\n   ```bash\n   npm run dev\n   ```\n\n4. **Access the application**\n   Open [http://localhost:5173](http://localhost:5173) in your browser\n\n## 📁 Project Structure\n\n```\nWeatherApp-PM-Accelerator/\n├── backend/\n│   ├── main.py              # FastAPI application\n│   ├── requirements.txt     # Python dependencies\n│   └── .env                 # Environment variables\n├── frontend/\n│   ├── src/\n│   │   ├── components/\n│   │   │   ├── WeatherForm.jsx\n│   │   │   └── WeatherForm.css\n│   │   ├── services/\n│   │   │   ├── api.js       # API calls\n│   │   │   └── supabaseClient.js\n│   │   ├── styles/\n│   │   │   └── app.css\n│   │   ├── App.jsx\n│   │   └── main.jsx\n│   ├── package.json\n│   └── vite.config.js\n└── README.md\n```\n\n## 🔧 API Endpoints\n\n### Weather Operations\n- `POST /create-weather/` - Create new weather request\n- `GET /weather/` - Get all weather records\n- `GET /weather/{id}` - Get specific weather record\n- `PUT /weather/{id}` - Update weather record\n- `DELETE /weather/{id}` - Delete weather record\n\n### Request/Response Examples\n\n**Create Weather Request:**\n```json\nPOST /create-weather/\n{\n  \"location\": \"New York\",\n  \"start_date\": \"2024-01-15\",\n  \"end_date\": \"2024-01-20\"\n}\n```\n\n**Response:**\n```json\n{\n  \"message\": \"Weather data saved successfully\",\n  \"data\": {\n    \"id\": \"uuid\",\n    \"location\": \"New York\",\n    \"lat\": 40.7128,\n    \"lon\": -74.0060,\n    \"weather_data\": {...}\n  }\n}\n```\n\n## 🎯 Key Features Implementation\n\n### 1. **Flexible Location Input**\n- Accepts various location formats (city, zip code, coordinates)\n- Automatic geocoding through OpenWeatherMap API\n- Location validation and fuzzy matching\n\n### 2. **Comprehensive Weather Data**\n- Current weather conditions\n- 5-day forecast\n- Temperature, humidity, wind speed, pressure\n- Weather descriptions and conditions\n\n### 3. **Full CRUD Operations**\n- **Create**: Add new weather requests with validation\n- **Read**: View all records with detailed weather information\n- **Update**: Edit location and date ranges\n- **Delete**: Remove records with confirmation\n\n### 4. **Data Validation**\n- Date range validation (start \u003c end)\n- Location existence verification\n- Input sanitization and error handling\n\n### 5. **User Experience**\n- Responsive design for mobile and desktop\n- Loading states and user feedback\n- Intuitive edit/delete operations\n- Collapsible raw data view\n\n## 🌐 Live Demo\n\n[Demo Video Link] - (https://drive.google.com/file/d/1POOvOL9gWYv1KbknsR_FMuYsKSqJ1lvf/view?usp=sharing)\n\n## 🔐 Environment Variables\n\n### Backend (.env)\n```env\nSUPABASE_URL=https://your-project-ref.supabase.co\nSUPABASE_SERVICE_ROLE_KEY=your_service_role_key\nOPENWEATHER_API_KEY=your_openweather_api_key\n```\n\n## 📦 Dependencies\n\n### Backend Requirements\n```\nfastapi\nuvicorn\npydantic\nsupabase\npython-dotenv\nhttpx\n```\n\n### Frontend Dependencies\n- React 18+\n- Vite\n- Standard web APIs (Fetch, DOM)\n\n## 🚀 Deployment Options\n\n### Backend Deployment\n- **Heroku**: Easy Python app deployment\n- **Railway**: Modern deployment platform\n- **DigitalOcean App Platform**: Scalable hosting\n- **AWS/GCP/Azure**: Cloud platform deployment\n\n### Frontend Deployment\n- **Netlify**: Automatic deployments from Git\n- **Vercel**: Optimized for React applications\n- **GitHub Pages**: Static site hosting\n\n## 🔍 Testing\n\n### Manual Testing Checklist\n- [ ] Submit weather request with city name\n- [ ] Submit weather request with zip code\n- [ ] Test date validation (invalid ranges)\n- [ ] Test location validation (non-existent places)\n- [ ] Edit existing weather records\n- [ ] Delete weather records\n- [ ] View detailed weather information\n- [ ] Test responsive design on mobile\n\n### API Testing\nUse tools like Postman or curl to test endpoints:\n```bash\n# Test weather creation\ncurl -X POST \"http://localhost:8000/create-weather/\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"location\":\"London\",\"start_date\":\"2024-01-15\",\"end_date\":\"2024-01-20\"}'\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is created for the PM Accelerator technical assessment. All rights reserved.\n\n## 📞 Contact\n\n**Anmol Ratan Srivastava**\n- Portfolio: [arssiteportfolio.netlify.app](https://arssiteportfolio.netlify.app/)\n- LinkedIn: [linkedin.com/in/anmol-r-srivastava](https://www.linkedin.com/in/anmol-r-srivastava/)\n- GitHub: [github.com/arssite](https://github.com/arssite)\n\n---\n\n**About PM Accelerator**: [Product Manager Accelerator](https://www.linkedin.com/school/pmaccelerator/) - Empowering the next generation of product managers through comprehensive training and real-world experience.\n\n## 🏆 Assessment Completion Status\n\n- ✅ **Tech Assessment 1**: Complete with all required and bonus features\n- ✅ **Tech Assessment 2**: Complete with CRUD operations and database persistence\n- ✅ **Bonus Features**: Advanced error handling, responsive design, data export capabilities\n- ✅ **Code Quality**: Clean, documented, and production-ready code\n\n---\n\n*This project demonstrates full-stack development capabilities, API integration, database management, and modern web application best practices as required for the PM Accelerator AI Engineer Intern position.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farssite%2Fweatherapp-pm-accelerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farssite%2Fweatherapp-pm-accelerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farssite%2Fweatherapp-pm-accelerator/lists"}