{"id":31363865,"url":"https://github.com/luaannguyen/phoenixproject","last_synced_at":"2025-09-27T05:27:28.253Z","repository":{"id":314660973,"uuid":"1056302246","full_name":"LuaanNguyen/PhoenixProject","owner":"LuaanNguyen","description":"Live Arduino wildfire sensor network with real‑time map, AI decisions, and analytics.","archived":false,"fork":false,"pushed_at":"2025-09-14T15:47:04.000Z","size":485,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-14T16:29:46.233Z","etag":null,"topics":["hackmit"],"latest_commit_sha":null,"homepage":"https://phoenix-project-seven.vercel.app/simple","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuaanNguyen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-13T19:56:26.000Z","updated_at":"2025-09-14T15:47:07.000Z","dependencies_parsed_at":"2025-09-14T16:29:50.353Z","dependency_job_id":null,"html_url":"https://github.com/LuaanNguyen/PhoenixProject","commit_stats":null,"previous_names":["arghunter/flamdirect","luaannguyen/phoenixproject"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/LuaanNguyen/PhoenixProject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaanNguyen%2FPhoenixProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaanNguyen%2FPhoenixProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaanNguyen%2FPhoenixProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaanNguyen%2FPhoenixProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuaanNguyen","download_url":"https://codeload.github.com/LuaanNguyen/PhoenixProject/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaanNguyen%2FPhoenixProject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277184148,"owners_count":25775286,"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","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"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":["hackmit"],"created_at":"2025-09-27T05:27:26.236Z","updated_at":"2025-09-27T05:27:28.244Z","avatar_url":"https://github.com/LuaanNguyen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phoenix Project\n\nLive Arduino wildfire sensor network with real‑time map, AI decisions, and analytics.\n\n![FlamDirect Map Screenshot](final_demo.jpg)\n\n### Stacks\n\n- **Frontend**: NextJS (App Router), React, TypeScript, Tailwind\n- **Mapping**: deck.gl, react-map-gl, MapLibre GL JS\n- **State Management/ Validation**: Zustand, Zod\n- **Visualization**: D3-scale, Recharts\n- **WebSocket**: Native WebSocket API with custom client\n- **Backend (simulation):** Python (asyncio, websockets, random, math, datetime/time)\n- **Build/Tooling/Infra:** Turbopack, ESLint/TS configs, Vercel (deploy)\n\n### Installation\n\n1. **Frontend**:\n\n   ```bash\n   cd FlamDirect/frontend\n   npm install\n   npm run dev\n   ```\n\n2. **Environment variables** (optional):\n\n   ```bash\n   cp .env.local.example .env.local\n   # Edit .env.local with your Mapbox token if desired\n   ```\n\n3. **WebSocket server** (in a separate terminal):\n\n   ```bash\n   node ../ws-mock.mjs\n   ```\n\n4. **Open your browser** to [http://localhost:3000](http://localhost:3000)\n\n## WebSocket Server\n\nThe app connects to a WebSocket server for live data. Use the included mock server for testing:\n\n```bash\nnode ws-mock.mjs\n```\n\nThe mock server:\n\n- Runs on `ws://localhost:8787/ws`\n- Simulates 15 sensors in NorCal foothills\n- Sends batch updates and individual sensor deltas\n- Occasionally simulates fire events with rising PM2.5 levels\n- Provides realistic sensor progression with random walk\n\n### WebSocket Message Format\n\n```typescript\n// Batch update\n{\n  type: \"batch\",\n  points: [\n    {\n      id: \"sensor_001\",\n      lat: 38.7,\n      lon: -121.3,\n      pm25: 45.2,        // μg/m³\n      humidity: 55.0,    // %\n      tempC: 24.5,       // °C\n      ts: 1699123456789  // epoch ms\n    }\n  ]\n}\n\n// Individual sensor update\n{\n  type: \"delta\",\n  point: { /* SensorPoint */ }\n}\n```\n\n## Map Configuration\n\n### Mapbox (Optional)\n\nSet `NEXT_PUBLIC_MAPBOX_TOKEN` in `.env.local` for Mapbox tiles:\n\n```bash\nNEXT_PUBLIC_MAPBOX_TOKEN=your_mapbox_token_here\n```\n\n### MapLibre (Default)\n\nWithout a Mapbox token, the app uses MapLibre with OpenStreetMap tiles (no token required).\n\n## EPA PM2.5 AQI Bands\n\n| Range (μg/m³) | Category                       | Color  | Description                                   |\n| ------------- | ------------------------------ | ------ | --------------------------------------------- |\n| 0 - 12.0      | Good                           | Green  | Air quality is satisfactory                   |\n| 12.1 - 35.4   | Moderate                       | Yellow | Acceptable for most people                    |\n| 35.5 - 55.4   | Unhealthy for Sensitive Groups | Orange | Sensitive individuals may experience problems |\n| 55.5 - 150.4  | Unhealthy                      | Red    | Everyone may experience problems              |\n| 150.5 - 250.4 | Very Unhealthy                 | Purple | Health alert: serious health effects          |\n| 250.5+        | Hazardous                      | Maroon | Emergency conditions                          |\n\n---\n\n**Built with ❤️ for HackMIT 2025**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluaannguyen%2Fphoenixproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluaannguyen%2Fphoenixproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluaannguyen%2Fphoenixproject/lists"}