Launch your own white-label file conversion site using Laravel, Tailwind CSS, and Livewire - fully powered by the ConvertHub API
This is a white-label frontend + backend starter kit for developers and startups looking to offer file conversion services (PDF, audio, video, images, etc.)
Live Demo: ConvertHub.dev
- π― Simple 3-Step Process: Select file β Choose format β Download
- π Drag & Drop Interface: Intuitive file upload with visual feedback
- π Smart Format Search: Quickly find target formats with categorized dropdown
- π Real-time Progress: Live conversion status updates
- π 800+ Format Pairs Supported: Images, documents, videos, audio, and more
- π Privacy-First: Files are processed securely and deleted after conversion
- π± Responsive Design: Works perfectly on desktop and mobile devices
- β‘ Fast Conversions: Powered by ConvertHub's high-performance API
Drag and drop or click to select files
Choose from categorized formats with search functionality
Real-time progress tracking with status updates
- Backend: Laravel 12, PHP 8.2+
- Frontend: Livewire 3, Alpine.js, Tailwind CSS 4
- API: ConvertHub v2 API
- Database: SQLite (configurable to MySQL/PostgreSQL)
- Testing: Pest PHP
- Assets: Vite
- PHP 8.2 or higher
- Composer 2.x
- Node.js 20.x or higher
- NPM or Yarn
- SQLite/MySQL/PostgreSQL
- ConvertHub API key (get one at converthub.com/api)
git clone https://github.com/converthub-api/starter-kit.git
cd starter-kitcomposer installnpm install
# or
yarn installCopy the example environment file and configure it:
cp .env.example .envEdit .env and add your ConvertHub API credentials:
# ConvertHub API Configuration
CONVERTHUB_API_KEY="your_api_key_here"
CONVERTHUB_API_URL=https://api.converthub.com/v2php artisan key:generateRun migrations to create the database tables:
php artisan migrateFetch the latest supported formats from ConvertHub:
php artisan conversion:fetch-formatsFor development:
npm run devFor production:
npm run buildphp artisan serveVisit http://localhost:8000 in your browser.
The ConvertHub API settings are configured in config/services.php:
'converthub' => [
'api_key' => env('CONVERTHUB_API_KEY'),
'api_url' => env('CONVERTHUB_API_URL', 'https://api.converthub.com/v2'),
'webhook_url' => env('CONVERTHUB_WEBHOOK_URL'),
'chunk_size' => env('CONVERTHUB_CHUNK_SIZE', 5242880), // 5MB
'max_file_size' => env('CONVERTHUB_MAX_FILE_SIZE', 52428800), // 50MB
],You can optionally configure AWS S3 or Cloudflare R2 to store converted files in your own bucket. This requires:
- Configure your storage in
.env:
# For AWS S3
FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your-bucket-name
AWS_URL=https://your-bucket.s3.amazonaws.com
# For Cloudflare R2
FILESYSTEM_DISK=r2
R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key
R2_BUCKET=your-bucket-name
R2_ENDPOINT=https://account.r2.cloudflarestorage.com
R2_URL=https://your-custom-domain.com # Optional custom domain-
Configure ConvertHub API:
- Log into your ConvertHub developer account
- Go to Bucket Integrations
- Add your S3/R2 bucket credentials
-
Privacy Cleanup: The application includes automatic cleanup of old files from your bucket (see Commands section below).
Add the following to your crontab to automatically update supported formats:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1Or run manually:
php artisan conversion:fetch-formatsThe application includes a privacy-focused cleanup command that automatically deletes old conversions and their associated files:
# Delete conversions older than 24 hours (default)
php artisan conversions:cleanup
# Delete conversions older than 48 hours
php artisan conversions:cleanup --hours=48
# Preview what will be deleted (dry run)
php artisan conversions:cleanup --dry-run
# Force deletion without confirmation
php artisan conversions:cleanup --forceFeatures:
- Automatically deletes database records older than specified time
- Removes files from S3/R2 buckets if configured
- Supports AWS S3, Cloudflare R2, and custom domains
- Detailed logging of all operations
- Scheduled to run daily at 2 AM automatically
Note: External ConvertHub URLs are automatically skipped during cleanup as they're managed by ConvertHub's retention policy.
starter-kit/
βββ app/
β βββ Console/
β β βββ Commands/
β β βββ CleanupOldConversions.php # Privacy cleanup command
β β βββ FetchConversionFormats.php # Fetches supported formats
β βββ Livewire/
β β βββ FileConverter.php # Main conversion component
β βββ Models/
β β βββ Conversion.php # Conversion tracking model
β βββ Services/
β βββ ConversionService.php # ConvertHub API integration
β βββ FormatService.php # Format management service
βββ resources/
β βββ views/
β βββ home.blade.php # Homepage
β βββ livewire/
β βββ file-converter.blade.php # Conversion UI component
βββ storage/
β βββ app/
β βββ private/
β βββ converthub/ # Cached format data
βββ tests/ # Pest tests
Run the test suite:
php artisan test
# or
./vendor/bin/pestThe application integrates with ConvertHub API v2. Key features include:
- Direct Upload: Files up to 50MB
- Chunked Upload: For larger files (coming soon)
- Status Polling: Real-time conversion progress
- Format Detection: Automatic source format detection
- Error Handling: Detailed error messages
// Convert a file
$result = $conversionService->convertFile($file, $targetFormat);
// Check conversion status
$status = $conversionService->getJobStatus($jobId);
// Get download URL
$download = $conversionService->getDownloadUrl($jobId);This web app uses Tailwind CSS 4. To customize styles, modify the CSS variables in your stylesheets or use Tailwind's built-in utilities directly in your components.
- New Conversion Options: Extend
ConversionService.php - UI Components: Add Livewire components in
app/Livewire - Format Filters: Modify
FormatService.php
| Variable | Description | Required | Default |
|---|---|---|---|
CONVERTHUB_API_KEY |
Your ConvertHub API key | Yes | - |
CONVERTHUB_API_URL |
API endpoint URL | No | https://api.converthub.com/v2 |
CONVERTHUB_WEBHOOK_URL |
Webhook for notifications | No | - |
CONVERTHUB_CHUNK_SIZE |
Chunk size for large files | No | 5242880 (5MB) |
CONVERTHUB_MAX_FILE_SIZE |
Maximum file size | No | 52428800 (50MB) |
FILESYSTEM_DISK |
Storage driver (local/s3/r2) | No | local |
AWS_ACCESS_KEY_ID |
AWS S3 access key | If using S3 | - |
AWS_SECRET_ACCESS_KEY |
AWS S3 secret key | If using S3 | - |
AWS_BUCKET |
S3 bucket name | If using S3 | - |
R2_ACCESS_KEY_ID |
R2 access key | If using R2 | - |
R2_SECRET_ACCESS_KEY |
R2 secret key | If using R2 | - |
R2_BUCKET |
R2 bucket name | If using R2 | - |
R2_ENDPOINT |
R2 endpoint URL | If using R2 | - |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
# Install dependencies
composer install
npm install
# Run development servers
npm run dev
php artisan serveThis project is open source and available under the MIT License.
- ConvertHub for providing the conversion API
- Laravel for the amazing framework
- Livewire for reactive components
- Tailwind CSS for the utility-first CSS framework
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- API Documentation: ConvertHub Docs


