Skip to content

Repository files navigation

Smart City OS

CI Python FastAPI LangGraph React PostgreSQL GCP

An operations desk for urban traffic: ingest → case → proposal → human decision → audit.

Live (GCP): https://web-llohwfu5ga-as.a.run.app — how it is hosted: docs/deploy-gcp.md.

A duty desk for traffic ops: the system proposes, the operator decides, every step is recorded.

Traffic samples arrive on one segment (crash-drop, speeding, jam). A code rule may open a case; the system can propose a drone look. An operator approves or rejects; the decision is recorded. Drone flight here is case state only — no vehicle or fleet integration.

Operations desk — case card with drone proposal and recent speeds

Demo

Setup, then make demo (migrate → api + worker + web → live sim until make stop). Details: docs/dev.md.

Hosted stack on push to main: docs/deploy-gcp.md. Local make demo stays the daily engineering path.

What this demonstrates

  • Idempotent event ingest that does not wait on the model
  • Async jobs for dispatcher / critic opinions
  • Case state machine; tool allowlist — agent proposes, only the operator changes drone status
  • Modular monolith (folders that could become services later)
  • Audit as data (operator decisions + model/tool calls), not stdout

Loop

flowchart LR
  Sim[Simulator] -->|events| API[API]
  API --> DB[(Postgres)]
  API -->|job| Q[jobs]
  W[Worker] -->|claim| Q
  W -->|opinions + model audit| DB
  W -.-> PB[playbooks]
  W -.-> LLM[LLM gateway]
  Web[Console] <-->|list / card / decide| API
  Op[Operator] -->|approve / reject| Web
Loading

Stack

Python / FastAPI / LangGraph · React (Vite) · PostgreSQL · Compose.
Details: docs/stack.md. Decisions: docs/adr/.

Horizons

Same loop, three depths. Details in docs/scope/.

Doc Meaning
01 MVP Smallest thing that runs — done
02 v1 First real shape, still one repo — current
03 North star Large high-load platform — orientation, not a sprint

Status

MVP (U1–U7) done. First v1 duty desk (V1-U1–V1-U7) done. Current cut: live shift desk. Progress: plan. Issues: cheslav-zhur/smart-city-os (pointers; contract stays in docs/).

Not in this cut

Kafka · microservices · multi-domain sensors · digital twin / map · drone fleet · citizen app · PostGIS.

If events/day blow up first: split ingest, move jobs off the Postgres table, keep the HITL write-path thin. Not coded as a bundle upfront.

Docs

About

Operations desk in the smart-city domain: events → case → proposal → human yes/no → audit. Live console on Cloud Run.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages