With SQLite, the approach should equally trivially work with any language and framework. Unlike e.g. Postgres, there's no connection overhead, pgbouncer, etc; you can open the DB at the beginning of the request, once the user credentials are available, and close it before / along with sending the response, and it still would feel instant.