Add app version number, shown in Navbar next to the logo

New backend/VERSION file (starts at 1.0.0) served via GET /api/version,
displayed as a small "v1.0.0" next to the StreamHoard wordmark. Going
forward I'll bump this on meaningful changes -- patch for fixes, minor
for new features, major for big/breaking redesigns.
This commit is contained in:
Myron Blair
2026-07-27 00:01:04 -05:00
parent 9742ebf50c
commit e54803abb0
3 changed files with 15 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
1.0.0
+7
View File
@@ -67,6 +67,13 @@ app = FastAPI(title="StreamHoard")
api = APIRouter(prefix="/api")
bearer = HTTPBearer(auto_error=False)
APP_VERSION = (ROOT_DIR / "VERSION").read_text().strip() if (ROOT_DIR / "VERSION").is_file() else "0.0.0"
@api.get("/version")
async def get_version():
return {"version": APP_VERSION}
# ---------- Auth deps ----------
async def get_current_user(creds: Optional[HTTPAuthorizationCredentials] = Depends(bearer)) -> dict: