https://github.com/filaforge/filaforge-database-manager
Filament Database Tools: viewer + query builder.
https://github.com/filaforge/filaforge-database-manager
database filament laravel php plugin
Last synced: 6 months ago
JSON representation
Filament Database Tools: viewer + query builder.
- Host: GitHub
- URL: https://github.com/filaforge/filaforge-database-manager
- Owner: filaforge
- License: mit
- Created: 2025-08-19T03:07:48.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-19T13:13:06.000Z (11 months ago)
- Last Synced: 2025-10-10T11:55:22.162Z (9 months ago)
- Topics: database, filament, laravel, php, plugin
- Language: PHP
- Size: 31.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Filaforge Database Tools
A comprehensive FilamentPHP plugin that combines database viewing and query building capabilities in a single, user-friendly interface. This plugin merges the functionality of database viewer and query builder into one cohesive tool.
## โจ Features
- **๐ Database Viewer**: Browse database tables and view their contents with pagination
- **โก Query Builder**: Execute custom SQL queries with real-time results
- **๐ Toggle Interface**: Switch between viewer and query modes with intuitive header buttons
- **๐จ Responsive Design**: Works seamlessly on all device sizes
- **๐ Dark Mode Support**: Full compatibility with Filament's dark mode
- **๐ Security**: Only SELECT queries allowed for safety
- **๐ Preset Queries**: Common database operations available as presets
- **๐ฑ Modern UI**: Built with Filament's latest design patterns
## ๐ Installation
### Quick Install (Recommended)
```bash
# Install via Composer
composer require filaforge/database-tools
# Register in your panel provider
# Add this line to your panel configuration:
->plugin(FilaforgeDatabaseToolsPlugin::make())
```
### Manual Installation
1. Clone this repository to your `plugins` directory
2. Add the service provider to your `composer.json`:
```json
"extra": {
"laravel": {
"providers": [
"Filaforge\\DatabaseTools\\FilaforgeDatabaseToolsServiceProvider"
]
}
}
```
### ๐ Detailed Installation Guide
For comprehensive installation instructions, troubleshooting, and configuration options, see [INSTALLATION.md](INSTALLATION.md).
## ๐ Usage
### 1. Register the Plugin
In your panel provider:
```php
use Filaforge\DatabaseTools\FilaforgeDatabaseToolsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(FilaforgeDatabaseToolsPlugin::make());
}
```
### 2. Access the Tools
Navigate to the "Database Tools" page in your Filament panel. You'll see two main sections:
#### Database Viewer
- Select database connection
- Browse available tables
- View table data with pagination
- Sort and filter data
#### Query Builder
- Execute custom SQL queries
- Use preset queries for common operations
- View results in formatted tables
- Error handling and validation
### 3. Toggle Between Modes
Use the header buttons to switch between viewer and query modes:
- **Blue button** indicates the active mode
- **Gray buttons** are available for switching
## โ๏ธ Configuration
The plugin automatically detects your database connections and tables. No additional configuration is required.
### Database Connections
The plugin will automatically detect all configured database connections from your `config/database.php` file.
### Security Settings
- Only SELECT queries are allowed for security
- Results are limited to prevent performance issues
- Database connection validation
## ๐ก๏ธ Security Considerations
โ ๏ธ **Important**: This plugin provides direct database access. Ensure proper user permissions and authentication are in place before use in production environments.
### Recommended Security Measures
1. **User Authentication**: Ensure only authorized users can access the plugin
2. **Database Permissions**: Limit database user permissions to read-only access
3. **Environment Restrictions**: Consider disabling in production or limiting to specific user roles
4. **Query Logging**: Monitor and log all database queries for audit purposes
## ๐ Requirements
- **PHP**: 8.1 or higher
- **Laravel**: 12.x
- **Filament**: 4.x
- **Database**: MySQL/MariaDB, PostgreSQL, SQLite, SQL Server
## ๐งช Testing
```bash
# Run tests
composer test
# Run with coverage
composer test -- --coverage
```
## ๐ง Development
### Local Development
1. Clone the repository
2. Install dependencies: `composer install`
3. Link to your Laravel project for testing
### Building Assets
```bash
# Install Node.js dependencies
npm install
# Build CSS
npm run build
```
## ๐ File Structure
```
filaforge-database-tools/
โโโ src/
โ โโโ FilaforgeDatabaseToolsServiceProvider.php
โ โโโ FilaforgeDatabaseToolsPlugin.php
โ โโโ Pages/
โ โโโ DatabaseTools.php
โโโ resources/
โ โโโ views/
โ โ โโโ pages/
โ โ โโโ database-tools.blade.php
โ โ โโโ database-viewer.blade.php
โ โ โโโ database-query.blade.php
โ โโโ lang/
โ โ โโโ en/
โ โ โโโ database-tools.php
โ โโโ css/
โ โโโ database-tools.css
โโโ composer.json
โโโ README.md
โโโ CHANGELOG.md
```
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
### Development Workflow
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request
## ๐ Changelog
See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.
## ๐ Bug Reports
If you find a bug, please report it using the [GitHub issue tracker](https://github.com/filaforge/database-tools/issues).
## ๐ก Feature Requests
Have an idea for a new feature? We'd love to hear it! Please create an issue or submit a pull request.
## ๐ License
This plugin is open-sourced software licensed under the [MIT license](LICENSE).
## ๐ Acknowledgments
- [FilamentPHP](https://filamentphp.com/) for the amazing admin panel framework
- [Laravel](https://laravel.com/) for the robust PHP framework
- [Spatie](https://spatie.be/) for the excellent package tools
## ๐ Support
- **Email**: filaforger@gmail.com
- **Issues**: [GitHub Issues](https://github.com/filaforge/database-tools/issues)
- **Source**: [GitHub Repository](https://github.com/filaforge/database-tools)
- **Documentation**: [GitHub Wiki](https://github.com/filaforge/database-tools/wiki)
---
**Made with โค๏ธ by the Filaforge Team**