Files
zeekay a07a57d6bb feat: add UI registry server and tiered backend (local → registry → github)
Add FastAPI registry server that pre-fetches all component data from
hanzoai/ui on GitHub, caches in memory, refreshes every 15min. Serves
instant cached responses. Deploy at ui.hanzo.ai.

- registry/cache.py: eager full-cache with concurrent GitHub fetching
- registry/server.py: FastAPI endpoints for components, blocks, search
- registry/client.py: RegistryClient matching GitHubAPIClient interface
- Dockerfile for containerized deployment
- UiTool now uses 3-tier fallback: local disk → registry → GitHub API
- Bump hanzo-tools-ui to 0.2.0, server deps optional (fastapi, uvicorn)
2026-03-27 19:06:38 -07:00

29 lines
493 B
Python

"""Run the Hanzo UI Registry server.
Usage:
python -m hanzo_tools.ui.registry
# or
hanzo-ui-registry
"""
import os
def main():
import uvicorn
host = os.environ.get("REGISTRY_HOST", "0.0.0.0")
port = int(os.environ.get("REGISTRY_PORT", "8787"))
dev = os.environ.get("REGISTRY_DEV", "") == "1"
uvicorn.run(
"hanzo_tools.ui.registry.server:app",
host=host,
port=port,
reload=dev,
)
if __name__ == "__main__":
main()