Web Server Requirements¶
This document specifies component-level requirements for the web server functionality, enabling user interface, configuration, and WiFi setup capabilities.
Document Version: 2.0 Last Updated: 2025-11-12
Component Overview¶
The web server component provides HTTP-based user interface and configuration capabilities. These requirements refine the high-level system requirement Web-based Configuration (REQ_SYS_WEB_1).
Functional Requirements¶
Description: The system SHALL provide a web page that displays current system status with real-time updates for user monitoring. Rationale: Users need to monitor the device’s operation remotely via web interface without requiring physical access. Acceptance Criteria:
|
Description: The system SHALL provide a web page for configuring device parameters as defined in the configuration management requirements. Rationale: Users need to adjust device settings remotely without firmware recompilation or physical access. Acceptance Criteria:
|
Description: The system SHALL provide a captive portal WiFi setup page for initial network configuration. Rationale: Users need an intuitive method to configure WiFi credentials without serial console access or hardcoded credentials. Acceptance Criteria:
|
Description: The web server SHALL provide REST API endpoints for device configuration management. Rationale: Web interface needs standardized API to read and modify device configuration values stored in NVS. Acceptance Criteria:
|
Description: The web interface SHOULD dynamically generate configuration forms from schema definition. Rationale: Dynamic generation eliminates manual HTML maintenance and ensures UI stays in sync with configuration structure. Acceptance Criteria:
|
Description: The system SHALL provide navigation between multiple web pages (status, settings, WiFi setup). Rationale: Users need to access different functionality areas without memorizing URLs. Acceptance Criteria:
|
Description: The web server SHALL handle multiple simultaneous HTTP connections without blocking. Rationale: Multiple users or browser tabs may access the device simultaneously. Acceptance Criteria:
|
Description: The web server SHALL provide a REST API endpoint to retrieve current LED strip state for real-time visualization in the web interface. Rationale: Users viewing the web interface should see real-time visual representation of the LED strip state, enabling remote monitoring without physical line-of-sight to the device. Acceptance Criteria:
Verification: Call endpoint from browser, verify JSON format, test with LED animations, check memory usage over time, verify CORS headers allow cross-origin requests. |
Non-Functional Requirements¶
Description: Web pages SHOULD load and render within 3 seconds on typical mobile/desktop browsers. Rationale: Responsive UI improves user experience and reduces perceived latency. Acceptance Criteria:
|
Description: Web interface SHOULD be optimized for mobile devices with responsive design. Rationale: Many users will access the device from smartphones in the field. Acceptance Criteria:
|
Traceability¶
All traceability is automatically generated by Sphinx-Needs based on the :links: attributes in each requirement.
ID |
Title |
Status |
Tags |
|---|---|---|---|
Certificate Handler |
implemented |
||
Config Manager |
implemented |
||
Display Logic |
implemented |
||
Distance Sensor |
implemented |
||
LED Controller |
implemented |
||
Network Tunnel |
implemented |
||
Startup Tests |
implemented |
||
Web Server |
implemented |
||
WiFi Manager |
implemented |
||
cert_handler_get_ca_cert |
implemented |
||
cert_handler_get_info |
implemented |
||
cert_handler_get_server_cert |
implemented |
||
cert_handler_get_server_key |
implemented |
||
cert_handler_init |
implemented |
||
config_commit |
implemented |
||
config_factory_reset |
implemented |
||
config_get_all_as_json |
implemented |
||
config_get_bool |
implemented |
||
config_get_int16 |
implemented |
||
config_get_int32 |
implemented |
||
config_get_schema_json |
implemented |
||
config_get_string |
implemented |
||
config_init |
implemented |
||
config_set_all_from_json |
implemented |
||
config_set_bool |
implemented |
||
config_set_bool_no_commit |
implemented |
||
config_set_int16 |
implemented |
||
config_set_int16_no_commit |
implemented |
||
config_set_int32 |
implemented |
||
config_set_string |
implemented |
||
config_set_string_no_commit |
implemented |
||
config_write_factory_defaults |
implemented |
||
display_logic_start |
implemented |
||
distance_sensor_get_latest |
implemented |
||
distance_sensor_get_queue_overflows |
implemented |
||
distance_sensor_has_new_measurement |
implemented |
||
distance_sensor_init |
implemented |
||
distance_sensor_is_running |
implemented |
||
distance_sensor_monitor |
implemented |
||
distance_sensor_start |
implemented |
||
distance_sensor_stop |
implemented |
||
led_clear_all |
implemented |
||
led_clear_pixel |
implemented |
||
led_color_brightness |
implemented |
||
led_color_rgb |
implemented |
||
led_controller_deinit |
implemented |
||
led_controller_init |
implemented |
||
led_get_all_colors |
implemented |
||
led_get_count |
implemented |
||
led_get_pixel |
implemented |
||
led_is_initialized |
implemented |
||
led_set_pixel |
implemented |
||
led_show |
implemented |
||
netif_uart_tunnel_deinit |
implemented |
||
netif_uart_tunnel_get_handle |
implemented |
||
netif_uart_tunnel_init |
implemented |
||
led_running_test_multiple_cycles |
implemented |
||
led_running_test_rainbow |
implemented |
||
led_running_test_single_cycle |
implemented |
||
web_server_get_port |
implemented |
||
web_server_init |
implemented |
||
web_server_is_running |
implemented |
||
web_server_start |
implemented |
||
static_file_handler |
implemented |
||
web_server_stop |
implemented |
||
wifi_manager_clear_credentials |
implemented |
||
wifi_manager_get_ip_address |
implemented |
||
wifi_manager_get_status |
implemented |
||
wifi_manager_init |
implemented |
||
wifi_manager_monitor |
implemented |
||
wifi_manager_set_credentials |
implemented |
||
wifi_manager_start |
implemented |
||
wifi_manager_stop |
implemented |
||
wifi_manager_switch_to_ap |
implemented |
||
distance_sensor_error_t |
implemented |
||
distance_measurement_t |
implemented |
||
distance_raw_measurement_t |
implemented |
||
led_color_t |
implemented |
||
netif_uart_tunnel_config_t |
implemented |
||
web_server_config_t |
implemented |
||
wifi_credentials_t |
implemented |
||
wifi_manager_mode_t |
implemented |
||
wifi_status_t |
implemented |
||
JSON Schema as Configuration Source of Truth |
implemented |
config; schema; architecture |
|
Web Interface Integration Support |
approved |
config; integration |
|
NVS Error Graceful Handling |
implemented |
config; error-handling; reliability |
|
Configuration Initialization on Boot |
implemented |
config; boot |
|
Simple Process to Add Configuration Fields |
implemented |
config; extensibility; developer-experience |
|
Type Safety via Optional Static Validation |
implemented |
config; validation; developer-experience |
|
Configuration Schema Versioning and Migration |
open |
config; versioning; migration; future |
|
Parameter Grouping for UI Organization |
implemented |
config; ui; schema |
|
Parameter Type System |
implemented |
config; types |
|
Build-Time Factory Defaults Generation |
implemented |
config; build; code-generation |
|
No Runtime JSON Parsing in C Code |
implemented |
config; performance; memory |
|
Key-Based NVS Storage |
implemented |
config; storage; nvs |
|
Type-Safe Configuration API |
implemented |
config; api; type-safety |
|
Persistent Configuration Storage |
implemented |
config; storage; nvs |
|
Factory Reset Capability |
implemented |
config; reset |
|
Supporting Documentation Traceability |
implemented |
developer; documentation; traceability |
|
Supported Development Environments |
implemented |
developer; devcontainer; codespaces |
|
Debugging Guide Content |
implemented |
developer; documentation; debugging |
|
Web Flasher Guide Content |
implemented |
developer; documentation; flasher |
|
Switching Dev Modes Guide Content |
implemented |
developer; documentation; devmodes |
|
QEMU Emulator Guide Content |
implemented |
developer; documentation; qemu |
|
Known Limitations Documentation |
implemented |
developer; limitations; known-issues |
|
Hardware Specifications Content |
implemented |
developer; documentation; hardware |
|
Overview Index Content |
implemented |
developer; documentation; overview |
|
Quick Start Content |
implemented |
developer; documentation; quickstart |
|
README Content Scope |
implemented |
developer; documentation; readme |
|
Hardware Platform |
approved |
display; hardware; integration |
|
Configuration Integration |
approved |
display; configuration; integration |
|
Core Visualization Concept |
approved |
display; ux; visualization |
|
Below Minimum Distance Warning |
approved |
display; ux; safety |
|
Out of Range Display |
approved |
display; ux; error-handling |
|
WS2812 LED Strip Support |
approved |
led; hardware; ws2812 |
|
Individual Pixel Control |
approved |
led; control; api |
|
Configurable LED Count |
approved |
led; configuration; flexibility |
|
Accurate Color Display |
approved |
led; quality; color-accuracy |
|
LED State Read API |
approved |
led; api; monitoring; web-interface |
|
QEMU UART Network Bridge |
approved |
emulation; network; qemu; uart |
|
Packet Encapsulation |
approved |
emulation; protocol |
|
Host-Side Bridge Script |
approved |
emulation; tooling; host |
|
DHCP Client Support |
approved |
emulation; network; dhcp |
|
Conditional Compilation |
approved |
emulation; build |
|
Emulation Setup Documentation |
approved |
emulation; documentation |
|
Tunnel Throughput |
approved |
emulation; performance |
|
Packet Loss Handling |
approved |
emulation; reliability |
|
Component Initialization |
approved |
sensor; initialization; gpio |
|
Timing and Performance |
approved |
sensor; performance; timing |
|
Accuracy and Calibration |
approved |
sensor; accuracy; calibration |
|
Timeout Error Handling |
approved |
sensor; error-handling; timeout |
|
Range Validation |
approved |
sensor; error-handling; validation |
|
Queue Overflow Management |
approved |
sensor; error-handling; queue |
|
Trigger Pulse Generation |
approved |
sensor; trigger; timing |
|
Real-Time Timestamp Capture |
approved |
sensor; isr; timing; real-time |
|
Measurement Processing |
approved |
sensor; processing; filtering |
|
Blocking API Access |
approved |
sensor; api; synchronization |
|
Task Lifecycle Management |
approved |
sensor; lifecycle; freertos |
|
Health Monitoring |
approved |
sensor; monitoring; diagnostics |
|
Real-Time ISR Constraints |
approved |
sensor; performance; real-time; isr |
|
Memory Resource Limits |
approved |
sensor; memory; resource |
|
LED Controller Initialization |
approved |
startup; initialization; led |
|
Visual Boot Sequence |
approved |
startup; ux; validation |
|
Timing Performance |
approved |
startup; performance; timing |
|
Garage Parking Assistance System |
approved |
system; parking; garage |
|
Component-based Architecture |
approved |
architecture; modularity |
|
Non-volatile Configuration Storage |
approved |
storage; nvs; configuration |
|
ESP32 Hardware Platform |
approved |
hardware; platform |
|
WiFi Connectivity |
approved |
network; wifi |
|
Memory Management |
approved |
performance; memory |
|
Error Handling and Recovery |
approved |
reliability; error-handling |
|
HTTPS Support |
open |
security; https; future |
|
Emulator Support |
approved |
emulator; qemu; testing |
|
Emulator Network Connectivity |
approved |
emulator; qemu; network; development |
|
System Time and NTP Support |
open |
time; ntp; future |
|
Web-based Configuration |
approved |
web; configuration |
|
Real-time Status Display |
approved |
web; ui; monitoring |
|
Configuration Interface |
approved |
web; ui; configuration |
|
WiFi Setup Interface |
approved |
web; wifi; network |
|
Web Interface Navigation |
approved |
web; ui; navigation |
|
HTTP Server Concurrency |
approved |
web; performance |
|
Configuration REST API |
approved |
web; api; config |
|
LED State API Endpoint |
approved |
web; api; led; visualization |
|
Web UI Responsiveness |
approved |
web; performance; ux |
|
Mobile-First Design |
approved |
web; ui; mobile |
|
Schema-Driven Configuration Form |
approved |
web; ui; config |
|
ESP-IDF CMake Integration |
approved |
build; cmake |
|
Certificate Handler Component Design |
draft |
component; security |
|
GitHub Codespaces Integration |
approved |
development; devcontainer |
|
Component Communication Pattern |
approved |
dataflow; communication |
|
Configuration Manager Component Design |
approved |
component; config |
|
Configuration Data Flow |
approved |
dataflow; config |
|
Error Recovery and Reset Strategy |
approved |
error-handling; reliability; reset |
|
Flash Memory Configuration |
approved |
flash; memory |
|
HTTP Server Architecture Details |
approved |
network; http; web |
|
ESP32 Distance Sensor Layered Architecture |
approved |
architecture; layering |
|
Logging and Diagnostics Strategy |
approved |
logging; diagnostics; debugging |
|
Memory Management Strategy |
approved |
memory; performance |
|
Network Tunnel Component Design |
approved |
component; qemu; network |
|
System Performance Requirements |
approved |
performance; requirements |
|
QEMU Hardware Abstraction |
approved |
qemu; emulation |
|
QEMU Component Selection |
approved |
qemu; build |
|
FreeRTOS Task Organization |
approved |
threading; rtos |
|
Web Server Component Design |
approved |
component; web; network |
|
WiFi Manager Design Details |
approved |
network; wifi |
|
Type-Safe Configuration API |
approved |
api; interface; c-api |
|
JSON Schema-Driven Architecture |
draft |
architecture; config; json-schema |
|
Bulk JSON Configuration API |
approved |
api; json; bulk-operations |
|
Factory Reset via Bulk JSON Update |
approved |
build-process; code-generation; factory-reset |
|
Adding New Configuration Fields |
approved |
development; guide; extensibility |
|
Configuration Schema Structure |
approved |
data-structure; schema |
|
JSON Schema as Single Source of Truth |
approved |
architecture; schema; design-pattern |
|
NVS Storage Format |
approved |
storage; nvs |
|
Type Safety Without Code Generation |
approved |
type-safety; best-practices |
|
JSON Schema for UI Generation |
approved |
web; ui; javascript |
|
Configuration Webpage Architecture |
implemented |
frontend; javascript; ui |
|
Device Reset Countdown Interface |
implemented |
ui; countdown; reset |
|
Error Handling and User Feedback |
implemented |
error-handling; feedback |
|
Configuration Data Flow |
implemented |
data-flow; json; api |
|
Dynamic Form Generation from Schema |
implemented |
form-generation; schema; javascript |
|
Complete Page Initialization Flow |
implemented |
initialization; lifecycle |
|
JSON Array to Form Field Mapping |
implemented |
data-mapping; json; form |
|
UI State Management |
implemented |
ui-state; javascript |
|
Supported Development Environments — Options |
implemented |
developer; devcontainer; codespaces |
|
Supported Development Environments — Setup Steps |
implemented |
developer; devcontainer; codespaces |
|
Debugging Guide — Debugging Features |
implemented |
developer; documentation; debugging |
|
Debugging Guide — Quick Start in QEMU |
implemented |
developer; documentation; debugging |
|
Web Flasher Guide — Overview and Browser Requirements |
implemented |
developer; documentation; flasher |
|
Web Flasher Guide — Flash Procedure |
implemented |
developer; documentation; flasher |
|
Dev Modes Guide — What Changes Between Modes |
implemented |
developer; documentation; devmodes |
|
Dev Modes Guide — How to Switch |
implemented |
developer; documentation; devmodes |
|
QEMU Guide — Starting QEMU |
implemented |
developer; documentation; qemu |
|
QEMU Guide — Stopping QEMU |
implemented |
developer; documentation; qemu |
|
QEMU Guide — Accessing the Web Interface |
implemented |
developer; documentation; qemu |
|
Known Limitations File Structure and Process |
implemented |
developer; limitations; known-issues |
|
Hardware Components Listing |
implemented |
developer; documentation; hardware |
|
Hardware Pin Assignment Table |
implemented |
developer; documentation; hardware |
|
Overview Index — Navigation Section |
implemented |
developer; documentation; overview |
|
Overview Index — Project Description |
implemented |
developer; documentation; overview |
|
Overview Index — Audience Section |
implemented |
developer; documentation; overview |
|
Quick Start — Hardware Path |
implemented |
developer; documentation; quickstart; hardware |
|
Quick Start — QEMU Path |
implemented |
developer; documentation; quickstart; qemu |
|
README Introduction and Project Link |
implemented |
developer; documentation; readme |
|
README Metadata Section |
implemented |
developer; documentation; readme |
|
Distance-to-Visual Mapping Algorithm |
approved |
display; algorithm; mapping |
|
Embedded Arithmetic Architecture |
approved |
display; performance; arithmetic |
|
Public Display API |
approved |
display; api; interface |
|
Task-Based Architecture |
approved |
display; freertos; task |
|
Configuration Integration |
approved |
display; configuration |
|
WS2812 Hardware Integration |
approved |
display; hardware; integration |
|
Pixel-Level Control API |
approved |
led; api; control |
|
Batch Operations API |
approved |
led; api; batch |
|
LED State Read API |
approved |
led; api; monitoring; thread-safety |
|
RMT Peripheral Hardware Abstraction |
approved |
led; rmt; hardware |
|
RAM Buffer Architecture |
approved |
led; memory; buffer |
|
Color Representation and Conversion |
approved |
led; color; conversion |
|
Error Handling and Validation |
approved |
led; error-handling; validation |
|
Dynamic Memory Management |
approved |
led; memory; resource |
|
LED Controller Simulator |
approved |
led; simulator; qemu |
|
WS2812 Timing Specification |
approved |
led; timing; ws2812 |
|
UART Tunnel Component Architecture |
implemented |
netif; qemu; uart; architecture |
|
Host-Side Serial-TUN Bridge Script |
implemented |
netif; qemu; python; bridge; tooling |
|
Conditional Compilation — QEMU-Only Build Guard |
implemented |
netif; qemu; build; kconfig |
|
IP Configuration and DHCP Client Integration |
implemented |
netif; qemu; dhcp; ip |
|
Emulation Setup Documentation |
implemented |
netif; qemu; documentation |
|
Performance Characteristics and Known Limitations |
implemented |
netif; qemu; performance; limitations |
|
UART Wire Protocol — Length-Prefix Framing |
implemented |
netif; qemu; protocol; framing |
|
Distance Calculation Algorithm |
approved |
sensor; algorithm; calibration |
|
EMA Smoothing Filter Design |
approved |
sensor; algorithm; filtering |
|
Public API Design |
approved |
sensor; api; interface |
|
Dual-Queue Real-Time Architecture |
approved |
sensor; architecture; real-time |
|
GPIO Interface Design |
approved |
sensor; gpio; hardware |
|
Error Handling Design |
approved |
sensor; error-handling; robustness |
|
Interrupt Service Routine Design |
approved |
sensor; isr; real-time |
|
Distance Sensor Simulator Design |
approved |
sensor; simulator; qemu |
|
Sensor Task Design |
approved |
sensor; freertos; task |
|
LED Controller Dependency Design |
approved |
startup; initialization; dependency |
|
Sequential LED Pattern Algorithm |
approved |
startup; algorithm; visual |
|
Startup Integration and Cleanup |
approved |
startup; integration; cleanup |
|
Component Architecture |
approved |
startup; architecture; component |
|
Web Server Architecture |
approved |
web; architecture |
|
Captive Portal Design |
approved |
web; captive-portal; wifi |
|
HTTP Server Configuration |
approved |
web; config; performance |
|
Extension Guide for Web Pages |
approved |
web; extensibility; guide |
|
Config Manager Integration Pattern |
approved |
web; integration; config |
|
WiFi Manager Integration Pattern |
approved |
web; integration; wifi |
|
Mobile-First Responsive Design |
approved |
web; ui; mobile; responsive |
|
Configuration API Endpoints |
approved |
web; api; config; schema |
|
System Health API Endpoint |
approved |
web; api; diagnostics |
|
LED State API Endpoint |
approved |
web; api; led; visualization |
|
WiFi Management REST API Endpoints |
approved |
web; api; wifi |
|
URI Routing Table |
approved |
web; routing |
|
CORS Configuration |
approved |
web; security; cors |
|
Static File Embedding Strategy |
approved |
web; build; embedding |
|
Web Server Testing Strategy |
approved |
web; testing |
|
Modular Firmware Extensibility |
implemented |
developer; firmware; extensibility |
|
Traceable Supporting Documentation |
implemented |
developer; documentation; traceability |
|
Visual Distance Feedback for Parking |
approved |
display; sensor; garage-user |
|
Appliance Reliability - Just Works on Power |
approved |
reliability; startup; garage-user |
|
Device Setup via Web Interface |
approved |
setup; wifi; web; maker |

REQ_WEB_1¶