# Mirroried LED Audio Processing Server Architecture ## Purpose Create a customer-profile workflow where each customer can log in, link a controller, choose audio/effect modes, and trigger approved scene commands that are processed locally through Chataigne and the customer’s LED controllers. ## Core rule Use Hostinger for customer profiles, quote/order records, linked controllers, command queue, and admin visibility. Use a local mini PC for live audio, Chataigne, WLED/WLED-MM, and low-latency effects. ## System pieces 1. Mirroried LED customer portal - Customer login - Audio profiles - Linked controller records - Effect command queue - Device heartbeat status 2. Local show-control computer - Windows mini PC or similar - Chataigne installed - Mirroried Audio Agent running - Optional LEDFx/Sonic tools for advanced installs 3. Controller targets - Digi-Quad WLED - ESP32-S3 WLED-MM - MatrixPortal S3 HUB75/HUB75E - Future Beast controller - Chataigne-only show scenes ## Customer workflow 1. Customer logs into profile. 2. Customer or admin selects the build/project. 3. Admin links a controller and gives the local agent a device UID and token. 4. Customer selects effect profile: karaoke, sports night, DJ/stage, patio party, sponsor loop, or non-reactive scheduled mode. 5. Portal queues approved command. 6. Local Mirroried Audio Agent polls the portal. 7. Agent sends OSC command to Chataigne and/or JSON command to WLED/WLED-MM. 8. Controller responds through lighting/video effects. 9. Agent reports command complete or failed. ## Security notes - Do not expose database credentials in JavaScript. - Do not put customer controller tokens into public pages. - Device token is shown once when a controller is linked. - Real-time audio should stay local; do not stream venue audio to shared hosting. - Use HTTPS for the customer portal. - For paid customer control, commands should be limited by active order/support status. ## Future upgrade path - Add per-order controller ownership. - Add effect preset builder. - Add admin approval before commands go live. - Add subscription/support status for managed installs. - Add Beast controller firmware endpoint. - Add WLED preset discovery. - Add QR-code customer scene controls for events.