SaaShovel Documentation

Welcome to the SaaShovel Documentation! This guide provides everything you need to know to set up, customize, and get the most out of SaaShovel. Whether you're just getting started or looking to explore advanced features, this documentation will help you make the most of your SaaS experience with SaaShovel.
Check out our GitHub repository for the latest code and updates.

Table of Contents

Prerequisites

System Requirements

Core Requirements

  • PHP ≥ 8.2
  • Node.js (for asset compilation)
  • Composer (PHP package manager)
  • MySQL 5.7+ or PostgreSQL 9.6+

PHP Extensions

  • IMAGICK PHP Extension (in order to access the latest versions of the auth screens package)
  • GMP PHP Extension (if not installed, the Google Analytics widgets in the admin panel will fail to display)
  • BCMath PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • MBSTRING PHP Extension
  • MYSQLI PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • FILEINFO PHP Extension

Key Dependencies

  • Laravel v11.x
  • Livewire v3.x
  • Filament v3.2+
  • TailwindCSS v3.4+

Development Environment:
We recommend using one of these options for the best development experience:
  - Laravel Herd (Windows/macOS) - fastest native environment
  - Laravel Sail (all platforms) - Docker-based solution
  - Laragon (Windows) - full-featured local server
  - Laravel Valet (macOS) - lightweight option
  - Laravel Homestead (all platforms) - VM-based environment

Note: Make sure all PHP extensions are installed and enabled before proceeding with the installation. You can check your PHP configuration by running php -m in your terminal.

Get Started

1. In your terminal, navigate to the www folder

Windows: cd your\www\folder
Linux/Mac: cd your/www/folder

2. Initialize Saashovel

Clone the SaaShovel repository (or download it from GitHub). You will need to generate a PAT (Personal Access Token). More information on how to generate it can be found here.

git clone https://github.com/tcja/saashovel.git

Navigate to the SaaShovel folder

cd saashovel

Copy the ".env.example" file and rename it to ".env" to configure your app. More information is provided below in point 5.

Windows: copy .env.example .env
Linux/Mac: cp .env.example .env

Install PHP dependencies

composer install

Install Node.js dependencies

npm install

Then

php artisan saashovel:ignite

This command will:

  • Generate application encryption key → php artisan key:generate
  • Set up database with initial data → php artisan migrate --seed

4. Start your development server

Change the host url in the "vite.config.js" file to your local dev url.

Then
npm run dev
or
php artisan saashovel:dev

Finally

php artisan serve

5. Configure your application

Environment Variables

Update your .env file with the following settings:

Essential Settings

  • Basic Configuration:
    • APP_NAME - Your application name
    • APP_URL - Your application's base URL
    • APP_THEME - Default themes (light/dark/sunset/nature)
  • Localization:
    • APP_LOCALE - Default language
    • APP_AVAILABLE_LOCALES - Supported languages (comma-separated)
    • APP_USE_BROWSER_LOCALE - Enable automatic language detection

Payment Gateway Credentials

Subscription Tiers

  • FIRST_TIER_SUBSCRIPTION_NAME - Name of your basic tier
  • SECOND_TIER_SUBSCRIPTION_NAME - Name of your advanced tier
  • THIRD_TIER_SUBSCRIPTION_NAME - Name of your premium tier
  • DEFAULT_CURRENCY - Default currency for your pricing

The names must strictly match (case-sensitive) the subscription tier names you've set in your billing provider's dashboard.

Pro Tip: For a Step By Step guide on how to create subscription plans, please click here

Additional Features

  • GOOGLE_ANALYTICS_WIDGETS - Enable analytics in admin panel
  • COOKIE_CONSENT - Enable GDPR cookie consent
  • TERMS_AND_PRIVACY_POLICY - Enable legal pages
  • SEND_EMAIL_CONTACT - Enable contact form emails
  • SPA_UX - Enable SPA-like experience
  • More configurable features are available in the .env file, each with comments to help you understand their purpose

Remember to never commit your .env file to version control. Keep your API keys and secrets secure!

