Design Specifications¶
This section contains detailed design specifications for system components following Sphinx-Needs methodology.
Design Documents:
- High-Level Architecture Design Specification
- JSON-Based Configuration Manager Design
- Configuration Webpage Design Specification
- Web Server Design Specification
- Architecture Overview
- Static File Embedding
- URI Routing and Handlers
- Configuration API Design
- Configuration Manager Integration
- WiFi Manager Integration
- Captive Portal Implementation
- Server Configuration and Lifecycle
- Adding New Pages and Endpoints
- CORS and Security
- Testing and Debugging
- Traceability
Overview¶
Design specifications define how the system implements requirements. They are:
Traceable - Each design spec links to parent requirements
Detailed - Include architecture, data structures, APIs, and algorithms
Testable - Provide basis for implementation and verification
Versioned - Tracked in Git alongside code
Design Hierarchy¶
Design specifications are organized by scope:
High-Level Architecture (
SPEC_ARCH_*) - System-wide design decisionsLayered architecture and component organization
Threading model and memory management
Build system and QEMU integration
Network architecture (WiFi, HTTP)
Performance targets and development workflow
Component-Specific Designs - Detailed component specifications
SPEC_CFG_JSON_*- Configuration Manager (JSON-based system)SPEC_WEB_*- Web Server HTTP interface and REST APIAdditional component designs to be added as needed
Each design specification uses Sphinx-Needs :spec: directive and links to parent requirements using :links: attribute.
Document Standards¶
All design documents follow this structure:
Metadata: Version, date, author, requirements coverage
Architecture: High-level design decisions and patterns
Data Structures: Internal data layouts and formats
API Design: Public interfaces and contracts
Implementation: Detailed algorithms and approaches
Traceability: Requirement coverage matrix
Design vs. Code¶
Design documents are separate from code to avoid bloat:
Design docs (
docs/12_design/): Architecture, algorithms, rationaleCode comments: Implementation notes, requirement IDs
API docs (Doxygen): Function signatures, parameter descriptions
This separation enables:
Professional documentation tooling (Sphinx-Needs traceability matrices)
Design review without code complexity
Version control for design decisions
Scalability for large projects
Traceability Chain¶
The complete traceability chain:
Requirements (docs/11_requirements/)
↓ :links: attribute
Design Specs (docs/12_design/)
↓ @file comments with REQ/SPEC IDs
Implementation (main/, components/)
↓ test suite references
Tests (to be added)
See the Traceability section for visualizations of the complete chain.