Skip to content

Commit 188afd8

Browse files
committed
Init
0 parents  commit 188afd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+12187
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
APP_NAME="Laravel Downloader Button Template"
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
APP_LOCALE=en
8+
APP_FALLBACK_LOCALE=en
9+
APP_FAKER_LOCALE=en_US
10+
11+
APP_MAINTENANCE_DRIVER=file
12+
# APP_MAINTENANCE_STORE=database
13+
14+
PHP_CLI_SERVER_WORKERS=4
15+
16+
BCRYPT_ROUNDS=12
17+
18+
LOG_CHANNEL=stack
19+
LOG_STACK=single
20+
LOG_DEPRECATIONS_CHANNEL=null
21+
LOG_LEVEL=debug
22+
23+
DB_CONNECTION=sqlite
24+
# DB_HOST=127.0.0.1
25+
# DB_PORT=3306
26+
# DB_DATABASE=laravel
27+
# DB_USERNAME=root
28+
# DB_PASSWORD=
29+
30+
SESSION_DRIVER=database
31+
SESSION_LIFETIME=120
32+
SESSION_ENCRYPT=false
33+
SESSION_PATH=/
34+
SESSION_DOMAIN=null
35+
36+
BROADCAST_CONNECTION=log
37+
FILESYSTEM_DISK=local
38+
QUEUE_CONNECTION=database
39+
40+
CACHE_STORE=database
41+
# CACHE_PREFIX=
42+
43+
MEMCACHED_HOST=127.0.0.1
44+
45+
REDIS_CLIENT=phpredis
46+
REDIS_HOST=127.0.0.1
47+
REDIS_PASSWORD=null
48+
REDIS_PORT=6379
49+
50+
MAIL_MAILER=log
51+
MAIL_SCHEME=null
52+
MAIL_HOST=127.0.0.1
53+
MAIL_PORT=2525
54+
MAIL_USERNAME=null
55+
MAIL_PASSWORD=null
56+
MAIL_FROM_ADDRESS="hello@example.com"
57+
MAIL_FROM_NAME="${APP_NAME}"
58+
59+
AWS_ACCESS_KEY_ID=
60+
AWS_SECRET_ACCESS_KEY=
61+
AWS_DEFAULT_REGION=us-east-1
62+
AWS_BUCKET=
63+
AWS_USE_PATH_STYLE_ENDPOINT=false
64+
65+
VITE_APP_NAME="${APP_NAME}"

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
*.log
2+
.DS_Store
3+
.env
4+
.env.backup
5+
.env.production
6+
.phpactor.json
7+
.phpunit.result.cache
8+
/.fleet
9+
/.idea
10+
/.nova
11+
/.phpunit.cache
12+
/.vscode
13+
/.zed
14+
/auth.json
15+
/node_modules
16+
/public/build
17+
/public/hot
18+
/public/storage
19+
/storage/*.key
20+
/storage/pail
21+
/vendor
22+
Homestead.json
23+
Homestead.yaml
24+
Thumbs.db

README.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Laravel 12 Media Converter Template
2+
3+
A modern, responsive media conversion web application built with Laravel 12, based on the React YouTube downloader template structure. This template provides a clean, professional interface for media file conversion with multiple format support.
4+
5+
## Features
6+
7+
- **Multiple Conversion Types**
8+
- 4K Video Conversion
9+
- Audio Conversion (MP3, WAV, FLAC, etc.)
10+
- Batch File Processing
11+
- Audio to WAV Conversion
12+
- 1080p Video Conversion
13+
14+
- **Modern UI/UX**
15+
- Responsive design with Tailwind CSS
16+
- Dark mode support
17+
- Smooth animations and transitions
18+
- Interactive file upload areas
19+
- Progress tracking
20+
21+
- **Technical Features**
22+
- Laravel 12 framework
23+
- Alpine.js for interactivity
24+
- File upload and processing
25+
- Queue system for background processing
26+
- Database tracking of conversions
27+
- RESTful API endpoints
28+
29+
## Installation
30+
31+
### Prerequisites
32+
- PHP 8.3+
33+
- Composer
34+
- Node.js & NPM
35+
- SQLite/MySQL/PostgreSQL
36+
37+
### Setup Steps
38+
39+
1. **Clone the repository**
40+
```bash
41+
git clone <repository-url>
42+
cd laravel-media-converter
43+
```
44+
45+
2. **Install PHP dependencies**
46+
```bash
47+
composer install
48+
```
49+
50+
3. **Install Node.js dependencies**
51+
```bash
52+
npm install
53+
```
54+
55+
4. **Environment setup**
56+
```bash
57+
cp .env.example .env
58+
php artisan key:generate
59+
```
60+
61+
5. **Database setup**
62+
```bash
63+
php artisan migrate
64+
```
65+
66+
6. **Build assets**
67+
```bash
68+
npm run build
69+
```
70+
71+
7. **Start development server**
72+
```bash
73+
php artisan serve
74+
```
75+
76+
## Customization
77+
78+
### Color Scheme
79+
The color scheme can be customized by modifying the CSS variables in `resources/views/layouts/app.blade.php`:
80+
81+
```css
82+
:root {
83+
--color-purple-main: #6c5ce7;
84+
--color-heading-main: #2D3436;
85+
--color-base-one: #4A5455;
86+
/* ... other colors */
87+
}
88+
```
89+
90+
### Adding New Conversion Types
91+
1. Create a new controller method in `ConverterController`
92+
2. Add a new route in `routes/web.php`
93+
3. Create a corresponding Blade view in `resources/views/converters/`
94+
4. Update the navigation links in the layout
95+
96+
### File Processing
97+
Implement actual file conversion logic in the `ConversionService` class. The template provides a structure for:
98+
- File upload handling
99+
- Conversion status tracking
100+
- Background job processing
101+
- Error handling
102+
103+
## Routes
104+
105+
- `/` - Home page with main conversion interface
106+
- `/4k-video-converter` - 4K video conversion
107+
- `/audio-converter` - Audio format conversion
108+
- `/batch-converter` - Multiple file processing
109+
- `/audio-to-wav` - Audio to WAV conversion
110+
- `/video-1080p-converter` - 1080p video conversion
111+
- `/api/convert` - API endpoint for file conversion
112+
113+
## File Structure
114+
115+
```
116+
├── app/
117+
│ ├── Http/Controllers/
118+
│ │ ├── HomeController.php
119+
│ │ └── ConverterController.php
120+
│ ├── Models/
121+
│ │ └── Conversion.php
122+
│ └── Services/
123+
│ └── ConversionService.php
124+
├── resources/
125+
│ └── views/
126+
│ ├── layouts/
127+
│ │ └── app.blade.php
128+
│ ├── converters/
129+
│ │ ├── 4k-video.blade.php
130+
│ │ ├── audio.blade.php
131+
│ │ ├── batch.blade.php
132+
│ │ ├── audio-wav.blade.php
133+
│ │ └── 1080p.blade.php
134+
│ └── home.blade.php
135+
├── database/
136+
│ └── migrations/
137+
│ └── create_conversions_table.php
138+
└── routes/
139+
└── web.php
140+
```
141+
142+
## API Usage
143+
144+
### Convert File
145+
```bash
146+
POST /api/convert
147+
Content-Type: multipart/form-data
148+
149+
{
150+
"file": <file>,
151+
"format": "mp4",
152+
"quality": "1080p"
153+
}
154+
```
155+
156+
### Response
157+
```json
158+
{
159+
"success": true,
160+
"message": "File conversion started successfully",
161+
"conversion_id": "uuid-string",
162+
"estimated_time": 120
163+
}
164+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
abstract class Controller
6+
{
7+
//
8+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
use Illuminate\View\View;
7+
use Illuminate\Http\JsonResponse;
8+
9+
class ConverterController extends Controller
10+
{
11+
public function fourKVideo(): View
12+
{
13+
$pageData = [
14+
'title' => '4K Video Converter',
15+
'subtitle' => 'Convert videos to ultra-high 4K resolution',
16+
'description' => 'Transform your videos to stunning 4K quality with our advanced conversion technology.',
17+
'supportedFormats' => ['MP4', 'MOV', 'AVI', 'MKV', 'WMV']
18+
];
19+
20+
return view('converters.4k-video', compact('pageData'));
21+
}
22+
23+
public function audioConverter(): View
24+
{
25+
$pageData = [
26+
'title' => 'Audio Converter',
27+
'subtitle' => 'Convert audio files to MP3 and other formats',
28+
'description' => 'Extract audio from videos or convert between audio formats easily.',
29+
'supportedFormats' => ['MP3', 'WAV', 'FLAC', 'AAC', 'OGG']
30+
];
31+
32+
return view('converters.audio', compact('pageData'));
33+
}
34+
35+
public function batchConverter(): View
36+
{
37+
$pageData = [
38+
'title' => 'Batch Converter',
39+
'subtitle' => 'Convert multiple files simultaneously',
40+
'description' => 'Process multiple media files at once to save time and increase productivity.',
41+
'features' => ['Multiple file upload', 'Queue management', 'Progress tracking']
42+
];
43+
44+
return view('converters.batch', compact('pageData'));
45+
}
46+
47+
public function audioToWav(): View
48+
{
49+
$pageData = [
50+
'title' => 'Audio to WAV Converter',
51+
'subtitle' => 'Convert audio files to high-quality WAV format',
52+
'description' => 'Convert your audio files to uncompressed WAV format for the best quality.',
53+
'benefits' => ['Lossless quality', 'Universal compatibility', 'Professional standard']
54+
];
55+
56+
return view('converters.audio-wav', compact('pageData'));
57+
}
58+
59+
public function video1080p(): View
60+
{
61+
$pageData = [
62+
'title' => '1080p Video Converter',
63+
'subtitle' => 'Convert videos to Full HD 1080p resolution',
64+
'description' => 'Optimize your videos for Full HD quality with our 1080p conversion tool.',
65+
'features' => ['Full HD quality', 'Fast processing', 'Multiple format support']
66+
];
67+
68+
return view('converters.1080p', compact('pageData'));
69+
}
70+
71+
public function convert(Request $request): JsonResponse
72+
{
73+
$request->validate([
74+
'file' => 'required|file|max:102400', // 100MB max
75+
'format' => 'required|string|in:mp4,avi,mov,mp3,wav,flac'
76+
]);
77+
78+
// Simulate conversion process
79+
// In a real app, you would implement actual file conversion logic here
80+
81+
return response()->json([
82+
'success' => true,
83+
'message' => 'File conversion started successfully',
84+
'conversion_id' => uniqid(),
85+
'estimated_time' => rand(30, 300) // seconds
86+
]);
87+
}
88+
}

0 commit comments

Comments
 (0)