Pro Tip: Most configuration options can be modified through:

  • The admin panel under the "My Env." tab for quick access
  • Environment variables in your .env file for different settings across environments
The config file ("config/saashovel.php") provides defaults and additional documentation.

6. Start customizing

Main folders to customize:

  • resources/views/components/ - UI components
  • resources/views/livewire/ - Livewire components
  • app/Http/Livewire/ - Livewire component logic
  • app/Filament/ - Admin panel customization
  • config/saashovel.php - Main configuration

Make sure to review the documentation before making significant changes. Each component is documented with its available props and usage examples.

Artisan Commands

SaaShovel provides several custom artisan commands to streamline your development workflow:

saashovel:ignite

Initialize your SaaShovel project

php artisan saashovel:ignite

This command will:

  • Generate application key
  • Run database migrations with seeders

saashovel:flush

Reset your application to a clean state

php artisan saashovel:flush

This command will:

  • Refresh the database (migrate:fresh --seed)
  • Clear all application caches (optimize:clear)

Pro Tip: Use saashovel:flush during development to quickly reset your application state. Be careful not to use it in production as it will erase all data!

saashovel:page

Generate a new Livewire page component with proper structure

php artisan saashovel:page {name}

This command will create:

  • A new Livewire component in app/Livewire/Page/{Name}/{Name}.php
  • A corresponding view file in resources/views/livewire/pages/{name}/{name}.blade.php
# Example usage
php artisan saashovel:page About

saashovel:emptyPlans

Delete all subscription plans from the database (useful for a plan data refresh)

php artisan saashovel:emptyPlans

This command will:

  • Ask for confirmation before proceeding
  • Remove all records from the subscription_plans table

saashovel:dev

Set up application for development mode

php artisan saashovel:dev

This command will:

  • Backup your .env file
  • Update environment settings for local development
  • Clear all application caches (optimize:clear)
  • Reset and seed the database (migrate:fresh --seed)
  • Prepare Vite development server

Pro Tip: After running saashovel:dev, don't forget to start the Vite development server with npm run dev. Review the development checklist to ensure everything is properly configured.

saashovel:prod

Deploy application to production mode

php artisan saashovel:prod

This command will:

  • Backup your .env file
  • Update environment settings for production
  • Clear all application caches (optimize:clear)
  • Install production dependencies (composer install --no-dev)
  • Optimize autoloader and cache configuration
  • Optimize Filament components and icons
  • Build production assets (npm run build)
  • Run database migrations

Pro Tip: Use saashovel:prod when deploying to production. Make sure to review the post-deployment checklist displayed after completion. Always test in a staging environment first!

Billing Providers

SaaShovel supports multiple payment processors, configurable via the BILLING_PROVIDER environment variable.

Supported Providers

  • Stripe
  • LemonSqueezy
  • Paddle
  • NOWPayments (Cryptocurrency)

Payment Configuration

Hybrid Payment Setup

Configure multiple payment methods by:

  • Setting your primary provider (e.g., BILLING_PROVIDER=paddle)
  • Adding NOWPayments API credentials for additional crypto payment options
  • The "Pay with Crypto" button will appear below the standard payment button

Crypto-Only Setup

For exclusive cryptocurrency payments, set BILLING_PROVIDER=nowpayments

Subscription Management

SaaShovel automatically handles the entire subscription process. Users can manage their subscriptions through:

  • Stripe: Customer portal access via dashboard button
  • LemonSqueezy: Customer portal access via dashboard button
  • Paddle: Built-in customer portal
  • NOWPayments: Built-in customer portal

All providers include a "Cancel Plan" button for easy subscription cancellation.

Features:

  • Automatic plan data synchronization
  • Built-in subscription management
  • Flexible payment options
  • User-friendly dashboard integration

Note: For pricing plan design customization, please refer to the Components section of this documentation.

Implementation Steps

  1. Set up subscription plans in your chosen provider's dashboard (see below for detailed steps).
  2. Configure API credentials in your .env file, ensuring all necessary variables are set.
  3. Ensure plan names in your .env file match exactly with your provider's dashboard.
  4. SaaShovel will automatically fetch and display plan details.

