{"id":50692804,"url":"https://github.com/rudra496/cityguardai","last_synced_at":"2026-06-09T04:33:40.239Z","repository":{"id":362754064,"uuid":"1243666838","full_name":"rudra496/cityguardai","owner":"rudra496","description":"CityGuard AI — Autonomous Urban Risk \u0026 Incident Response Agent | Google Cloud Rapid Agent Hackathon (Elastic Track)","archived":false,"fork":false,"pushed_at":"2026-06-05T19:24:56.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T20:06:14.691Z","etag":null,"topics":["ai-agent","elastic","google-cloud","hackathon","incident-response","nextjs","smart-city","typescript"],"latest_commit_sha":null,"homepage":"https://rudra496.github.io/cityguardai/","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/rudra496.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["rudra496"]}},"created_at":"2026-05-19T14:50:08.000Z","updated_at":"2026-06-05T19:25:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rudra496/cityguardai","commit_stats":null,"previous_names":["rudra496/cityguardai"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rudra496/cityguardai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudra496%2Fcityguardai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudra496%2Fcityguardai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudra496%2Fcityguardai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudra496%2Fcityguardai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rudra496","download_url":"https://codeload.github.com/rudra496/cityguardai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudra496%2Fcityguardai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34092260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["ai-agent","elastic","google-cloud","hackathon","incident-response","nextjs","smart-city","typescript"],"created_at":"2026-06-09T04:33:39.542Z","updated_at":"2026-06-09T04:33:40.234Z","avatar_url":"https://github.com/rudra496.png","language":"TypeScript","funding_links":["https://github.com/sponsors/rudra496"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# CityGuard AI\n\n### Autonomous Urban Risk \u0026 Incident Response Agent\n\n[![Live Demo](https://img.shields.io/badge/Live-Demo-blue?style=flat-square)](https://rudra496.github.io/cityguardai/dashboard/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green?style=flat-square)](./LICENSE)\n[![Next.js](https://img.shields.io/badge/Next.js-14-black?style=flat-square)](https://nextjs.org/)\n[![Google Cloud](https://img.shields.io/badge/Google_Cloud-Agent_Build-4285F4?style=flat-square)](https://cloud.google.com/)\n[![Elastic](https://img.shields.io/badge/Elastic-MCP-005571?style=flat-square)](https://www.elastic.co/)\n[![GitHub Pages](https://img.shields.io/badge/Deploy-GitHub_Pages-222?style=flat-square)](https://pages.github.com/)\n\n\u003c!-- ![CityGuard AI Dashboard](./docs/screenshot.png) --\u003e\n\n**Google Cloud Rapid Agent Hackathon — Elastic Partner Track**\n\n[Launch Dashboard](https://rudra496.github.io/cityguardai/dashboard/) · [View Source](https://github.com/rudra496/cityguardai) · [Author Portfolio](https://rudra496.github.io/site/)\n\n\u003c/div\u003e\n\n---\n\n## Overview\n\nCityGuard AI is an AI-powered multi-step agent that monitors real-time urban signals — crowd density, traffic flow, surveillance anomalies, and event feeds — to detect emerging risks, classify severity, and trigger automated incident response workflows.\n\nBuilt for the **Google Cloud Rapid Agent Hackathon (Elastic Partner Track)** by **Rudra Sarker**, a 3rd-year Industrial \u0026 Production Engineering student at **SUST** (Shahjalal University of Science and Technology), Sylhet, Bangladesh.\n\nThe agent follows a **Monitor → Detect → Decide → Act** pipeline:\n- **Google Cloud Agent Builder** — reasoning, correlation, and decision-making\n- **Elastic MCP** — real-time anomaly detection and signal ingestion\n- **MongoDB MCP** — incident logging and full audit trails\n- **GitLab MCP** — automated issue creation and response team dispatch\n\n---\n\n## Features\n\n- **Multi-Source Signal Ingestion** — Crowd telemetry, traffic cameras, IoT sensors unified through Elastic MCP\n- **AI-Powered Threat Detection** — Agent Builder uses chain-of-thought reasoning to identify patterns in real time\n- **Automated Severity Classification** — Every incident tagged High / Medium / Low with evidence and confidence scores\n- **Progressive Agent Reasoning** — Watch the agent think step-by-step with animated timeline in the dashboard\n- **Interactive City Map** — Visual zone risk grid with real-time severity coloring and pulse animations for high-risk areas\n- **Full Audit Trail** — Every decision and action logged via MongoDB MCP for post-incident review\n- **Instant Response Dispatch** — GitLab MCP auto-creates issues, assigns response teams, tracks SLA\n- **3 Realistic Scenarios** — World Cup Stadium (78K crowd), Mall Weekend (fire + security), Downtown Rush Hour (signal gridlock)\n- **Zero-Config Static Deploy** — Builds to pure HTML/CSS/JS, deploys on GitHub Pages with no server required\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Frontend | Next.js 14 (App Router), React 18, TypeScript |\n| Styling | Tailwind CSS (custom dark theme, animations, glow effects) |\n| Build | Static HTML export (`next export`) |\n| Deployment | GitHub Pages via GitHub Actions |\n| Agent Framework | Google Cloud Agent Builder |\n| Anomaly Detection | Elastic MCP |\n| Incident Storage | MongoDB MCP |\n| Issue Tracking | GitLab MCP |\n\n---\n\n## Architecture\n\n```\n┌──────────────────────────────────────────────────────────┐\n│                    CityGuard AI Agent                     │\n│                                                          │\n│  ┌──────────┐    ┌──────────┐    ┌───────────────────┐  │\n│  │ Elastic   │───▶│  Agent   │───▶│ MongoDB + GitLab  │  │\n│  │ MCP       │    │ Builder  │    │ MCP               │  │\n│  │           │    │          │    │                   │  │\n│  │ Ingest \u0026  │    │ Reason \u0026 │    │ Log incidents \u0026   │  │\n│  │ Detect    │    │ Decide   │    │ Create issues     │  │\n│  └──────────┘    └──────────┘    └───────────────────┘  │\n│                                                          │\n│  Monitor ──────▶ Detect ──────▶ Decide ──────▶ Act      │\n└──────────────────────────────────────────────────────────┘\n```\n\n### Agent Pipeline\n\n1. **Monitor** — Elastic MCP ingests real-time crowd, traffic, and surveillance feeds. Anomalies and threshold breaches trigger the agent.\n2. **Detect** — Agent Builder reasons over multi-source data to surface anomalies, calculate correlations, and classify risk severity.\n3. **Decide** — The agent evaluates context, cross-references historical patterns, and determines the optimal escalation path using chain-of-thought reasoning.\n4. **Act** — MongoDB MCP logs the incident with full sensor data. GitLab MCP creates issues and assigns teams. Responders are notified via webhooks.\n\n### Demo Mode\n\nThis demo uses client-side mock data structured identically to production pipeline output. The dashboard is fully interactive — select a scenario, click **Run Scenario**, and watch the agent reason through incidents in real time with progressive step-by-step reveal animation.\n\nAll data is structured for drop-in replacement with real Google Cloud Agent Builder and Elastic MCP integrations.\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js** 18+ (LTS recommended)\n- **npm** (comes with Node)\n\n### Installation\n\n```bash\ngit clone https://github.com/rudra496/cityguardai.git\ncd cityguardai\nnpm install\nnpm run dev\n```\n\nOpen [http://localhost:3000/cityguardai/](http://localhost:3000/cityguardai/) to view the landing page. Navigate to the Dashboard to run scenarios.\n\n### Scripts\n\n| Command | Description |\n|---------|-------------|\n| `npm run dev` | Start development server |\n| `npm run build` | Production static build (outputs to `./out`) |\n| `npm run start` | Preview production build locally |\n\nNo environment variables required — all data is self-contained and mocked.\n\n---\n\n## Deployment\n\n### GitHub Pages (automatic)\n\nThe project includes a GitHub Actions workflow that auto-deploys on every push to `main`:\n\n1. Push the repo to `github.com/rudra496/cityguardai`\n2. Go to **Settings → Pages → Source → GitHub Actions**\n3. The workflow builds and deploys automatically\n4. Live at `https://rudra496.github.io/cityguardai/`\n\n### Custom Domain\n\nIf using a custom domain, remove `basePath` from `next.config.mjs` and configure the domain in GitHub Pages settings.\n\n### Any Static Host\n\n```bash\nnpm run build\n# Upload the ./out directory to any static host (Netlify, Cloudflare Pages, etc.)\n```\n\n---\n\n## Project Structure\n\n```\ncityguardai/\n├── .github/workflows/\n│   └── deploy.yml              # GitHub Actions → GitHub Pages\n├── app/\n│   ├── globals.css             # Tailwind + animations + dark theme\n│   ├── layout.tsx              # Root layout + full SEO metadata + JSON-LD\n│   ├── page.tsx                # Landing page (hero, features, architecture, CTA)\n│   └── dashboard/\n│       └── page.tsx            # Interactive 3-panel dashboard\n├── components/\n│   ├── Navbar.tsx              # Sticky nav with Elastic Track badge\n│   ├── StatsBar.tsx            # Summary metric cards\n│   ├── IncidentList.tsx        # Animated incident cards with severity\n│   ├── CityMap.tsx             # 3×3 zone risk grid with pulse effects\n│   └── AgentLog.tsx            # Step-by-step reasoning timeline\n├── lib/\n│   └── scenarios.ts            # Type definitions + 3 full mock scenarios\n├── public/\n│   ├── robots.txt              # Search engine crawl rules\n│   └── sitemap.xml             # Sitemap for SEO\n├── package.json\n├── tsconfig.json\n├── next.config.mjs             # Static export + GitHub Pages basePath\n├── tailwind.config.ts          # Custom theme + animations\n├── postcss.config.mjs\n├── README.md\n└── LICENSE\n```\n\n---\n\n## SEO \u0026 Performance\n\n- Full OpenGraph and Twitter Card meta tags for social sharing\n- JSON-LD structured data (SoftwareApplication schema)\n- XML sitemap and robots.txt included\n- Static export = zero server cold starts = instant load\n- Tailwind CSS purged = minimal CSS bundle\n\n---\n\n## About the Author\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"120\"\u003e\n\n**Rudra Sarker**\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n3rd-year Industrial \u0026 Production Engineering student at **Shahjalal University of Science and Technology (SUST)**, Sylhet, Bangladesh.\n\nAI developer and hackathon builder with projects spanning **assistive technology** (SightlineAI — AI smart goggles for the blind, MIT Solve 2026 applicant), **STEM education** (ScienceLab 3D — 40+ interactive experiments), **mental health** (MindWell), and **sign language accessibility** (Team SignTalk — award-winning smart glove).\n\nCurrently participating in **Google Gen AI Academy APAC Cohort 2** and the **Google Cloud Rapid Agent Hackathon**.\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n**Links:**\n- Portfolio: [rudra496.github.io/site](https://rudra496.github.io/site/)\n- GitHub: [github.com/rudra496](https://github.com/rudra496)\n- Google Skills Profile: [skills.google](https://www.skills.google/public_profiles/ef0923da-68a6-4eee-97ad-6e2a37650e9d)\n- SightlineAI: [rudra496.github.io/sightlineai](https://rudra496.github.io/sightlineai/)\n\n---\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nBuilt by [**Rudra Sarker**](https://rudra496.github.io/site/) for the **Google Cloud Rapid Agent Hackathon**\n\n[Launch Demo](https://rudra496.github.io/cityguardai/dashboard/) · [View Code](https://github.com/rudra496/cityguardai) · [Author Portfolio](https://rudra496.github.io/site/)\n\n\u003c/div\u003e\n\n## Connect\n\n- [![GitHub](https://img.shields.io/badge/GitHub-rudra496-181717?logo=github)](https://github.com/rudra496)\n- [![LinkedIn](https://img.shields.io/badge/LinkedIn-rudrasarker-0A66C2?logo=linkedin)](https://www.linkedin.com/in/rudrasarker)\n- [![X/Twitter](https://img.shields.io/badge/X-@Rudra496-000000?logo=x)](https://x.com/Rudra496)\n- [![YouTube](https://img.shields.io/badge/YouTube-@rudrasarker9732-FF0000?logo=youtube)](https://youtube.com/@rudrasarker9732)\n- [![Dev.to](https://img.shields.io/badge/Dev.to-rudra__sarker-000000?logo=devdotto)](https://dev.to/rudra_sarker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudra496%2Fcityguardai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frudra496%2Fcityguardai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudra496%2Fcityguardai/lists"}