Skip to content

srvjha/Ardoel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Bengaluru City Pulse Agentic Application

Tech Stack (Google AI Technologies Mandatory)

  • Backend: Node.js, TypeScript, Express.js, Firebase Functions, Firestore
  • AI/ML: Google Gemini (for synthesis, multimodal analysis, and predictive insights)
  • Validation: Zod (schema validation)
  • Deployment & Emulation: Firebase CLI, Firebase Emulators
  • Logging: Firebase Functions logger

Problem Statement

A bustling metropolis like Bengaluru generates millions of scattered data points every minute—from traffic updates and civic issues to spontaneous cultural events. This information is noisy, siloed across different platforms, and becomes outdated almost instantly. The challenge is not just to report news, but to find the signal in the noise and create a living pulse of the city.

Objective

Build an agentic application that provides a live, synthesized, and intelligent view of the city. The agent should:

  • Fuse Disparate Data: Ingest real-time data from multiple sources (e.g., social media feeds, user-submitted reports). Use Gemini to synthesize multiple reports into a single, actionable summary.
  • Enable Multimodal Citizen Reporting: Allow users to submit geo-tagged photos or videos of events. Use Gemini's multimodal capabilities to analyze, categorize, describe, and map these events.
  • Create a Predictive & Agentic Layer: Analyze event streams to provide predictive alerts and intelligent notifications, powered by Gemini.
  • Visualize the Pulse: Present synthesized information on a real-time, map-based dashboard with a scalable Firebase backend. (Bonus: Analyze public sentiment for a "mood map".)

Current Progress

1. Backend API (Firebase Functions + Express)

  • Project Structure:

    • All backend code is under backend/functions/src.
    • TypeScript is used for type safety and maintainability.
  • Endpoints Implemented:

    • POST /report/submit-report: Accepts user-submitted reports with geo-location, type, source, and optional media URL.
    • GET /: Health check endpoint.
    • GET /health-check: Additional health check endpoint.
  • Report Submission Flow:

    • Validates incoming report data using Zod schemas.
    • Handles errors gracefully and returns structured API responses.
    • Stores validated reports in Firestore with a timestamp.
  • Error Handling:

    • Centralized error middleware for consistent API error responses.
  • Utilities:

    • Async handler for Express routes.
    • Zod error handler for user-friendly validation errors.

2. Firestore Setup

  • Security Rules:
    • Temporary open rules for development.
  • Indexes:
    • Placeholder for custom indexes.

3. Development & Deployment

  • Scripts:
    • Linting, building, serving, deploying, and logs.
  • Emulator Support:
    • Local development with Firebase Emulators for Functions and Firestore.

Next Steps

  • Integrate Google Gemini:
    • Synthesize multiple reports, analyze media, and provide predictive insights.
  • Frontend Dashboard:
    • Build a real-time, map-based dashboard to visualize city events and summaries.
  • Multimodal Analysis:
    • Enable photo/video uploads and analysis via Gemini.
  • Predictive & Agentic Features:
    • Implement predictive alerts and intelligent notifications.
  • Sentiment Analysis:
    • Analyze public sentiment for mood mapping.

Getting Started

  1. Install dependencies:

sh cd backend/functions npm install

  1. Run locally with emulators:

sh npm run serve

  1. Deploy to Firebase:

sh npm run deploy


File Structure Overview

  • backend/functions/src/index.ts: Express app entry point, route registration, Firebase initialization.
  • backend/functions/src/routes/report.route.ts: Report submission route.
  • backend/functions/src/controllers/report.controller.ts: Report submission logic.
  • backend/functions/src/schemas/report.schema.ts: Zod schema for report validation.
  • backend/functions/src/types/report.type.ts: TypeScript types for reports.
  • backend/functions/src/utils: API response, error handling, async utilities.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published