FastAPI is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.
FastAPI's router.frontend() now also supports router dependencies (e.g. add cookie auth to a router, and a frontend at /admin).
Handle the cookie auth in FastAPI, and let the frontend do its client-side routing (e.g. TanStack Router with React).
See the official website.