ADR-06: Vanilla JS frontendΒΆ
ContextΒΆ
Modern web frontends typically use a component framework (React, Vue, Svelte, β¦). The question was whether TINOβs frontend warranted that dependency.
DecisionΒΆ
The TINO frontend is written in plain ES2022 JavaScript with no build step and no framework. The only significant runtime dependencies are CodeMirror 6 (editor) and Yjs (collaboration), both bundled as a single pre-built vendor file. CSS is hand-written; no utility framework is used.
ConsequencesΒΆ
PositiveΒΆ
- No build toolchainNo npm, no bundler, no transpiler in the development loop. Edit a file, reload the browser.
- No framework churnThe frontend does not rot when a framework releases a major version.
- Small payloadThe browser downloads and parses less JavaScript.
- Easy to navigateThe codebase is accessible to contributors who are not frontend specialists.
- What you edit is what runsFiles are served as-is β no source maps, no compilation artefacts, no discrepancy between the editor and the browser. Debugging is straightforward.
- AI-friendlyPlain JS is an excellent foundation for AI-assisted development: no framework abstractions, no transpilation layer, and no generated code for the model to reason through β just files the AI can read, edit, and reload directly.
NegativeΒΆ
- Manual DOM updatesNo reactive data binding β DOM updates are written by hand. Manageable at TINOβs current UI complexity, but would become painful if the interface grew significantly.
- No component abstractionShared UI patterns (dialogs, panels) are duplicated across files rather than encapsulated in reusable components.