lutfi / laravel-boilerplate
A Laravel 10 boilerplate with Vue.js frontend and API endpoints for mobile development
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.1
- laravel/framework: ^10.0
- laravel/sanctum: ^3.2
- laravel/tinker: ^2.8
- spatie/laravel-permission: ^5.10
Requires (Dev)
- fakerphp/faker: ^1.9.1
- laravel/pint: ^1.0
- laravel/sail: ^1.18
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^7.0
- phpunit/phpunit: ^10.1
- spatie/laravel-ignition: ^2.0
README
A modern Laravel 10 boilerplate with Vue.js 3 frontend and API endpoints for mobile development.
Features
- Laravel 10.x
- Vue 3 with Composition API
- Vue Router for SPA
- Vuex for state management
- TailwindCSS for styling
- Laravel Sanctum for API authentication
- Spatie Permission for roles and permissions
- API endpoints ready for mobile apps
- Modern authentication system
- Responsive design with TailwindCSS
- HeadlessUI and Heroicons integration
Requirements
- PHP >= 8.1
- Composer
- Node.js >= 16
- NPM or Yarn
Installation
- Create a new project:
composer create-project lutfi/laravel-boilerplate your-project-name
- Navigate to your project:
cd your-project-name
- Install PHP dependencies:
composer install
- Install NPM dependencies:
npm install
- Copy the environment file:
cp .env.example .env
- Generate application key:
php artisan key:generate
-
Configure your database in
.env
-
Run migrations:
php artisan migrate
- Build frontend assets:
npm run build
Development
- Start the Laravel development server:
php artisan serve
- Start the Vite development server:
npm run dev
API Endpoints
Authentication
- POST
/api/v1/register
- Register a new user - POST
/api/v1/login
- Login user - POST
/api/v1/logout
- Logout user - GET
/api/v1/user
- Get authenticated user
Protected Routes
All protected routes require the Authorization: Bearer {token}
header.
Frontend Structure
resources/js/
├── App.vue # Main app component
├── app.js # Application entry point
├── router/ # Vue Router configuration
├── store/ # Vuex store modules
├── components/ # Reusable components
└── views/ # Page components
Contributing
Feel free to submit pull requests or create issues for bugs and feature requests.
License
This project is open-sourced software licensed under the MIT license.