SPORE Gateway Documentation
Welcome to the SPORE Gateway documentation. This directory contains detailed documentation for various features and capabilities of the gateway.
Available Documentation
MQTT Integration
Comprehensive guide to the MQTT integration feature, including:
- Setting up MQTT integration
- Message format and handling
- Testing with local MQTT brokers
- Architecture and data flow
- Troubleshooting and best practices
Rollout Process
Detailed documentation for the firmware rollout system:
- Parallel firmware updates across multiple nodes
- WebSocket progress updates
- Integration with spore-registry
- API endpoints and message formats
Quick Links
- Main README: ../README.md
- Hack Directory: ../hack/README.md
- Testing Scripts: ../hack/
Feature Overview
Core Features
- UDP-based node discovery
- Cluster management and primary node selection
- HTTP API server for cluster operations
- WebSocket real-time updates
- Failover logic for automatic primary switching
- Generic proxy calls to SPORE nodes
Integration Features
- MQTT Integration: Subscribe to MQTT topics and forward messages to WebSocket clients
- Firmware Rollout: Orchestrated firmware updates across the cluster
- Registry Proxy: Proxy for spore-registry firmware management
Getting Started
- Basic Setup: See Main README for installation and basic usage
- MQTT Integration: See MQTT.md for MQTT setup and testing
- Testing: See Hack README for local testing tools
Development
The gateway is written in Go and follows modern Go best practices:
- Structured logging using logrus
- Graceful shutdown handling
- Concurrent-safe operations
- HTTP middleware for CORS and logging
- WebSocket support for real-time updates
Contributing
When adding new features:
- Update relevant documentation in this directory
- Add examples to the
hack/directory - Update the main README with feature highlights
- Follow the existing documentation style and structure
Support
For questions or issues:
- Check the relevant documentation in this directory
- Review gateway logs for error messages
- Use testing tools in the
hack/directory - Check the main README for troubleshooting tips