{"id":28324872,"url":"https://github.com/linkoucommander/air-quality-prediction-platform","last_synced_at":"2025-06-14T12:05:37.806Z","repository":{"id":294308711,"uuid":"980793505","full_name":"LinkouCommander/Air-Quality-Prediction-Platform","owner":"LinkouCommander","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-19T20:17:00.000Z","size":9130,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T21:23:57.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/LinkouCommander.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-05-09T18:15:25.000Z","updated_at":"2025-05-19T20:17:03.000Z","dependencies_parsed_at":"2025-05-19T21:34:11.804Z","dependency_job_id":null,"html_url":"https://github.com/LinkouCommander/Air-Quality-Prediction-Platform","commit_stats":null,"previous_names":["linkoucommander/air-quality-prediction-platform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FAir-Quality-Prediction-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FAir-Quality-Prediction-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FAir-Quality-Prediction-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FAir-Quality-Prediction-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinkouCommander","download_url":"https://codeload.github.com/LinkouCommander/Air-Quality-Prediction-Platform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinkouCommander%2FAir-Quality-Prediction-Platform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257498470,"owners_count":22554678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-05-25T19:13:24.174Z","updated_at":"2025-06-14T12:05:37.793Z","avatar_url":"https://github.com/LinkouCommander.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Air Quality Prediction System\n\n## Project Overview\nAn ML-based air quality prediction system built with React frontend, Node.js backend, and AWS Lambda services. The system collects, analyzes, and predicts air quality data for the Los Angeles area in real-time.\n\n## Repository Structure\n```\n.\n├── frontend/          # React frontend application\n\t├── src/           # css and js files\n\t\t├── ...        \n\t├── public\t\t   # images, icon, etc.\n\t\t├── ...\n\t├── .env\t\t   # environment variables, e.g. API keys\n├── backend/           # Node.js/Express backend server\n\t├── services/      # data collection and prediction\n\t\t├── ...\n\t├── models/\t\t   # database related\n\t\t├── ...\n├── air-lambda/        # AWS Lambda functions\n├── terraform/         # Infrastructure as Code\n├── manifest.md        # Project manifest file\n└── README.md          # This file\n```\n\n## Technical Requirements\n- Node.js \u003e= 14.x\n- MongoDB \u003e= 4.4\n- AWS CLI configured\n- Python 3.8+ (for Lambda functions)\n- npm or yarn package manager\n\n## Setup and Installation\n\n### Frontend Setup\n1. Navigate to frontend directory:\n```bash\ncd frontend\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Configure environment variables:\n```bash\ncp .env.example .env\n# Edit .env with your configuration\n```\n\n4. Start development server:\n```bash\nnpm start\n```\n\n### Backend Setup\n1. Navigate to backend directory:\n```bash\ncd backend\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Configure environment variables:\n```bash\ncp .env.example .env\n# Edit .env with your configuration\n```\n\n4. Start server:\n```bash\nnpm start\n```\n\n### Lambda Deployment\n1. Navigate to air-lambda directory:\n```bash\ncd air-lambda\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Configure AWS credentials:\n```bash\naws configure\n```\n\n4. Deploy Lambda function:\n```bash\n./deploy.sh\n```\n\n## Configuration Details\n\n### Environment Variables\nRequired environment variables for each component:\n\n#### Frontend (.env)\n```\nREACT_APP_API_URL=http://localhost:8080\nREACT_APP_MAP_API_KEY=your_map_api_key\n```\n\n#### Backend (.env)\n```\nMONGODB_URI=mongodb://localhost:27017/airquality\nPORT=8080\nAWS_REGION=us-west-2\n```\n\n#### Lambda (.env)\n```\nAWS_REGION=us-west-2\nMONGODB_URI=your_mongodb_uri\n```\n\n## API Documentation\n\n### Backend APIs\n- `GET /api/stations` - Get all monitoring station information\n- `POST /api/predict` - Get air quality predictions\n- `POST /api/area-stats` - Get area statistics\n- `POST /api/historical-data` - Get historical data\n\n### Lambda Functions\n- Hourly OpenAQ data synchronization\n- Historical data generation\n- Data cleanup\n\n## Testing and Validation\n\n### Current Testing Status\nThis project currently does not have a formal testing framework implemented. The system's functionality has been verified through:\n\n1. **Basic Functionality Verification**\n   - Manual verification of API endpoints through direct usage\n   - Basic system integration checks during development\n   - Ad-hoc testing of core features\n\n### Future Testing Improvements\nTo ensure system reliability and maintainability, the following testing implementations are recommended:\n\n1. **Unit Testing**\n   - Implement Jest for backend API testing\n   - Add React Testing Library for frontend components\n   - Create test cases for prediction algorithms\n\n2. **Integration Testing**\n   - Test API endpoints with proper test data\n   - Verify database operations\n   - Test Lambda function integration\n\n3. **End-to-End Testing**\n   - Implement Cypress for frontend testing\n   - Test complete user workflows\n   - Verify data flow between components\n\n4. **Performance Testing**\n   - Load testing for API endpoints\n   - Response time monitoring\n   - Database query optimization\n\n## Troubleshooting\n1. Check environment variable configuration\n2. Verify MongoDB connection\n3. Confirm API key validity\n4. Check Lambda function logs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkoucommander%2Fair-quality-prediction-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkoucommander%2Fair-quality-prediction-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkoucommander%2Fair-quality-prediction-platform/lists"}