Single-File Web Apps (SFWAs) are web applications contained entirely in one static HTML file, with any JavaScript, CSS, and images embedded and no external dependencies or application server. They run in a browser, and can be opened directly from a downloaded file or served by a basic HTTP server. The central argument is that this minimal architecture makes suitable apps more portable, secure, and durable than conventional web apps. A single file can be copied, emailed, stored on a USB drive, or mirrored, and it can keep working after its original website disappears. Offline use also avoids dependence on online services and can help users check that data is not being sent elsewhere.
The case for security and longevity rests on reducing dependencies: there are fewer third-party libraries, servers, and connections that can fail, become incompatible, or be exploited. Because a browser is the main requirement, SFWAs may also be less vulnerable to software rot than programs tied to changing infrastructure. Two examples illustrate the approach: FuzzyGraph, a fuzzy and non-binary graphing tool in a roughly 1.3 MB file, and Hypervault, an offline encryption app that creates another standalone HTML file containing encrypted data and the code to decrypt it. The author presents Hypervault as a way to preserve access to encrypted documents across devices and over time. The approach is not suitable for apps that need to communicate with services, such as email or social networks, but build tools can combine code developed in multiple files into one final HTML file.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.