## ADR #0001: The UI is a web app 1. **What did you decide?** The user interface of Smarthut is a single-page web application implemented using modern frontend web frameworks. 2. **What was the context for your decision?** The user application of Smarhut should be easily accessible by users and be compatible with as many devices and platforms as possible. Therefore, the UI should work on desktop and mobile devices alike. Targeting several platforms poses the challenge of dealing with different programming language and UI framework constraints. Few paradigms are universally supported and thus there is a risk of additional complexity and cost per each custom logic or code a platform may require. This decision affects mainly the frontend side of Smarthut, possibly constraining UI/UX design freedom. Additionally, due to the way data may be shown data flow between UI and components evaluating business logic (e.g. user-defined triggers) and storing state (e.g. user-defined room configuration) may be affected, thus the connectors between these components may optimized to fit the chosen way to show the data in the UI. 3. **What is the problem you are trying to solve?** _Which technology, framework or paradigm should be used to implement the user interface of Smarthut?_ 4. **Which alternative options did you consider?** - Producing custom-built apps per each major platform, namely *Android*, *iOS*, *Desktop* - possibly Windows-MacOS multiplatform, and *Web*) - Using a market-ready multiplatform technology like Xamarin or Ionic+Electron, and target the *Web* platform separately - Focus on the *Web* platform for the first MVP and later target other platform repackaging the web application (e.g. using PWAs or Webviews) 5. **Which one did you choose?** - Focus on the *Web* platform for the first MVP and later target other platform repackaging the web application (e.g. using PWAs or Webviews) 6. **What is the main reason for that?** Building a web application is cheaper and easier than building for any other platform due to the ubiquitousness of web products and solutions nowadays. This is the most suitable choice to have a cheap yet satisfactory MVP of Smarthut. Pros: - Cheap development; - Lots of compatibility with different devices and platforms; - Ease of repackaging in native applications (through PWAs or Webviews). Cons: - UX may degradate due to use of non-native components for each platform; - Performance is inferior than native components; - The *Web* platform is more limited than other platforms (e.g. for storage), thus targeting it as a common denominator may impact the ease of development of features that may be trivial to implement on other platforms natively.