How urban-toolkit/curio works
Project Type and Purpose
• Curio is a full‐stack framework focused on collaborative urban visual analytics. It leverages a dataflow model to integrate preprocessing, management, and visualization of urban data. The project also stresses provenance awareness and collaboration, with integrations to UTK, Vega-Lite, and external authentication (e.g., Google OAuth).
And Identify Main Components
• Backend Service (in the “backend” directory):
• Contains the Flask-based API server (server.py), configurations (config.py, .flaskenv), and database migration scripts (Alembic migrations).
• Manages the core business logic, provenance tracking, user authentication (note presence of Google OAuth service), and data flow orchestration.
• Includes modules for API routing (api/routes.py), middleware, and user models.
• Frontend / Visualization Components (in “urban-workflows”):
• A modern React/TypeScript-based application structured under the “urban-workflows/src” directory.
• Incorporates high-level grammar and handles the user interface for interactive visual analytics.
• Sandbox Environment:
• Found in the “sandbox” directory, this appears to be a deployment/testing environment that closely mirrors the backend but may provide additional tools (docker-compose, Dockerfile) to run the application in isolated settings.
• Documentation and Examples:
• Located under the “docs” folder which includes guidelines, code style, and usage examples.
• External Integrations:
• Integration with external services including Google OAuth (visible in backend’s services), UTK visualization framework, and Vega-Lite for charting.
Relationships and Interactions
• The frontend (urban-workflows) interacts with the backend API to:
• Submit user actions and data for processing.
• Retrieve analysis results and provenance information.
• The backend’s API routes enforce business logic, call external services (Google OAuth for authentication), and interact with the database (migration files, Provenance.sql, user models).
• Sandbox serves as an alternative deployment configuration and may be used for local testing, containerized deployments, or rapid prototyping.
• Dataflow: The system relies on a clear dataflow model—from data ingestion and preprocessing (in the backend), through processing and provenance capture, to visual presentation on the frontend.
Important Architectural Patterns and Design Principles
• Modular design: Separation of concerns is evident across different directories (API, services, users for backend; components and providers in frontend).
• Provenance-aware data tracking is a core design element to track every transformation along the dataflow.
• Use of micro-frontend or component-based architectures in the urban-workflows (React components).
• Configuration and environment separation (see different .flaskenv files and sandbox-specific configurations).