Website: https://querro.io
A web-based internal database management tool that allows users to connect and query databases using AI text-to-sql. Querro takes a pragmatic approach to web development, using proven server-side technologies to deliver reliable database management without unnecessary complexity.
Natural language to SQL conversion powered by OpenAI:
- Convert natural language queries to SQL statements
- Database schema-aware query generation
- Support for multiple OpenAI models (GPT-4o, etc.)
- Connect to multiple external databases (stored in the
dbstable) - Currently supports MySQL only
Located in q/query.php, this provides:
- ACE Editor for writing custom SQL queries with syntax highlighting
- Save and manage reusable queries
- SQL autocomplete functionality
Powered by phpGrid, featuring:
- Interactive data tables with sorting, filtering, and searching
- Column customization
- Column properties and formatting options
- PHP: 8.1
- Framework: Symfony 6.4
- Database: MySQL/MySQLi with PDO
- Libraries:
- phpGrid (data grid component)
- CSS Framework: Bootstrap
- JavaScript:
- jQuery
- UI Components:
- Bootstrap Select
- jQuery UI
- Editors:
- ACE Editor (SQL editing)
- OpenAI API (natural language to SQL)
Querro only use Symfony minimally where it adds value, remain frameworkless everywhere else. While Symfony appears in the dependencies, Querro uses it sparingly—primarily as an authentication layer, not as a full-stack framework.
The heart of Querro lives in the /q directory, which operates completely independently from Symfony. Requests to /q/* bypass Symfony's routing entirely (configured in .htaccess) and are served as direct PHP files. No controllers, no kernel bootstrap, no framework overhead.
This architectural choice means:
- The query builder (
q/query.php) loads instantly without framework initialization - AJAX endpoints (
q/actions.php,q/query-*.php) respond with minimal overhead - Developers work with straightforward PHP files, not framework abstractions
- Debugging follows direct code paths instead of framework internals
No framework to learn. No conventions to memorize. Just plain PHP doing exactly what you tell it to do.
All data grid functionality—displaying query results, pagination, sorting, filtering, inline editing, and exports—is handled by the phpGrid library. When a user runs a query, phpGrid takes over completely: rendering the grid interface, managing AJAX requests for data.
/
├── q/ # Main application pages
│ ├── query.php # Query builder and execution
│ ├── preview.php # Data visualization and charts
│ └── settings.php # Database connection settings
| ...
|
├── src/ # Symfony application code
├── includes/ # Core libraries
│ ├── phpGrid/ # phpGrid library
│ ├── Database.php # PDO-based MySQL database wrapper
│ ├── MySQLSchemaAdapter.php # MySQL schema introspection
│ ├── DatabaseSchemaInterface.php # Schema adapter interface
│ ├── core_db.php # Core database functions
│ └── functions.php # Helper functions
├── resources/ # Frontend resources
│ ├── vendor/ # Third-party UI libraries
│ │ ├── ace/ # ACE code editor
│ │ ├── select2/ # Select2 dropdown enhancement
│ │ ├── jgrowl/ # Notification library
│ │ └── bootstrap-editable/ # Inline editing
│ ├── js/ # JavaScript files
│ └── css/ # Stylesheets
├── config/ # Configuration files
│ ├── config.php # Main configuration
│ └── databases.php # Database connections
├── public/ # Public assets
├── templates/ # Twig templates
├── assets/ # Asset source files
├── node_modules/ # NPM dependencies
└── vendor/ # Composer dependencies
The application uses environment-based configuration:
Database configuration is located in config/config.php.
- PHP 8.1 or higher
- MySQL database
- PHP Composer
- Node.js and npm (used to install dependencies only)
- phpGrid library handles data display and datagrid operations
Comprehensive guides for using and developing Querro:
- Installation Guide - Setup and deployment
- Configuration Guide - Configuration and customization
- Architecture Overview - System design
- FAQ - Frequently asked questions
# 1. Clone and install
git clone [repository-url] querro
cd querro
composer install
npm install
# 2. Install phpGrid dependencies
cd includes/phpGrid
composer install --ignore-platform-req=ext-gd
npm install
cd ../..
# 3. Setup database
mysql -u root -p -e "CREATE DATABASE querro CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -p querro < install.sql
# 4. Configure
cp .env .env.local
# Edit .env.local with your database credentials
# 5. Clear cache
php bin/console cache:clear
# 6. Access application
# Navigate to http://localhost/querro (or your configured APP_URL)See Installation Guide for detailed instructions.
MIT License - See LICENSE file for details.
Built with ❤️ using PHP, MySQL, and jQuery