diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/app.py')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/app.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/app.py b/packages/meshbay-hub/src/meshbay_hub/app.py new file mode 100644 index 0000000..3b9ee4f --- /dev/null +++ b/packages/meshbay-hub/src/meshbay_hub/app.py @@ -0,0 +1,31 @@ +""" +MeshBay Hub — FastAPI application. + +POC endpoints are implemented in this file (in-memory storage). +Production implementation will use db/ with SQLAlchemy + PostgreSQL. +""" + +from fastapi import FastAPI +from meshbay_hub import __version__ +from meshbay_common import MNP_VERSION, MHP_VERSION + +app = FastAPI( + title="MeshBay Hub", + version=__version__, + description="MeshBay identity authority and group registry", +) + +# TODO: import and include routers from api/ submodules +# from meshbay_hub.api import users, nodes, groups +# app.include_router(users.router, prefix="/v1") +# app.include_router(nodes.router, prefix="/v1") +# app.include_router(groups.router, prefix="/v1") + + +@app.get("/v1/hub/info") +async def hub_info() -> dict: + return { + "hub_id": "meshbay.org", + "mnp_version": MNP_VERSION, + "mhp_version": MHP_VERSION, + } |