Setting Up Subscription Plans

Stripe

  1. Sign in to your Stripe Dashboard.
  2. Click on the toggle button in the top right to switch to Test mode.
  3. In the sidebar, go to Product catalog (or click here).
  4. Click the + Create product button in the top right.
  5. In the "Create a product" form:
    • Enter the Name matching your FIRST_TIER_SUBSCRIPTION_NAME, SECOND_TIER_SUBSCRIPTION_NAME, or THIRD_TIER_SUBSCRIPTION_NAME
    • Add an optional description and images
    • Choose Recurring price type
    • Set your price and billing interval (monthly/yearly)
    • Click More pricing options
    • Enter the Name of the plan (same as first step) in the Price description
    • Click Next
    • Click Add product
  6. Repeat the process for each subscription tier.
  7. Setup the customer's portal by clicking here
    • Go to Subscriptions → Toggle on "Customer can switch plans"
    • Add the plans you created by typing their name, this will allow your customers to update their plan
    • Customize the rest of the customer portal as you wish
  8. For API keys:
    • Go to Developers → API keys in the Search field (or click here)
    • Copy the Publishable key to STRIPE_KEY in your .env
    • Reveal and copy the Secret key to STRIPE_SECRET
  9. For Webhooks:
    • For Stripe, you can use the Stripe CLI to forward events to your local server
    • Or Alternatively, go to Developers → Webhooks (or click here)
    • Click + Add endpoint
    • Enter your application's webhook URL (the default end point is "/stripe/webhook")
    • Select the events to listen for (typically customer.subscription.* events)
    • Copy the generated Signing secret to STRIPE_WEBHOOK_SECRET in your .env

