Data Configuration (filetypes.json)
To provide user-friendly search results, raw file extensions are translated into readable formats via an external JSON dictionary.
Structure
The JSON file maps string keys (the file extension, without the dot) to an array containing two elements:
- Full Name: A descriptive title (e.g., "Portable Document Format").
- Category: A broader grouping (e.g., "Document", "Source Code", "System File").
Integration in the UI
When app.py parses a file, it does a dictionary lookup. If it finds "jsx": ["React JavaScript", "Script"], it injects these two strings into the payload sent to the HTML template. In the UI, these strings are rendered as clean, grey and blue metadata pill badges (.badge and .badge-secondary) beneath the file title.
If an extension is completely unknown, the backend gracefully falls back to returning ["Unknown Type", "Unknown"].