feat: indie status page MVP -- FastAPI + SQLite

- 8 DB models (services, incidents, monitors, subscribers, etc.)
- Full CRUD API for services, incidents, monitors
- Public status page with live data
- Incident detail page with timeline
- API key authentication
- Uptime monitoring scheduler
- 13 tests passing
- TECHNICAL_DESIGN.md with full spec
This commit is contained in:
IndieStatusBot 2026-04-25 05:00:00 +00:00
commit 902133edd3
4655 changed files with 1342691 additions and 0 deletions

View file

@ -0,0 +1,30 @@
from __future__ import annotations
from collections.abc import Iterator
from contextlib import contextmanager
from typing import Final
from mypy.checker_shared import TypeCheckerSharedApi
# This is global mutable state. Don't add anything here unless there's a very
# good reason.
class TypeCheckerState:
# Wrap this in a class since it's faster that using a module-level attribute.
def __init__(self, type_checker: TypeCheckerSharedApi | None) -> None:
# Value varies by file being processed
self.type_checker = type_checker
@contextmanager
def set(self, value: TypeCheckerSharedApi) -> Iterator[None]:
saved = self.type_checker
self.type_checker = value
try:
yield
finally:
self.type_checker = saved
checker_state: Final = TypeCheckerState(type_checker=None)