Rename project to OrbitalWard

Add optional TLS certificate expiry checks for website monitors and update product, package, environment, Docker, and documentation naming.
This commit is contained in:
Keith Smith
2026-05-23 14:36:28 -06:00
parent 788c01b1cc
commit 3b75075426
42 changed files with 190 additions and 89 deletions
+1 -1
View File
@@ -1 +1 @@
"""InfraPulse backend package."""
"""OrbitalWard backend package."""
+1 -1
View File
@@ -5,4 +5,4 @@ router = APIRouter(tags=["health"])
@router.get("/health")
def health() -> dict[str, str]:
return {"status": "ok", "service": "infrapulse-backend"}
return {"status": "ok", "service": "orbitalward-backend"}
+2
View File
@@ -53,6 +53,8 @@ def create_website_monitor(
"expected_text": payload.expected_text,
"unexpected_text": payload.unexpected_text,
"timeout_seconds": payload.timeout_seconds,
"check_tls_expiry": payload.check_tls_expiry,
"tls_warning_days": payload.tls_warning_days,
},
interval_seconds=payload.interval_seconds,
status="unknown",
+4 -4
View File
@@ -14,7 +14,7 @@ router = APIRouter(prefix="/notifications/channels", tags=["notifications"])
def _channel_to_read(channel: NotificationChannel) -> NotificationChannelRead:
settings = dict(channel.settings or {})
settings.setdefault("username", "InfraPulse")
settings.setdefault("username", "OrbitalWard")
return NotificationChannelRead(
id=channel.id,
name=channel.name,
@@ -40,7 +40,7 @@ def create_channel(
db: Session = Depends(get_db),
) -> NotificationChannelRead:
channel_settings = dict(payload.settings or {})
channel_settings.setdefault("username", "InfraPulse")
channel_settings.setdefault("username", "OrbitalWard")
channel = NotificationChannel(
name=payload.name,
channel_type=payload.channel_type,
@@ -70,8 +70,8 @@ def test_channel(
response = httpx.post(
url,
json={
"username": (channel.settings or {}).get("username") or "InfraPulse",
"text": f"InfraPulse test notification for {channel.name}",
"username": (channel.settings or {}).get("username") or "OrbitalWard",
"text": f"OrbitalWard test notification for {channel.name}",
},
timeout=10,
)
+2 -2
View File
@@ -20,12 +20,12 @@ def verify_password(plain_password: str, hashed_password: str) -> bool:
def create_access_token(subject: str) -> str:
expires_at = datetime.now(UTC) + timedelta(minutes=settings.access_token_expire_minutes)
payload = {"sub": subject, "exp": expires_at}
return jwt.encode(payload, settings.infrapulse_secret_key, algorithm=ALGORITHM)
return jwt.encode(payload, settings.orbitalward_secret_key, algorithm=ALGORITHM)
def decode_access_token(token: str) -> str | None:
try:
payload = jwt.decode(token, settings.infrapulse_secret_key, algorithms=[ALGORITHM])
payload = jwt.decode(token, settings.orbitalward_secret_key, algorithms=[ALGORITHM])
return payload.get("sub")
except JWTError:
return None
+3 -3
View File
@@ -7,9 +7,9 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
infrapulse_env: str = "development"
infrapulse_secret_key: str = Field(default="change-me", min_length=8)
database_url: str = "postgresql+psycopg://infrapulse:infrapulse@postgres:5432/infrapulse"
orbitalward_env: str = "development"
orbitalward_secret_key: str = Field(default="change-me", min_length=8)
database_url: str = "postgresql+psycopg://orbitalward:orbitalward@postgres:5432/orbitalward"
redis_url: str = "redis://redis:6379/0"
frontend_url: AnyHttpUrl | str = "http://localhost:5173"
backend_url: AnyHttpUrl | str = "http://localhost:8000"
+1 -1
View File
@@ -7,7 +7,7 @@ from app.core.config import settings
def _fernet() -> Fernet:
digest = hashlib.sha256(settings.infrapulse_secret_key.encode("utf-8")).digest()
digest = hashlib.sha256(settings.orbitalward_secret_key.encode("utf-8")).digest()
return Fernet(base64.urlsafe_b64encode(digest))
+1 -1
View File
@@ -25,7 +25,7 @@ async def lifespan(_: FastAPI) -> AsyncIterator[None]:
app = FastAPI(
title="InfraPulse API",
title="OrbitalWard API",
version="0.1.0",
description="Self-hosted infrastructure monitoring API",
lifespan=lifespan,
+2
View File
@@ -64,6 +64,8 @@ class WebsiteMonitorCreate(BaseModel):
expected_text: str | None = None
unexpected_text: str | None = None
timeout_seconds: int = Field(default=10, ge=1, le=120)
check_tls_expiry: bool = False
tls_warning_days: int = Field(default=30, ge=1, le=365)
interval_seconds: int = Field(default=60, ge=10)
create_asset: bool = True
alert_enabled: bool = True