How sandesh339/gtfs_idea works
The product is a GTFS feed-editing chatbot with a web workspace, plus a controlled benchmark comparing function-calling and code-generation edits. The main flow is upload or load a feed, route a request to lookup, clarification, function calling, or code generation, then validate and present the result. The graph also preserves the documented benchmark and session-persistence branches. Some implementation files were not sampled; their links are included only where the SOURCE INDEX or README supports them.
Main entry points: App.jsx Chat and views · app.py FastAPI routes · chat.py Chat orchestration · run_benchmark.py FC vs codegen benchmark
Components 27
Web workspace
- Chat and views
frontend/src/App.jsx - API client
frontend/src/api.js - Chat panel
frontend/src/components/ChatPanel.jsx - Map, tables, diff
frontend/src/components/MapView.jsx - Validation view
frontend/src/components/ValidationView.jsx - Browser code runner
frontend/src/lib/pyodideRunner.js
Sessions and API
- FastAPI routes
server/app.py - Session lifecycle
server/sessions.py - Session storage
server/storage.py - Request authorization
server/auth.py
GTFS editing
- Chat orchestration
gtfs_tools/chat.py - Request router
gtfs_tools/router.py - Read-only lookup
gtfs_tools/query.py - Function-call executor
gtfs_tools/executor.py - Code generation
gtfs_tools/codegen.py - GTFS tools
gtfs_tools/tools.py - GTFS feed model
gtfs_tools/feed.py
Benchmark and grading
- Benchmark scenarios
benchmark_scenarios.py - Scenario runner
gtfs_tools/scenarios.py - FC vs codegen benchmark
run_benchmark.py - Expected outcomes
oracle.py - Outcome grading
gtfs_tools/grader.py - Entity-level diff
gtfs_tools/diffing.py - GTFS validation
gtfs_tools/gtfs_validator.py
External services
- LLM client
gtfs_tools/llm.py - Official validator
validator-service/app.py
Other components
- Transit editor
Connections 41
- Transit editor → Chat and views: edits feed
README.md - Chat and views → API client: calls API
frontend/src/App.jsx - Chat and views → Chat panel: renders
frontend/src/App.jsx - Chat and views → Map, tables, diff: renders
frontend/src/App.jsx - Chat and views → Validation view: renders
frontend/src/App.jsx - Chat and views → Browser code runner: runs code
frontend/src/App.jsx - API client → FastAPI routes: sends requests
- FastAPI routes → Request authorization: protects routes
server/app.py - FastAPI routes → Session lifecycle: loads sessions
server/app.py - FastAPI routes → Session storage: configures backend
server/app.py - Session lifecycle → Session storage: persists state
server/sessions.py - Session lifecycle → Chat orchestration: reconstructs chat
server/sessions.py - FastAPI routes → Chat orchestration: handles requests
server/app.py - FastAPI routes → GTFS validation: validates feeds
- Chat and views → FastAPI routes: commits feed
- Chat orchestration → Request router: routes request
gtfs_tools/chat.py - Chat orchestration → Read-only lookup: dispatches lookup
gtfs_tools/chat.py - Chat orchestration → Function-call executor: dispatches edits
gtfs_tools/chat.py - Chat orchestration → Code generation: dispatches generation
gtfs_tools/chat.py - Chat orchestration → Entity-level diff: computes changes
gtfs_tools/chat.py - Request router → LLM client: requests decision
gtfs_tools/router.py - Read-only lookup → GTFS tools: dispatches read tools
gtfs_tools/query.py - Read-only lookup → LLM client: runs lookup loop
gtfs_tools/query.py - Function-call executor → GTFS tools: dispatches tools
gtfs_tools/executor.py - Function-call executor → LLM client: requests tool calls
gtfs_tools/executor.py - Code generation → LLM client: generates program
gtfs_tools/codegen.py - Function-call executor → GTFS feed model: edits feed
gtfs_tools/executor.py - GTFS tools → GTFS feed model: reads and edits
gtfs_tools/tools.py - Code generation → GTFS feed model: edits feed
gtfs_tools/codegen.py - Chat and views → Browser code runner: executes generated code
frontend/src/App.jsx - Scenario runner → Benchmark scenarios: loads scenarios
gtfs_tools/scenarios.py - FC vs codegen benchmark → Benchmark scenarios: loads cases
run_benchmark.py - FC vs codegen benchmark → Function-call executor: runs FC edits
run_benchmark.py - FC vs codegen benchmark → Code generation: runs generated edits
run_benchmark.py - FC vs codegen benchmark → Expected outcomes: uses answer keys
run_benchmark.py - FC vs codegen benchmark → Entity-level diff: measures changes
run_benchmark.py - Scenario runner → Outcome grading: grades scenarios
gtfs_tools/scenarios.py - Outcome grading → Entity-level diff: measures damage
gtfs_tools/grader.py - Outcome grading → GTFS validation: checks validity
gtfs_tools/grader.py - Outcome grading → Expected outcomes: checks correctness
- Outcome grading → Official validator: optional validation
README.md