LemonSqueezy

  1. Sign in to your LemonSqueezy Dashboard.
  2. In the sidebar, go to Store → Products (or click here).
  3. Click the + New product button.
  4. In the "Add Product" form:
    • Enter the Name matching your FIRST_TIER_SUBSCRIPTION_NAME, SECOND_TIER_SUBSCRIPTION_NAME, or THIRD_TIER_SUBSCRIPTION_NAME
    • Select Subscription as the product type
    • Select Standard pricing as the Pricing model
    • Add description and media (optional)
    • Set your price and billing interval (monthly/yearly)
    • Configure trial period if needed
    • Set up subscription features and limits
    • Click Publish product
  5. Repeat the process for each subscription tier.
  6. Setup the customer's portal by clicking here
    • Toggle on "Enable customer portal"
    • Go to Subscriptions → Toggle on "Cancel subscriptions" and "Update subscriptions"
    • Add the plans you created, this will allow your customers to update their plan
    • Customize the rest of the customer portal as you wish
  7. For API setup:
    • Go to Settings → API (or click here)
    • Generate a new API key if needed
    • Copy the key to LEMON_SQUEEZY_API_KEY in your .env
  8. For Store ID:
    • Go to Settings → Stores (or click here)
    • Copy your Store ID (format: #XXXXXX) without the "#"
    • Set it as LEMON_SQUEEZY_STORE in your .env
  9. For Webhooks:
    • Go to Settings → Webhooks (or click here)
    • Click + button
    • Enter your application's webhook URL (the default end point is "/lemon-squeezy/webhook")
    • Select the following events to monitor:
      • order_created
      • subscription_created
      • subscription_updated
      • subscription_cancelled
      • subscription_expired
      • subscription_payment_failed
      • subscription_payment_success
      • subscription_plan_changed
    • Click Save Webhook
    • Copy the generated Signing Secret to LEMON_SQUEEZY_SIGNING_SECRET in your .env

Paddle

  1. Sign in to your Paddle Sandbox Dashboard.
  2. For Products setup:
    • Go to Checkout → Website Approval (or click here)
    • Click + Add a new domain
    • Add your local test domain (e.g., myapp.test); it will be automatically approved.
    • Go to Catalog → Products (or click here)
    • Click + New Product
    • Enter product name
    • Click Save
    • Click + New price
    • Enter price details:
      • Choose Recurring price type
      • Enter the Name matching your FIRST_TIER_SUBSCRIPTION_NAME, SECOND_TIER_SUBSCRIPTION_NAME, or THIRD_TIER_SUBSCRIPTION_NAME
      • Enter the same Name in the Internal description
      • Set your price and billing interval (monthly/anually)
      • Configure trial period if needed
      • Click Save
    • Repeat for each subscription tier
  3. For API credentials:
    • Go to Developer Tools → Authentication (or click here)
    • Copy your Seller ID to PADDLE_VENDOR_ID
    • Generate and copy API Key to PADDLE_VENDOR_AUTH_CODE
    • Copy "Default" Key to PADDLE_PUBLIC_KEY
    • Generate and copy Client-Side Token to PADDLE_CLIENT_SIDE_TOKEN
  4. For Webhooks:
    • Go to Developer Tools → Notifications (or click here)
    • Click + New destination
    • Enter a Description
    • Enter your application's webhook URL (the default end point is "/paddle/webhook")
    • Select the following events to monitor:
      • transaction.completed
      • transaction.updated
      • subscription.canceled
      • subscription.created
      • subscription.paused
      • subscription.updated
      • customer.created
      • customer.updated
    • Click Save destination
    • Click on your newly created Webhook (the three dots)
    • Click on Edit destination
    • Copy the Secret Key to PADDLE_WEBHOOK_SECRET
  5. For sandbox testing:
    • Set PADDLE_SANDBOX=true in your .env
    • Use test card details from Paddle's documentation

NOWPayments

  1. Sign in to your NOWPayments Sandbox account
  2. For Subscriptions setup:
    • In the sidebar, go to Payment Tools → Subscriptions (or click here).
    • Click Create subscription plan
    • Enter the Name matching your FIRST_TIER_SUBSCRIPTION_NAME, SECOND_TIER_SUBSCRIPTION_NAME, or THIRD_TIER_SUBSCRIPTION_NAME
    • Choose 1 Month(s) as the period duration (this will be a monthly subscription)
    • Set your price
    • Click + Advanced settings
    • For Payment notifications link: Enter your application's webhook URL (the default end point is "/nowpayments/webhook")
    • For Successful payment page, Payment failed page and Partial payment page: enter the dashboard route (e.g. my-app.test/dashboard) as to redirect the customer to its dashboard once the payment is made
    • Click Create product
    • Repeat for each subscription tier
  3. API Configuration:
    • Use credentials (the same ones from your Nowpayment's Dashboard) from your .env:
      • Email: NOWPAYMENTS_EMAIL
      • Password: NOWPAYMENTS_PASSWORD
    • Go to Settings → Payments → Payout wallets (or click here)
    • Add your payout wallet
    • Go to Settings → Payments → API Keys (or click here)
    • Generate a new API key
    • Copy the API Key to NOWPAYMENTS_API_KEY
    • Go to Settings → Payments → Payment details (or click here)
    • Choose your desired payment details
  4. Webhook Setup:
    • Go to Settings → Payments → Instant payment notifications (or click here)
    • Copy the IPN Secret Key to NOWPAYMENTS_IPN_SECRET
    • Enter your application's webhook URL
  5. Environment Settings:
    • Set your preferred currency in NOWPAYMENTS_CURRENCY (e.g., USD)
    • For sandbox testing, set:
      • NOWPAYMENTS_BASE_URL=https://api-sandbox.nowpayments.io/v1/
      • Use test cryptocurrencies for payments

Webhook Management

Webhook listeners are located in the app/Listeners/ directory.

Provider Implementations

  • Stripe & Paddle:

    Handled through Laravel's Cashier package.

  • LemonSqueezy:

    Implemented using the LemonSqueezy Laravel package.

  • NOWPayments:

    Managed by SaaShovel's proprietary package (tcja/nowpayments-laravel).

Testing Webhooks Locally:

  • Use Ngrok (free tier with limits)
  • Or use LocalTunnel (completely free)
  • These tools create a secure tunnel to your local environment for testing webhooks
  • Alternatively, for Stripe, you can use the Stripe CLI to forward events to your local server
  • Stripe also offers a Webhook Tester in their dashboard
  • Other providers may offer similar webhook testing tools in their dashboards
  • See the logs from the webhooks in Laravel's log storage at storage/logs/laravel.log

Billing Provider Flexibility

SaaShovel provides flexibility in changing billing providers without service interruption.

Emergency Provider Switch

In case of billing provider issues (e.g., account suspension), you can:

  • Change BILLING_PROVIDER to an alternative provider.
  • Transfer existing users to the new provider either by:
    • Having users create new accounts.
    • Using SQL to update existing user billing providers.
  • Switch back to the original provider when issues are resolved.

Provider Migration

While the app supports multiple billing providers simultaneously:

  • Previous subscription data remains intact when switching providers.
  • New subscriptions will be added to existing records.
  • The database maintains history from all providers.

Note: While multiple provider support offers flexibility, maintaining subscriptions across different providers may lead to complex database records. Consider consolidating to a single provider (or the hybrid method with NOWPayments) for cleaner data management.

Layouts

The application uses two main layouts located in resources/views/layouts:

Dashboard Layout

app.blade.php - This layout is used when users are logged into their dashboard.

Public Layout

guest.blade.php - This layout is used for:

  • All visitors
  • Public pages (even when accessed by logged-in users)
  • Home page

Navigation Menu

The navigation menu is implemented in two locations:

  • resources/views/components/navigation-menu.blade.php (for dashboard layout)
  • resources/views/components/header.blade.php (for public layout)

CMS Menu Integration

                                            
                                                <!-- Blog menu code -->
                                                @php $menu = \LaraZeus\Sky\SkyPlugin::get()->getModel('Navigation')::fromHandle('main'); @endphp
                                                @if($menu && $menu->items)
                                                    @foreach($menu->items as $item)
                                                        {!! \App\CustomRenderNavItem::render($item, $menuLinkClass) !!}
                                                    @endforeach
                                                @endif
                                                <!-- /Blog menu code -->
                                            
                                        

This code automatically displays pages created through the CMS. The default menu handle is "main".

Manual Link Addition

Add links manually below the CMS menu code:

                                            
                                                <!-- Site links -->
                                                <div class="bg-gray-100 p-4 rounded-md font-mono text-sm mt-2">
                                                    <a href="#features" class="class">Features</a>
                                                    <a href="#pricing" class="class">Pricing</a>
                                                </div>
                                                <!-- /Site links -->
                                            
                                        

Note: When creating menus through the CMS, ensure you use the "main" handle for the menu to display properly, or update the handle in the code if you prefer a different name.

Localization

Browser-Based Localization

Saashovel supports automatic locale detection based on browser settings. Configure this in your .env file:

APP_USE_BROWSER_LOCALE=true # Enable browser-based locale detection
APP_AVAILABLE_LOCALES=en,es,fr,de,it,tr # Define available locales (only works when APP_USE_BROWSER_LOCALE is true)

Tip: Set APP_USE_BROWSER_LOCALE to true to automatically serve content in the user's preferred language.

Translation Files

The application uses Laravel's standard JSON-based localization system. Locale files are organized in different locations based on their purpose:

Main Application Translations

resources/lang/

CMS Translations

resources/lang/vendor/zeus-sky/

Contact Page Translations

resources/lang/vendor/zeus-wind/

Note: Saashovel comes with multiple language translations out of the box. Make sure to:

  • Only list actually translated languages in APP_AVAILABLE_LOCALES
  • Maintain translations in all required locations when adding new text
  • Keep language files synchronized across all components

Admin Panel

Users with admin rights are automatically redirected to the admin panel upon login. The panel consists of several tabs, each serving specific administrative functions.
It is powered by the powerful Filament package.

Dashboard

Features integrated Google Analytics widgets. To enable:

  • Follow the setup instructions at Filament Google Analytics (starting from the configuration section)
  • Set GOOGLE_ANALYTICS_WIDGETS=true in your .env file to display widgets

Users

Comprehensive user management interface for adding, removing, and updating user data.
Impersonate users to assist them with any issues they encounter by clicking on the