Architecture Overview
Saucebase is a modular Laravel SaaS starter kit built on the VILT stack (Vue 3, Inertia.js, Laravel 12, Tailwind CSS 4). It combines Laravel's backend power with Vue's reactive frontend, connected seamlessly through Inertia.js.
High-Level Architecture
The flow:
- Browser requests a page
- Laravel routes to a controller
- Controller returns Inertia response (JSON with component name and props)
- Vue 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
- Vue 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 Vue components as props.
// Controller
return Inertia::render('Dashboard', [
'stats' => $stats,
'user' => $user,
]);
Vue components receive these props with full type safety:
<script setup lang="ts">
const props = defineProps<{
stats: Stats;
user: User;
}>();
</script>
No API layer, no REST endpoints, no GraphQL schema. Just straightforward data flow from backend to frontend.
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
- Vue 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
- Vue hydrates and displays the page
Subsequent Navigation (SPA)
- User clicks a link
- Inertia intercepts and makes XHR request
- Laravel returns JSON (no full HTML)
- Vue 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 - Vue, 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.