Case Study & Technical Details # StockPro AI Platform An internal AI-powered management and analytics platform built for the StockPro Desktop team. The platform allows administrators and commercial teams to query business data using natural language, generate insights, and perform supervised management actions through an AI-assisted workspace. ## Objectives & Challenges * Build an AI assistant capable of interacting with real business data without giving the language model direct database access. * Transform business operations and analytics into structured tools that an AI model can safely consume. * Provide natural-language access to downloads, prospects, licenses, feedback, partners, CRM data, and pricing. * Maintain strict control over state-changing operations through administrator confirmation. * Combine AI capabilities with a conventional Symfony application architecture, authentication, rate limiting, audit logging, and automated testing. ## Tech Stack * **Backend**: Symfony 8.1, PHP 8.5+ * **Frontend**: Twig, Tailwind CSS * **ORM**: Doctrine ORM * **AI**: Google Gemini API * **Data Sources**: PostgreSQL / Supabase * **Internal Storage**: SQLite * **HTTP Client**: Symfony HttpClient * **Security**: Symfony Security * **Rate Limiting & Concurrency**: Symfony RateLimiter, Symfony Lock * **Testing**: PHPUnit ## Key Features 1. **Natural-Language Business Analytics**: Ask questions about downloads, prospects, licenses, feedback, partners, CRM activity, and pricing. 2. **Typed AI Tools**: Expose business capabilities to Gemini through strictly defined PHP tools with validated parameters and results. 3. **Business Data Grounding**: The AI accesses production data through controlled application services rather than executing arbitrary SQL queries. 4. **Period Comparisons**: Compare business metrics across different periods and identify changes in downloads, feedback, licenses, or revenue. 5. **Supervised Actions**: State-changing operations require an administrator to review and explicitly confirm the proposed action. 6. **CRM Intelligence**: Analyze prospects, pipeline stages, follow-up activity, and conversion-related data. 7. **Feedback Analysis**: Query customer reviews, ratings, recurring topics, and approval statuses. 8. **Partner & License Analytics**: Analyze license activity, partner performance, pricing, and payment information. 9. **Security & Auditability**: Protected administrative access, rate limiting, controlled AI execution, and logging of AI interactions. 10. **Extensible Tool Architecture**: New AI capabilities can be added as independent PHP tools and automatically registered by the application. ```php final class GetWebsiteTrafficTool extends AbstractAiTool { public function execute(array $parameters): array { $this->validateParameters($parameters); return $this->trafficService ->getTrafficMetrics($parameters['period']); } } ``` The platform demonstrates how a traditional Symfony application can be extended with an AI orchestration layer while keeping business logic, data access, security, and state-changing operations under application control. Loading project details... All Projects Visit Live Project