Skip to content

n00ki/larastart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LaraStart

The ultimate mise en place for your next Laravel + Svelte project πŸš€

Tech Stack

...and more!

Getting Started

Installation

# Clone the repository
git clone https://github.com/n00ki/larastart.git my-app
cd my-app

# Install PHP dependencies
composer install

# Install Node.js dependencies
bun install

# Setup environment variables
cp .env.example .env
# Edit .env with your configuration

# Generate application key
php artisan key:generate

# Setup database
touch database/database.sqlite
php artisan migrate

# Start development environment
composer dev

Development

# Standard development (all services)
composer dev

# Development with SSR
composer dev:ssr

# Check format & linting
composer lint

# Format and Lint code
composer lint:fix

# Generate IDE helpers
composer annotate

# Run tests
composer test

Project Structure

app/
β”œβ”€β”€ Actions/                   # Business logic (Action pattern)
β”‚   β”œβ”€β”€ Auth/                  # Authentication actions
β”‚   └── User/                  # User domain actions (profile, password, account)
β”œβ”€β”€ Enums/                     # Enum classes
β”œβ”€β”€ Http/
β”‚   β”œβ”€β”€ Controllers/           # Thin controllers (delegate to Actions)
β”‚   β”œβ”€β”€ Requests/              # Form validation with custom messages
β”‚   └── Middleware/            # Custom middleware
β”œβ”€β”€ Jobs/                      # Queue jobs
β”œβ”€β”€ Models/                    # Eloquent models with typed properties
β”œβ”€β”€ Policies/                  # Authorization logic
β”œβ”€β”€ Providers/                 # Service providers
└── Services/                  # Service classes

resources/
β”œβ”€β”€ css/
β”‚   └── app.css               # Global CSS
└── js/
    β”œβ”€β”€ actions/              # Wayfinder-generated actions
    β”œβ”€β”€ components/           # Svelte components
    β”‚   └── ui/               # shadcn-svelte UI components
    β”œβ”€β”€ hooks/                # Svelte hooks and utilities
    β”œβ”€β”€ layouts/              # Page layouts (auth, app, settings)
    β”œβ”€β”€ lib/                  # Utility functions
    β”œβ”€β”€ pages/                # Inertia.js pages
    β”œβ”€β”€ routes/               # Wayfinder-generated routes
    β”œβ”€β”€ types/                # TypeScript type definitions
    β”œβ”€β”€ wayfinder/            # Wayfinder (automatically generated)
    β”œβ”€β”€ app.ts                # Main entry point
    └── ssr.ts                # Server-side rendering entry point

tests/
β”œβ”€β”€ Browser/                  # Browser tests (end-to-end)
β”œβ”€β”€ Feature/                  # Feature tests
└── Unit/
    β”œβ”€β”€ Actions/              # Business logic
    β”œβ”€β”€ Models/               # Model behavior
    β”œβ”€β”€ Requests/             # Request validation
    β”œβ”€β”€ Policies/             # Authorization logic
    β”œβ”€β”€ Jobs/                 # Queue jobs
    └── Services/             # Service classes

Architecture Decisions

  • No Abstract Controllers: Composition over inheritance
  • Action Pattern: Single responsibility for business logic
  • Request Validation: Centralized form validation with custom messages
  • Type Safety: End-to-end type safety from PHP to TypeScript

Testing

# Run all tests
composer test

# Run specific test suites
composer test:unit          # Unit tests only
composer test:feature       # Feature tests only
composer test:browser       # Browser tests only
composer test:types         # PHPStan static analysis
composer test:type-coverage # 100% type coverage verification
composer test:all           # All tests with coverage

Documentation

For Humans

Human reference documentation is available in the /docs folder:

For AI Assistants

This project uses Laravel Boost for AI guidance:

  • Laravel/Inertia/Pest/Wayfinder: Automatically detected and provided by Laravel Boost
  • Svelte 5: Use the Svelte MCP server for up-to-date documentation
  • Project-specific rules: See .ai/guidelines/ directory

After updating packages, run php artisan boost:update to refresh AI guidelines.

Contributing

Contributions are welcome! Please review the documentation in /docs and feel free to submit a Pull Request.

Acknowledgments

Special thanks to all incredible contributors to the open-source community!


Built with ❀️ for the Laravel and Svelte communities

About

The ultimate mise en place for your next Laravel + Svelte project πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published