Architecture Overview
Saucebase is a modular Laravel SaaS starter kit. The backend is Laravel 13 with Inertia.js — the frontend is your choice of Vue 3 or React, connected seamlessly through Inertia. Tailwind CSS 4 handles styling across both.
High-Level Architecture
The flow:
- Browser requests a page
- Laravel routes to a controller
- Controller returns Inertia response (JSON with component name and props)
- Your frontend framework receives props and renders the appropriate page
- Subsequent navigation happens client-side without full page reloads
This architecture eliminates the need for a separate REST API while providing a modern SPA experience.
Core Concepts
Modular by Design
Saucebase uses modules to organize features. Each module is self-contained with its own:
- Routes, controllers, and models
- Frontend pages and components
- Migrations and tests
- Translations
Modules live in your repository (modules/<Name>/), not in external packages. You own the code and can modify it freely.
Learn more: Module System Architecture
Inertia.js: No API Required
Traditional SPAs require building and maintaining API endpoints. Inertia.js eliminates this by allowing controllers to pass data directly to your frontend components as props.
// Controller
return Inertia::render('Dashboard', [
'stats' => $stats,
'user' => $user,
]);
Your components receive these props with full type safety — no API layer, no REST endpoints, no GraphQL schema.
Learn more: Frontend Architecture
Server-Side Rendering (Opt-In)
SSR is available but disabled by default. Enable it per-route for pages that benefit from SEO:
// Public page with SEO benefits
return Inertia::render('Products/Index')->withSSR();
// Authenticated page without SSR
return Inertia::render('Dashboard')->withoutSSR();
This gives you control over when SSR overhead makes sense.
Learn more: SSR Guide
Type Safety End-to-End
TypeScript flows from backend to frontend:
- Controllers define data types
- Inertia props are type-safe
- Frontend components get autocomplete and type checking
- Build-time validation catches errors early
This makes refactoring safe and development faster.
Copy-and-Own Philosophy
When you install a module, its code is copied into your repository. You're not depending on external packages—you own the code.
Why? Full control, no version conflicts, easy customization, simplified debugging.
Trade-off? No automatic updates, but you gain complete ownership.
Learn more: Design Philosophy
Request Flow
Initial Page Load
- Browser requests
/dashboard - Nginx forwards to Laravel
- Route resolves to controller
- Controller returns Inertia response (JSON)
- Blade template renders with embedded JSON
- Frontend framework hydrates and displays the page
Subsequent Navigation (SPA)
- User clicks a link
- Inertia intercepts and makes XHR request
- Laravel returns JSON (no full HTML)
- Frontend swaps page component
- URL updates, page renders instantly
This combines the best of traditional server-side apps (simple data flow) with modern SPAs (smooth navigation).
Next Steps
Dive deeper into specific architectural areas:
- Design Philosophy - Why Saucebase is built this way
- Module System - How modular architecture works
- Frontend Architecture - Framework choice, Inertia, and TypeScript patterns
- Backend Architecture - Laravel patterns and practices
- SSR Guide - Server-side rendering details
- Modules Guide - Working with modules in practice
Understanding the architecture helps you build features that feel natural in Saucebase and make the most of its design.