How gabrielhao/city-garden works
Project type and purpose
• City Garden is an AI-powered backend service with a REST API (FastAPI) that analyzes garden conditions and delivers personalized design recommendations and visualizations.
File structure
• Top level:
• src/
– main.py: orchestrator entry (if used)
– api.py: FastAPI endpoint definitions
– run_api.py: launches the FastAPI server
– city_garden/: core library
• src/city_garden/
– graph_builder.py: builds the computational graph of steps
– city_garden_nodes.py: node implementations for each pipeline step
– garden_state.py: manages the in-memory state of analysis results
– llm.py: configures OpenAI calls
– services/: adapters to external systems (image loader, content safety, generation)
– tools/: domain-specific utilities (e.g., climate data fetcher)
• tests/: unit tests
• prompts/: various YAML prompts for LLM-driven tasks (relevant to your pipeline but not CORE runtime)
README for additional insights
• Technologies: FastAPI, Azure Blob Storage, Azure Content Safety, OpenAI GPT, external Weather API.
Detail recommendations
• Edge cases: error paths from Content Safety or generation failures.