|
| 1 | +--- |
| 2 | +title: Touch-first kiosk web application for public machines |
| 3 | +summary: Design and implementation of a production-grade web application running on public, unattended machines, built with strict execution boundaries, deterministic flows, and failure-safe behavior in mind. |
| 4 | + |
| 5 | +category: Frontend architecture |
| 6 | +featured: true |
| 7 | +priority: 85 |
| 8 | +tags: ["kiosk", "spa", "frontend architecture", "public systems", "reliability", "unattended runtime", "operations"] |
| 9 | +links: |
| 10 | + - label: Architecture showcase (GitHub) |
| 11 | + href: "https://github.com/rocketdeploy-dev/showcase-kiosk-web-application" |
| 12 | + kind: deep-dive |
| 13 | + - label: Let’s talk |
| 14 | + href: "/en/contact/" |
| 15 | + kind: cta |
| 16 | +--- |
| 17 | + |
| 18 | +## System context |
| 19 | + |
| 20 | +The project focused on building a **touch-first web application** running directly on **public, unattended machines**, similar in nature to parcel lockers or self-service terminals. |
| 21 | + |
| 22 | +The application operates as the **primary user interface** for end users interacting with the machine in a public space. |
| 23 | + |
| 24 | +Key characteristics of the environment: |
| 25 | +- the device is publicly accessible, |
| 26 | +- there is no guaranteed supervision, |
| 27 | +- sessions must be short-lived and self-cleaning, |
| 28 | +- the system must always recover to a known, safe state. |
| 29 | + |
| 30 | +From the beginning, the kiosk was treated as: |
| 31 | +- a **public-facing system**, not an internal tool, |
| 32 | +- a long-running runtime expected to operate continuously, |
| 33 | +- a constrained environment where failure handling and predictability are critical. |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## Core challenges |
| 38 | + |
| 39 | +### 1. Public kiosk as a system, not just a screen |
| 40 | + |
| 41 | +Unlike typical web applications, a public kiosk cannot rely on: |
| 42 | +- trained users, |
| 43 | +- explicit logout actions, |
| 44 | +- stable interaction patterns. |
| 45 | + |
| 46 | +The application is responsible for: |
| 47 | +- guiding users through a strictly defined flow, |
| 48 | +- preventing abandoned or half-finished sessions, |
| 49 | +- recovering automatically from errors and inactivity, |
| 50 | +- avoiding any persistent user context between interactions. |
| 51 | + |
| 52 | +This required treating the frontend as a **self-contained execution system**, not just a UI layer. |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +### 2. Deterministic user flows under no supervision |
| 57 | + |
| 58 | +The kiosk supports interactions such as: |
| 59 | +- selecting an operation, |
| 60 | +- entering a short numeric code, |
| 61 | +- waiting for external processing, |
| 62 | +- receiving a clear success or failure outcome. |
| 63 | + |
| 64 | +There are no alternative navigation paths. |
| 65 | + |
| 66 | +The challenge was to design: |
| 67 | +- **linear, deterministic flows**, |
| 68 | +- predictable transitions between states, |
| 69 | +- explicit time-based resets, |
| 70 | +- zero reliance on user-initiated cleanup actions. |
| 71 | + |
| 72 | +Every interaction path had to converge back to a known start state. |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +### 3. Integration with external systems under failure conditions |
| 77 | + |
| 78 | +The kiosk application communicates with external backend systems responsible for: |
| 79 | +- validating user-provided codes, |
| 80 | +- resolving operational outcomes, |
| 81 | +- exposing health and availability signals. |
| 82 | + |
| 83 | +Key requirements included: |
| 84 | +- clear integration boundaries, |
| 85 | +- explicit handling of unavailable or degraded backend states, |
| 86 | +- controlled polling instead of open-ended waiting, |
| 87 | +- user-visible error states with automatic recovery. |
| 88 | + |
| 89 | +The frontend had to remain **stateless with respect to business logic**, acting purely as an orchestrator and presenter. |
| 90 | + |
| 91 | +--- |
| 92 | + |
| 93 | +### 4. Long-running execution in a public environment |
| 94 | + |
| 95 | +Unlike typical browser applications, the kiosk: |
| 96 | +- runs continuously for long periods, |
| 97 | +- may be embedded in a locked-down host environment, |
| 98 | +- cannot rely on page reloads or manual restarts. |
| 99 | + |
| 100 | +This required: |
| 101 | +- careful handling of memory and transient state, |
| 102 | +- explicit inactivity detection, |
| 103 | +- avoidance of implicit global state, |
| 104 | +- predictable startup and runtime behavior. |
| 105 | + |
| 106 | +The system had to be resilient by design, not by operational procedures. |
| 107 | + |
| 108 | +--- |
| 109 | + |
| 110 | +## Architectural approach |
| 111 | + |
| 112 | +The application was designed as a **constrained, single-purpose SPA** with explicit execution boundaries. |
| 113 | + |
| 114 | +### High-level structure: |
| 115 | +- **Application shell** – bootstrap logic, global providers, layout, inactivity handling, and host signaling. |
| 116 | +- **Routing layer** – strictly linear navigation defining allowed user paths. |
| 117 | +- **Interaction screens** – isolated views for code entry, waiting, and terminal outcomes. |
| 118 | +- **Integration layer** – centralized HTTP communication with backend systems. |
| 119 | +- **Cross-cutting services** – inactivity detection, localization, transient state handoff. |
| 120 | + |
| 121 | +This structure: |
| 122 | +- limits the surface area of the system, |
| 123 | +- keeps responsibilities clear, |
| 124 | +- makes failure paths explicit and testable. |
| 125 | + |
| 126 | +--- |
| 127 | + |
| 128 | +## Public-machine interaction model |
| 129 | + |
| 130 | +The kiosk interaction model is intentionally minimal. |
| 131 | + |
| 132 | +Key design principles: |
| 133 | +- no free navigation, |
| 134 | +- no persistent user accounts, |
| 135 | +- no long-lived sessions, |
| 136 | +- no background tasks beyond health and polling. |
| 137 | + |
| 138 | +User interactions are time-boxed and state-driven. |
| 139 | + |
| 140 | +Once an outcome is reached, the system: |
| 141 | +- displays a clear result, |
| 142 | +- waits for a fixed duration, |
| 143 | +- resets automatically to the start screen. |
| 144 | + |
| 145 | +This ensures the kiosk remains usable even in the presence of: |
| 146 | +- abandoned interactions, |
| 147 | +- network failures, |
| 148 | +- unexpected user behavior. |
| 149 | + |
| 150 | +--- |
| 151 | + |
| 152 | +## Backend communication model |
| 153 | + |
| 154 | +The frontend integrates with backend systems using: |
| 155 | +- REST over HTTP with JSON payloads, |
| 156 | +- explicit request types for user actions, |
| 157 | +- periodic polling for asynchronous resolution, |
| 158 | +- health endpoints for availability checks. |
| 159 | + |
| 160 | +Key characteristics: |
| 161 | +- all business decisions are made server-side, |
| 162 | +- the frontend never infers outcomes locally, |
| 163 | +- errors are surfaced as explicit UI states, |
| 164 | +- retry behavior is bounded and controlled. |
| 165 | + |
| 166 | +The kiosk remains **backend-agnostic**, enforcing only execution flow and presentation rules. |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +## State management and reliability |
| 171 | + |
| 172 | +The application uses: |
| 173 | +- component-local state for immediate UI interactions, |
| 174 | +- short-lived browser storage to bridge adjacent screens, |
| 175 | +- in-memory services for transient status handoff. |
| 176 | + |
| 177 | +Reliability patterns include: |
| 178 | +- inactivity-based session resets, |
| 179 | +- bounded polling attempts, |
| 180 | +- health-aware readiness and heartbeat signaling, |
| 181 | +- explicit cleanup of transient state after each interaction. |
| 182 | + |
| 183 | +No user data or long-term identifiers persist on the client. |
| 184 | + |
| 185 | +--- |
| 186 | + |
| 187 | +## Security considerations (high-level) |
| 188 | + |
| 189 | +Operating in a public environment required: |
| 190 | +- treating the client as an untrusted surface, |
| 191 | +- delegating all validation to backend systems, |
| 192 | +- limiting local storage to non-sensitive, short-lived values, |
| 193 | +- avoiding embedded credentials or secrets. |
| 194 | + |
| 195 | +Authentication and authorization are handled entirely outside the kiosk runtime. |
| 196 | + |
| 197 | +--- |
| 198 | + |
| 199 | +## Visual documentation note |
| 200 | + |
| 201 | +This kiosk application runs on **publicly accessible machines**. |
| 202 | + |
| 203 | +For this reason: |
| 204 | +- UI screenshots are intentionally omitted, |
| 205 | +- branding and visual layout are not shown, |
| 206 | +- interaction flows are described textually. |
| 207 | + |
| 208 | +This avoids exposing recognizable interfaces or operational details while keeping the architectural discussion intact. |
| 209 | + |
| 210 | +--- |
| 211 | + |
| 212 | +## Final outcome |
| 213 | + |
| 214 | +The result is a **production-grade kiosk web application** that: |
| 215 | +- operates reliably in public, unattended environments, |
| 216 | +- enforces deterministic user flows, |
| 217 | +- recovers automatically from inactivity and failure, |
| 218 | +- integrates cleanly with external systems, |
| 219 | +- remains understandable and maintainable over time. |
| 220 | + |
| 221 | +The project demonstrates how a frontend application can be designed |
| 222 | +as a **robust public-facing system**, not just a UI — even under strong environmental constraints. |
| 223 | + |
| 224 | +--- |
| 225 | + |
| 226 | +## Architecture showcase (GitHub) |
| 227 | + |
| 228 | +This case study focuses on **context, challenges, and outcomes**. |
| 229 | + |
| 230 | +For a deeper look at: |
| 231 | +- frontend structure, |
| 232 | +- execution boundaries, |
| 233 | +- state handling, |
| 234 | +- and engineering trade-offs, |
| 235 | + |
| 236 | +see the dedicated **architecture showcase** repository: |
| 237 | + |
| 238 | +👉 https://github.com/rocketdeploy-dev/showcase-kiosk-web-application |
0 commit comments