AI-driven YouTube video generator that creates viral content automatically - from script to upload in minutes. Modern SaaS platform built with Laravel, Vue.js, n8n and Docker, featuring intelligent automation and seamless YouTube integration.
fix some docker-compose problems
Mohamed El aassale3ef0d41feb5
diff --git a/STARTUP_GUIDE.md b/STARTUP_GUIDE.mddeleted file mode 100644index e69de29..0000000diff --git a/app/Http/Controllers/Auth/GoogleController.php b/app/Http/Controllers/Auth/GoogleController.phpindex 7ea44c5..b073d71 100644--- a/app/Http/Controllers/Auth/GoogleController.php+++ b/app/Http/Controllers/Auth/GoogleController.php@@ -20,7 +20,8 @@ class GoogleController extends Controllerreturn redirect('/login')->with('error', 'Google OAuth is not configured. Please set up your Google OAuth credentials in the .env file.');}- return Socialite::driver('google')->redirect();+ // Force a full page redirect (not Inertia.js)+ return redirect()->away(Socialite::driver('google')->redirect()->getTargetUrl());}public function callback(): RedirectResponsediff --git a/app/Http/Middleware/CorsMiddleware.php b/app/Http/Middleware/CorsMiddleware.phpnew file mode 100644index 0000000..e398822--- /dev/null+++ b/app/Http/Middleware/CorsMiddleware.php@@ -0,0 +1,26 @@+<?php++namespace App\Http\Middleware;++use Closure;+use Illuminate\Http\Request;+use Symfony\Component\HttpFoundation\Response;++class CorsMiddleware+{+ /**+ * Handle an incoming request.+ *+ * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next+ */+ public function handle(Request $request, Closure $next): Response+ {+ $response = $next($request);++ $response->headers->set('Access-Control-Allow-Origin', '*');+ $response->headers->set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');+ $response->headers->set('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Requested-With');++ return $response;+ }+}diff --git a/bootstrap/app.php b/bootstrap/app.phpindex 66a0255..8d62621 100644--- a/bootstrap/app.php+++ b/bootstrap/app.php@@ -11,8 +11,14 @@ return Application::configure(basePath: dirname(__DIR__))health: '/up',)->withMiddleware(function (Middleware $middleware): void {+ // Enable CORS for web routes+ $middleware->web(append: [+ \Illuminate\Http\Middleware\HandleCors::class,+ ]);+$middleware->alias(['check.video.quota' => \App\Http\Middleware\CheckVideoQuota::class,+ 'cors' => \App\Http\Middleware\CorsMiddleware::class,]);})->withExceptions(function (Exceptions $exceptions): void {diff --git a/config/cors.php b/config/cors.phpindex 27dec7b..3d2648f 100644--- a/config/cors.php+++ b/config/cors.php@@ -1,7 +1,7 @@<?phpreturn [- 'paths' => ['api/*', 'sanctum/csrf-cookie'],+ 'paths' => ['api/*', 'sanctum/csrf-cookie', 'auth/*'],'allowed_methods' => ['*'],'allowed_origins' => ['*'],'allowed_origins_patterns' => [],diff --git a/routes/web.php b/routes/web.phpindex eeaf823..708ba3a 100644--- a/routes/web.php+++ b/routes/web.php@@ -26,7 +26,7 @@ Route::get('/login', function () {})->name('login');// Google OAuth Routes-Route::prefix('auth/google')->group(function () {+Route::prefix('auth/google')->middleware('cors')->group(function () {Route::get('/', [GoogleController::class, 'redirect'])->name('google.redirect');Route::get('/callback', [GoogleController::class, 'callback'])->name('google.callback');});diff --git a/start-system.bat b/start-system.batdeleted file mode 100644index b35a154..0000000--- a/start-system.bat+++ /dev/null@@ -1,46 +0,0 @@-@echo off-echo ============================================-echo YouTube Video Generator SaaS - Full Setup-echo ============================================-echo.--echo Step 1: Building and starting Docker containers...-docker-compose up -d --build--echo.-echo Step 2: Waiting for containers to be ready...-timeout /t 30 /nobreak > nul--echo.-echo Step 3: Running database migrations...-docker-compose exec app php artisan migrate --force--echo.-echo Step 4: Generating application key...-docker-compose exec app php artisan key:generate--echo.-echo Step 5: Installing Python dependencies...-docker-compose exec app pip3 install -r /app/scripts/requirements.txt--echo.-echo Step 6: Setting up queue worker...-docker-compose exec -d app php artisan queue:work redis--echo.-echo ============================================-echo SYSTEM READY!-echo ============================================-echo.-echo Access your application:-echo - Main App: http://localhost:8000-echo - N8n Workflows: http://localhost:5678 (admin/password123)-echo - Demo Login: Use [email protected] / password-echo.-echo Next steps:-echo 1. Go to http://localhost:5678 and import the workflow-echo 2. Import: docker/n8n/workflows/complete-video-generator.json-echo 3. Activate the workflow-echo 4. Test video generation!-echo.-pausediff --git a/start.bat b/start.batdeleted file mode 100644index 2b950b5..0000000--- a/start.bat+++ /dev/null@@ -1,53 +0,0 @@-@echo off-echo 🚀 Starting YouTube Video Generator Application...--:: Copy environment file-copy .env.docker .env--:: Build and start containers-echo 📦 Building Docker containers...-docker-compose build --no-cache--echo 🔧 Starting services...-docker-compose up -d--:: Wait for database to be ready-echo ⏳ Waiting for database to be ready...-timeout /t 30 /nobreak--:: Run database migrations-echo 🗄️ Running database migrations...-docker-compose exec app php artisan migrate:fresh --seed--:: Generate application key-echo 🔑 Generating application key...-docker-compose exec app php artisan key:generate--:: Clear caches-echo 🧹 Clearing caches...-docker-compose exec app php artisan config:cache-docker-compose exec app php artisan route:cache--:: Set permissions-echo 📂 Setting permissions...-docker-compose exec app chmod -R 777 storage bootstrap/cache--echo ✅ Setup complete!-echo.-echo 🌐 Application URLs:-echo - Laravel App: http://localhost:8000-echo - n8n Workflows: http://localhost:5678-echo - MySQL: localhost:3306-echo - Redis: localhost:6379-echo.-echo 🔐 n8n Login:-echo - Username: admin-echo - Password: n8npassword-echo.-echo 📋 Next Steps:-echo 1. Visit http://localhost:8000 to access the application-echo 2. Visit http://localhost:5678 to configure n8n workflows-echo 3. Import the workflow files from docker/n8n/workflows/-echo 4. Configure API keys in n8n for OpenAI, ElevenLabs, and Pexels--pause