This example demonstrates a company research application built with Symfony and Neuron AI that can be deployed to Tanzu Platform for Cloud Foundry and integrate with LLM services through the GenAI tile.
- Research companies by name, industry, or keyword
- Gather financial data (quarterly reports, 10K)
- Collect investor relations reports
- Identify company leadership
- Generate competitive profiles
- Provide industry segment analysis
- Export reports to PDF or Excel
Comprehensive documentation is available in the docs directory:
- Architecture: System design, component architecture, and data flow
- Development Guide: Setup, workflows, core concepts, and development practices
- Deployment Guide: Cloud Foundry deployment scenarios and configurations
- Contributing Guidelines: How to contribute to the project
- Setup Guide: Detailed PHP and Composer setup instructions
- Troubleshooting Guide: Solutions to common issues
The application consists of:
- Symfony Framework: Handles HTTP requests, routing, and rendering
- Neuron AI Integration: PHP library for LLM interactions
- Service Components:
- Financial Data Retriever: Gets financial information from public sources
- Leadership Analysis: Identifies and profiles key executives
- Competitive Intelligence: Maps competitor landscape
- Report Generator: Creates structured research reports
- Cloud Foundry Deployment: Configuration for Tanzu Platform deployment
- PHP 8.3+ and Composer
- Cloud Foundry CLI
- Access to Tanzu Platform for Cloud Foundry with GenAI tile installed
-
Clone the repository:
git clone https://github.com/cf-toolsuite/tanzu-genai-showcase cd tanzu-genai-showcase/php-symfony-neuron -
Install dependencies:
[!IMPORTANT] Please follow the Setup Guide, if you haven't yet installed: PHP (and its required extensions), Composer, and/or Symfony.
composer install
-
Create a
.env.localfile with your API keys (for local development only):APP_ENV=dev APP_SECRET=your_symfony_app_secret DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db GENAI_API_KEY=your_GENAI_API_KEY_here GENAI_BASE_URL=optional_custom_endpoint GENAI_MODEL=gpt-4o-mini
-
Set up the database:
php bin/console doctrine:database:create php bin/console doctrine:schema:create
-
Start the development server:
symfony server:start
-
Open your browser to
http://localhost:8000
composer install --optimize-autoloader --no-dev
APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear-
Login to your Cloud Foundry instance:
cf login -a API_ENDPOINT
-
Deploy the application:
cf push
-
Bind to a GenAI service instance:
cf create-service genai-service standard my-llm-service cf bind-service company-research my-llm-service cf restage company-research
The application uses the following approach to consume service credentials:
- When deployed to Cloud Foundry, it automatically detects VCAP_SERVICES environment variables
- It extracts LLM service credentials from the bound service instance
- The Neuron AI client is configured to use these credentials for LLM interactions