# smart_enclosure_miniprogram **Repository Path**: seaoftranquility/smart_enclosure_miniprogram ## Basic Information - **Project Name**: smart_enclosure_miniprogram - **Description**: Where clients monitor and care for their pets from a miniprogram on wechat - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-17 - **Last Updated**: 2026-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WeChat Mini Program — Smart Enclosure Regulator ## Import Import this directory into WeChat Developer Tools: ```text \miniprogram\miniprogram ``` Use the AppID from `project.config.json` or your own registered Mini Program AppID. ## Implemented features - WeChat login and JWT persistence - device list, five-minute OTP binding, selection, and unbind - latest snapshot and real-time telemetry WebSocket - setpoint API and species presets - care records and weekly/monthly summaries - binary JPEG WebSocket rendering and screenshots - explicit live-stream start/stop with latest-frame rendering - automatic 401 relogin and socket reconnection - explicit telemetry-confirmed auto/manual mode selection - firmware-timed mist 10-second and fan 2-minute overrides with countdown/cancel UI ## Current limitations - `utils/config.js` still contains hardcoded plaintext development URLs. Production requires approved HTTPS/WSS domains. - The exact GOOUUU ESP32-S3-CAM/OV5640 pin map still needs a physical frame smoke test on the product board. - Device execution has no dedicated ACK; mode and outputs are confirmed from later telemetry. - Config values reach firmware but are not yet persisted or version-acknowledged. - Week/month tabs change summary counts but currently show the same latest record list. ## Production checklist 1. Configure an approved HTTPS API domain and WSS domain in WeChat administration. 2. Update `utils/config.js` to use those secure domains. 3. Enable domain validation in Developer Tools. 4. Verify login, OTP expiry, device binding, telemetry, replaced socket handling, and unbind. 5. Review privacy declarations for album writes/screenshots and any future camera/microphone/location features. 6. Do not upload a build that shows mock values as confirmed device data. ## Syntax validation ```powershell Get-ChildItem miniprogram\miniprogram -Recurse -Filter *.js | ForEach-Object { node --check $_.FullName } ``` See [miniprogram/.ai/README.md](../.ai/README.md) for detailed construction guidance.