OTA-style parking intelligence API for connected vehicles.
ParkGuard evaluates curb rules in real time and returns a vehicle-ready decision (safe, caution, blocked) with explainable rule outputs and estimated ticket exposure.
Most navigation products show distance and routes, but not curb-level risk like:
- fire hydrant clearance
- alternate-side cleaning windows
- no-standing windows (e.g., 8:00-18:00 Mon-Fri)
- truck/loading-only restrictions
- taxi/FHV-only zones
- official vehicle-only zones
ParkGuard focuses on that last-mile parking intelligence problem as a B2B integration module.
- Rule evaluation for NYC parking contexts
- Aggregated decision output (
parking_decision) - Rule-level violation estimates (
violation_estimate) - Response-level ticket summary (
violation_summary) - Vehicle profile awareness:
vehicle_type:passenger | truck | taxi | fhvcommercial_plateagency_affiliation:none | police | fire | city | school
- Hydrant proximity checks (auto lookup + manual override)
- GPS accuracy fallback warning (
hydrant_uncertain) when hydrant lookup is inconclusive - In-memory TTL caching for upstream data calls
- Integration and unit test coverage
GET /parking-status
Example:
GET /parking-status?lat=40.7580&lon=-73.9855&radius=50&vehicle_type=passenger&commercial_plate=false&agency_affiliation=noneHigh-level response fields:
locationvehicle_profilerules[]parking_decisionviolation_summarydata_freshnessconfidencewarning
Full interactive docs:
http://127.0.0.1:8000/docs
Demo dashboard:
http://127.0.0.1:8000/demohttp://127.0.0.1:8000/system-health(cache stats + latest upstream status)
pip install -r requirements.txt
python -m uvicorn main:app --reloadRun tests:
python -m unittest discover -s tests -vThis repo includes render.yaml.
Start command:
python -m uvicorn main:app --host 0.0.0.0 --port $PORTViolation fine bands are configured in:
data/nyc_fines.json
This enables non-code updates to estimated fine ranges.
main.py- FastAPI app and endpoint orchestrationsign_parser.py- parking sign parsing and profile-aware rule conversiondecision_engine.py- aggregate parking decision scoring (safe/caution/blocked)meter_parser.py- meter record normalization into parking ruleshydrant_service.py- hydrant rule assembly and GPS fallback handlingrule_engine.py- recurring time-window logicproximity_engine.py- distance and clearance evaluationhydrant_lookup.py- nearest hydrant lookup from NYC Open Dataviolations.py- violation estimate and summary logicschemas.py- typed API modelscache_store.py- in-memory TTL cachedemo/index.html- in-car style UI mocktests/- integration + unit tests
MVP complete for portfolio/demo and early technical outreach.
Next engineering steps:
- parser refactor (
sign_parseranddecision_engineseparation) - richer school-zone time logic
- stronger geospatial rule normalization
- production-grade cache/index strategy