frontend.assets

Frontend asset loading for the webapp shell.

The webapp serves one HTML page plus small static CSS/JS assets from package files. Content is cached in-process so repeated requests avoid disk IO.

Functions

get_index_html()

Return the cached index HTML shell.

get_static_text_asset(filename)

Return (content, content_type) for known static text assets.

get_static_binary_asset(relative_path)

Return (payload, content_type) for binary assets under static/.

Module Contents

frontend.assets.get_index_html()

Return the cached index HTML shell.

frontend.assets.get_static_text_asset(filename)

Return (content, content_type) for known static text assets.

Raises:

FileNotFoundError – If the filename is not one of the supported static assets served by the webapp.

frontend.assets.get_static_binary_asset(relative_path)

Return (payload, content_type) for binary assets under static/.

Only whitelisted binary extensions are served, and paths are constrained to the static directory to avoid traversal.