ARCHITECTURAL SPECIFICATION

Build Capability Once → Configure It → Reuse It Across Every Tool

QuickAI Studio Pro separates the permanent PHP 8.2 execution engine from database-driven tool configurations. Administrators can create, preview, test, version, duplicate, and publish new AI utilities without creating separate frontend pages or duplicating backend endpoints.

🔒 Defense-in-Depth Security

PDO prepared statements, constant-time CSRF verification, server-side finfo MIME validation, private upload storage, IDOR ownership checks, and strict prohibition of eval() or dynamic code execution.

🧭 Intelligent Model Router

Routes tasks across OpenAI, Google Gemini, Groq LPU, and xAI Grok based on context size, PDF/Vision requirements, user plan tier, and live provider health with automatic fallback chains.

⚡ Atomic Credit Ledger

Multi-factor credit calculation accounting for token usage, PDF pages, model multiplier, and plan discount—backed by row-locked database transactions and automatic refunds on provider failure.