ParkSmart Enforcement Agent ๐Ÿ›ก๏ธ

ParkSmart Enforcement Agent is a professional-grade, tactical command center designed for automated parking enforcement using UniFi License Plate Recognition (LPR) technology. It provides real-time monitoring, AI-driven insights, and automated violation tracking for multi-site parking facilities.

๐Ÿ’ก Inspiration

The inspiration for ParkSmart came from the increasing complexity of managing large-scale parking facilities. Traditional manual enforcement is slow, prone to error, and difficult to scale. We wanted to leverage modern LPR technology and Generative AI to create a "Force Multiplier" for parking wardensโ€”giving them a high-tech command center that automates the mundane and highlights the critical.

๐ŸŽฏ What it does

ParkSmart transforms raw LPR data into actionable enforcement intelligence. It monitors vehicle entries and exits in real-time, automatically flags overstays based on site-specific rules, and provides a forensic-level view of every vehicle's history. Wardens can use the integrated Gemini AI assistant to query data naturally, such as "Show me all vehicles that have been here for more than 3 hours at Site A."

๐Ÿš€ Core Features

1. Tactical Command Dashboard

  • Real-Time Monitoring: Live feed of vehicle entries and exits across multiple sites.
  • Occupancy Tracking: Visual metrics for total active vehicles, overstays, and zone-specific occupancy rates.
  • Sector Alerts: Automated voice and visual notifications when a vehicle exceeds the permitted parking duration (e.g., 2-hour limit).
  • Multi-Site Relay: Centralized management for various parking locations with easy site-based filtering.

2. AI-Powered Intelligence

  • Gemini AI Assistant: Integrated AI for querying parking data, generating reports, and providing tactical advice.
  • Forensic Analysis: Detailed investigation views for specific license plates, including entry/exit history and violation evidence.
  • Automated Violation Detection: Intelligent logic to identify overstays and unauthorized entries.

3. Data Integration & Persistence

  • UniFi LPR Webhooks: Direct integration with UniFi Protect cameras for instant plate capture.
  • Gmail Parsing Engine: Automatically syncs LPR notifications received via email for historical data recovery and redundancy.
  • SQLite Persistence: Robust local storage for events, vehicle history, and violation records.

4. Enforcement Tools

  • Violation Manager: Backend logic for tracking and managing parking infractions.
  • Email Tool: Integrated communication system for sending enforcement notices or reports.
  • Connectivity Diagnostics: Built-in tools to verify gateway status and site-to-site relay health.

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 19, TypeScript, Tailwind CSS, Lucide Icons.
  • Backend: Python (FastAPI/Flask), SQLite.
  • AI Engine: Google Gemini (@google/genai).
  • Deployment: Docker, Cloud Run, Google Cloud Platform.
  • Visualization: Recharts for occupancy and traffic trends.

๐Ÿ—๏ธ How we built it

We built ParkSmart using a modular full-stack architecture. The frontend is a high-performance React application styled with a "Cyber-Tactical" aesthetic using Tailwind CSS. The backend consists of Python services that handle webhook ingestion, database management, and complex violation logic. We integrated the Gemini API to provide a natural language interface for data analysis, making the system accessible even to non-technical users.

๐Ÿšง Challenges we ran into

One of the biggest challenges was handling the asynchronous nature of LPR data. Webhooks can arrive out of order or be delayed. We implemented a robust synchronization engine that uses both direct webhooks and Gmail parsing to ensure no event is missed. Another challenge was creating a UI that felt "tactical" and informative without being overwhelming; we solved this through careful use of "glass-morphism" and high-contrast color schemes.

๐Ÿ† Accomplishments that we're proud of

  • Voice-Activated Alerts: Successfully implementing a system that "speaks" alerts to wardens, allowing them to keep their eyes on the field.
  • AI Integration: Creating a truly useful AI assistant that understands the context of parking enforcement.
  • Multi-Site Scalability: Designing the architecture to handle dozens of sites from a single interface.

๐Ÿ“– What we learned

We learned a great deal about the nuances of license plate recognition and the importance of data redundancy in IoT applications. We also discovered how much "personality" a tactical UI can have and how it impacts the user's sense of control and efficiency.

๐Ÿ”ฎ What's next for ParkSmart Enforcement Agent

The next phase for ParkSmart includes:

  • Predictive Analytics: Using AI to predict peak occupancy times and potential violation hotspots.
  • Mobile Warden App: A dedicated mobile interface for wardens on foot with AR plate scanning.
  • Automated Ticketing: Direct integration with municipal ticketing systems for end-to-end enforcement.

๐Ÿ“‚ Project Structure

  • /components: Reusable UI components (AIAssistant, Metrics, VehicleTable, etc.).
  • /services: Frontend API clients and LPR logic.
  • /templates: Backend HTML templates for detailed reports.
  • main.py: Primary backend entry point.
  • webhook_receiver.py: Dedicated handler for UniFi LPR webhooks.
  • violation_manager.py: Core enforcement and overstay logic.

๐Ÿ›ก๏ธ Security & Compliance

  • Role-Based Access: Designed for administrative and enforcement personnel.
  • Tactical UI: High-contrast, low-latency interface optimized for rapid decision-making.
  • Data Integrity: Forensic-grade logging of all vehicle movements.

Developed for ParkSmart Tactical Enforcement.

Built With

  • gcp-cloudassistant
  • gemini
  • googleaistudio
  • notebooklm
Share this project:

Updates