Laravel Cloud Starter

Laravel 12 starter with Google OAuth, Livewire Volt, and Tailwind CSS

✨ Key Features

🔐

Google OAuth Integration

Complete Google OAuth 2.0 implementation with Laravel Socialite. Sign in with Google in just a few steps.

Livewire Volt

Modern functional components API for Livewire. Build reactive UIs with minimal JavaScript.

🎨

Tailwind CSS

Pre-configured Tailwind CSS 3 with dark mode support. Beautiful, responsive design out of the box.

🔧

Laravel Breeze

Complete authentication scaffolding with profile management, password reset, and email verification.

📦

Modern Stack

Laravel 12, PHP 8.4, Vite bundler, and Pest testing framework. Everything you need for modern development.

📚

Well Documented

Comprehensive setup guide with troubleshooting, architecture overview, and step-by-step instructions.

🚀 Quick Start Guide

Prerequisites

  • PHP 8.4 or higher
  • Composer installed
  • Node.js 18+ installed
  • Google Cloud account

Installation Steps

  1. Clone the repository
    git clone https://github.com/alexramsey92/laravel-cloud-starter-google-oauth.git cd laravel-cloud-starter-google-oauth
  2. Install dependencies
    composer install npm install
  3. Setup environment
    cp .env.example .env php artisan key:generate

    Note: On Laravel Cloud, APP_KEY is generated automatically. You can skip php artisan key:generate when deploying there.

  4. Configure Google OAuth

    Visit Google Cloud Console and:

    • Create a new project
    • Enable Google+ API
    • Create OAuth 2.0 credentials (Web application)
    • Add redirect URI: http://your-domain/auth/google/callback
    • Add credentials to .env:
      GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret
  5. Run migrations and build assets
    php artisan migrate npm run build
  6. Start development server
    php artisan serve npm run dev # In another terminal

💡 Tip: For detailed troubleshooting and configuration options, check the comprehensive guide on the welcome page after setup.

Local Development vs Laravel Cloud

Local Development

composer install npm install cp .env.example .env php artisan key:generate touch database/database.sqlite php artisan migrate php artisan serve

Set GOOGLE_REDIRECT_URI to your local domain, e.g., http://localhost/auth/google/callback or your Herd domain.

Laravel Cloud Deployment

  • Push repository and deploy in Laravel Cloud
  • APP_KEY is generated automatically (skip key:generate)
  • Configure secrets: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, APP_URL
  • Set GOOGLE_REDIRECT_URI to https://your-domain/auth/google/callback
  • Run migrations via Cloud tasks

Google OAuth Login Box Example

Drop the included component into your login view to enable Google sign-in:

<form wire:submit="login"> <!-- ... your email/password fields ... --> <x-primary-button class="ms-3">{{ __('Log in') }}</x-primary-button> </form> <x-auth-divider text="Or continue with" /> <x-google-login-button text="Sign in with Google" />
  • Component: resources/views/components/google-login-button.blade.php
  • Routes: google.redirect/auth/google/redirect, google.callback/auth/google/callback
  • Env: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI

🛠️ Technology Stack

Laravel 12
PHP 8.4
Livewire 3
Livewire Volt
Tailwind CSS 3
Vite
Laravel Socialite
SQLite
Pest

📖 What's Included

Authentication

Complete auth system with email/password login, registration, password reset, email verification, and Google OAuth.

User Management

Profile page with ability to update profile info, change password, and delete account securely.

Protected Routes

Dashboard and profile pages protected by authentication middleware with proper access control.

Responsive Design

Mobile-first design with Tailwind CSS. Perfect on desktop, tablet, and mobile devices.

Test Suite

Comprehensive Pest tests for authentication flows, profile management, and user registration.

Documentation

In-app guides, troubleshooting section, and this GitHub Pages site with everything you need.

🔗 Resources